v1

latestOpenAPI 3.1.02026-07-2675394318.9 KB
datasets

Run operation

Create an operation

post/v1/operations

Request body

OR
OR
OR
OR
OR
OR

Example request

{
  "params": {
    "query": "SELECT * FROM {src0} WHERE condition"
  },
  "src": [
    {
      "id": "4d89c87498354518b92fa02fc0ad8720",
      "version": "0ed2d94b38fb40b9b61f6a",
      "mapping": {
        "messages": {
          "value": "constant_value"
        },
        "max_tokens": {
          "value": 1000
        },
        "custom_id": {
          "name": "messages"
        }
      }
    }
  ],
  "dst": [
    {
      "id": "4d89c87498354518b92fa02fc0ad8720",
      "version": "0ed2d94b38fb40b9b61f6a"
    }
  ],
  "ai_project_id": "example_project"
}

Response

Successful Response

idstring required

Operation id

type'yql' | 'materialize_history' | 'batch_inference' | 'finetuning' | 'file_to_dataset' | 'dataset_to_file' | 'merge' required
status'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'unknown' required
created_atinteger required

The Unix timestamp (in seconds) for when the operation was created.

in_progress_atinteger nullable

The Unix timestamp (in seconds) for when the operation started processing.

finished_atinteger nullable

The Unix timestamp (in seconds) for when the operation was completed.

ai_project_idstring nullable

AI Studio project ID to associate with the dataset.

Example response

{
  "id": "3a3fd2317bbe4b3bb9842bc1b5275eb9",
  "params": {
    "query": "SELECT * FROM {src0} WHERE condition"
  },
  "src": [
    {
      "id": "4d89c87498354518b92fa02fc0ad8720",
      "version": "0ed2d94b38fb40b9b61f6a",
      "mapping": {
        "messages": {
          "value": "constant_value"
        },
        "max_tokens": {
          "value": 1000
        },
        "custom_id": {
          "name": "messages"
        }
      }
    }
  ],
  "dst": [
    {
      "id": "4d89c87498354518b92fa02fc0ad8720",
      "version": "0ed2d94b38fb40b9b61f6a"
    }
  ],
  "created_at": 1614807352,
  "in_progress_at": 1614807352,
  "finished_at": 1614807352,
  "ai_project_id": "example_project"
}