Runs

Trigger and manage process runs. Start new runs and view details about run executions.

List Runs

get

Get a list of all the runs for a specified process and agent.

Authorizations
Query parameters
process_idstringRequired

The unique identifier of the process.

agent_idstringRequired

The unique identifier of the agent.

limitany ofOptional

Maximum number of items to return.

Default: 10
integer · max: 100Optional
or
nullOptional
stageany ofOptional

The process stage.

string · enumOptional

Stage of a process

Possible values:
or
nullOptional
continuation_tokenany ofOptional

Pagination token used to retrieve the next page of results. It is returned in a prior response from a call made to this endpoint.

stringOptional
or
nullOptional
Responses
200
A List of runs
application/json
get
GET /v2/runs HTTP/1.1
Host: rest-api.app.kognitos.com
x-api-key: YOUR_API_KEY
Accept: */*
{
  "continuation_token": "text",
  "items": [
    {
      "field1": "...",
      "id": "<resource-id>",
      "name": "user provided name"
    }
  ]
}

Start a Run

post

Initiates a new run (execution) of a specified process. Each run is an independent instance that can be tracked for status and results.

Authorizations
Body
agent_idstring · min: 1 · max: 26Required

The ID of the agent containing the process

Example: b4fznghynbdemslfd5k044fgdPattern: ^[a-zA-Z0-9-_]+$
file_idsany ofOptional

List of IDs of files given as input to the process

Example: ["b4fznghynbdemslfd5k044fgd","9nvx1hdm9bd74rp585oe81t5i"]
string[]Optional
or
nullOptional
inputsany ofOptional

Inputs to the process

Example: [{"name":"order_id","value":"b4fznghynbdemslfd5k044fgd"}]
or
nullOptional
namestring · min: 1 · max: 100Required

Name for this run

Example: Process invoice 42
process_idstring · min: 1 · max: 26Required

The ID of the process to run

Example: b4fznghynbdemslfd5k044fgdPattern: ^[a-zA-Z0-9-_]+$
stagestring · enumRequired

The stage of the process

Example: DraftPossible values:
Responses
201
The run created
application/json
post
POST /v2/runs HTTP/1.1
Host: rest-api.app.kognitos.com
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 261

{
  "agent_id": "b4fznghynbdemslfd5k044fgd",
  "file_ids": [
    "b4fznghynbdemslfd5k044fgd",
    "9nvx1hdm9bd74rp585oe81t5i"
  ],
  "inputs": [
    {
      "name": "order_id",
      "value": "b4fznghynbdemslfd5k044fgd"
    }
  ],
  "name": "Process invoice 42",
  "process_id": "b4fznghynbdemslfd5k044fgd",
  "stage": "Draft"
}
{
  "agent_id": "b4fznghynbdemslfd5k044fgd",
  "created_at": "2021-01-01T12:00:00",
  "file_ids": [
    "b4fznghynbdemslfd5k044fgd",
    "9nvx1hdm9bd74rp585oe81t5i"
  ],
  "id": "b4fznghynbdemslfd5k044fgd",
  "name": "Process invoice",
  "outputs": [
    {
      "name": "total_items",
      "value": 42
    },
    {
      "name": "customer_id",
      "value": "9nvx1hdm9bd74rp585oe81t5i"
    }
  ],
  "process_id": "b4fznghynbdemslfd5k044fgd",
  "stage": "Draft",
  "status": "Created"
}

Get Run

get

Get the details of a specific run.

Authorizations
Path parameters
run_idstringRequired

The unique identifier of the run.

Responses
200
The requested run
application/json
get
GET /v2/runs/{run_id} HTTP/1.1
Host: rest-api.app.kognitos.com
x-api-key: YOUR_API_KEY
Accept: */*
{
  "agent_id": "b4fznghynbdemslfd5k044fgd",
  "created_at": "2021-01-01T12:00:00",
  "file_ids": [
    "b4fznghynbdemslfd5k044fgd",
    "9nvx1hdm9bd74rp585oe81t5i"
  ],
  "id": "b4fznghynbdemslfd5k044fgd",
  "name": "Process invoice",
  "outputs": [
    {
      "name": "total_items",
      "value": 42
    },
    {
      "name": "customer_id",
      "value": "9nvx1hdm9bd74rp585oe81t5i"
    }
  ],
  "process_id": "b4fznghynbdemslfd5k044fgd",
  "stage": "Draft",
  "status": "Created"
}

Was this helpful?