Convert a query

POST /project/{projectId}/queries/{queryId}

Convert a query

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\-]+$.

application/json

Body Required

  • language string Required

    Values are JAVA, CSHARP, or JAVASCRIPT.

  • attemptTypedEntities boolean

    Default value is false.

Responses

  • 200 application/json

    OK

    Hide response attributes Show response 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
  • 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
  • 492 application/json

    No relevant mappings 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
  • 497 application/json

    Operation is not allowed when there are existing query conversions jobs

    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
POST /project/{projectId}/queries/{queryId}
curl \ --request POST 'http://127.0.0.1:8278/api/v1/project/{projectId}/queries/{queryId}' \ --header "Content-Type: application/json" \ --data '{"language":"JAVA","attemptTypedEntities":false}'
Request examples
{ "language": "JAVA", "attemptTypedEntities": false }
Response examples (200)
{ "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" } }
Response examples (404)
{ "jobId": "string", "message": "string", "description": "string", "timestamp": "2025-05-04T09:42:00Z" }
Response examples (492)
{ "jobId": "string", "message": "string", "description": "string", "timestamp": "2025-05-04T09:42:00Z" }
Response examples (497)
{ "jobId": "string", "message": "string", "description": "string", "timestamp": "2025-05-04T09:42:00Z" }