Get a query by id

GET /project/{projectId}/queries/{queryId}

Get a query by id

Path parameters

  • projectId string Required

    Project ID

    Format should match the following pattern: ^[A-Za-z0-9\-]+$.

  • queryId string Required

    Query ID

    Format should match the following pattern: ^[A-Za-z0-9\-]+$.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • query object Required
      Hide query attributes Show query attributes object
      • id string Required
      • projectId string Required
      • input object Required

        Additional properties are NOT allowed.

        Hide input attributes Show input attributes object
        • database string
        • schema string
        • name string Required
        • query string Required
        • createdAt string(date-time)
        • runScriptTemplate string
        • queryType string Required

          Values are STORED_PROCEDURE, TRIGGER, VIEW, USER_QUERY, or PACKAGE.

      • output object Required

        Additional properties are NOT allowed.

        Hide output attributes Show output attributes object
        • query string Required
        • status string Required

          Values are NOT_STARTED, RUNNING, FAILED, COMPLETED, or PENDING.

        • lastModifiedAt string(date-time)
        • language string

          Values are JAVA, CSHARP, or JAVASCRIPT.

        • attemptedTypedEntities boolean
        • usedTypedEntities boolean

          Default value is false.

        • errorMessage string
        • modified boolean
        • runScriptTemplate string
        • functionName string
    • convertedRunResult object
      Hide convertedRunResult attributes Show convertedRunResult attributes object
      • id string Required
      • projectId string Required
      • executionTimeMs number
      • result object
        Hide result attributes Show result attributes object
        • data string Required
        • pageNumber integer Required
        • pageSize integer Required
        • total integer Required
        • hasMore boolean Required
      • error string
      • logs object
        Hide logs attributes Show logs attributes object
        • stdout string Required
        • stderr string Required
    • sourceRunResult object
      Hide sourceRunResult attributes Show sourceRunResult attributes object
      • id string Required
      • projectId string Required
      • executionTimeMs number
      • result object
        Hide result attributes Show result attributes object
        • data string Required
        • pageNumber integer Required
        • pageSize integer Required
        • total integer Required
        • hasMore boolean Required
      • error string
      • logs object
        Hide logs attributes Show logs attributes object
        • stdout string Required
        • stderr string Required
      • fieldMetadataMap object
        Hide fieldMetadataMap attribute Show fieldMetadataMap attribute object
        • * object Additional properties
          Hide * attributes Show * attributes object
          • columnType string Required
          • columnIndex integer Required
  • 404 application/json

    Not found

    Hide response attributes Show response attributes object
    • jobId string

      Format should match the following pattern: ^[A-Za-z0-9\-]+$.

    • message string Required
    • description string
    • timestamp string(date-time) Required
GET /project/{projectId}/queries/{queryId}
curl \
 --request GET 'http://127.0.0.1:8278/api/v1/project/{projectId}/queries/{queryId}'
Response examples (200)
{
  "query": {
    "id": "string",
    "projectId": "string",
    "input": {
      "database": "string",
      "schema": "string",
      "name": "string",
      "query": "string",
      "createdAt": "2025-05-04T09:42:00Z",
      "runScriptTemplate": "string",
      "queryType": "STORED_PROCEDURE"
    },
    "output": {
      "query": "string",
      "status": "NOT_STARTED",
      "lastModifiedAt": "2025-05-04T09:42:00Z",
      "language": "JAVA",
      "attemptedTypedEntities": true,
      "usedTypedEntities": false,
      "errorMessage": "string",
      "modified": true,
      "runScriptTemplate": "string",
      "functionName": "string"
    }
  },
  "convertedRunResult": {
    "id": "string",
    "projectId": "string",
    "executionTimeMs": 42.0,
    "result": {
      "data": "string",
      "pageNumber": 42,
      "pageSize": 42,
      "total": 42,
      "hasMore": true
    },
    "error": "string",
    "logs": {
      "stdout": "string",
      "stderr": "string"
    }
  },
  "sourceRunResult": {
    "id": "string",
    "projectId": "string",
    "executionTimeMs": 42.0,
    "result": {
      "data": "string",
      "pageNumber": 42,
      "pageSize": 42,
      "total": 42,
      "hasMore": true
    },
    "error": "string",
    "logs": {
      "stdout": "string",
      "stderr": "string"
    },
    "fieldMetadataMap": {
      "additionalProperty1": {
        "columnType": "string",
        "columnIndex": 42
      },
      "additionalProperty2": {
        "columnType": "string",
        "columnIndex": 42
      }
    }
  }
}
Response examples (404)
{
  "jobId": "string",
  "message": "string",
  "description": "string",
  "timestamp": "2025-05-04T09:42:00Z"
}