Create a new adhoc query

POST /project/{projectId}/queries

Create a new adhoc query

Path parameters

  • projectId string Required

    Project ID

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

application/json

Body

  • inputQuery string

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
POST /project/{projectId}/queries
curl \ --request POST 'http://127.0.0.1:8278/api/v1/project/{projectId}/queries' \ --header "Content-Type: application/json" \ --data '{"inputQuery":"string"}'
Request examples
{ "inputQuery": "string" }
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" } }