Executions

Manage workflow executions. An execution represents a single run of a workflow (referred to as "app" in the endpoint paths), containing inputs, outputs, status, and runtime information. Use these endpoints to execute workflows, check execution status, cancel, retry, or provide feedback on executions.

Retrieve an execution

get

Returns the execution with the given UUID. Use this endpoint to check the status, inputs, outputs, and other details of an execution.

Authorizations
Path parameters
execution_uuidstring · uuidRequired

The execution uuid

Example: c3405f16-d0e8-4d5c-8ad9-85ef332c44ee
Responses
200

Execution found

application/json
get
GET /public_api/airops_apps/executions/{execution_uuid} HTTP/1.1
Host: api.airops.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": 22,
  "status": "success",
  "airops_apps_version_id": 21,
  "conversation_id": 23,
  "credits_used": 34,
  "error_code": null,
  "error_message": null,
  "feedback": "positive",
  "inputs": {
    "name": "John Doe"
  },
  "output": {
    "greet": "Hello John Doe!"
  },
  "runtime": 34,
  "source": null,
  "uuid": "c3405f16-d0e8-4d5c-8ad9-85ef332c44ee",
  "workspace_id": 1,
  "createdAt": "2024-02-01T16:39:28.161Z",
  "updatedAt": "2024-02-01T16:39:28.161Z"
}

Execute an app synchronously

post

Execute an app and get the output immediately. This endpoint executes the app synchronously and returns the result.

Preconditions: The app must be published.

Important: This endpoint executes the app immediately and returns the result, unless you are at your current capacity, or your app takes more than 10 minutes to run, in which case it will fail.

If you want to execute an app asynchronously, use the async_execute endpoint instead.

Authorizations
Path parameters
app_uuidstring · uuidRequired

The app uuid

Example: 6d2f4e0b-1a1d-49ae-8034-ba56f932119e
Body
version_slugintegerOptional

The version of the app (will use the default version if not provided)

Example: 12
inputsobjectRequired

The inputs of the app

Example: {"name":"John Doe"}
Responses
200

Execution created

application/json
post
POST /public_api/airops_apps/{app_uuid}/execute HTTP/1.1
Host: api.airops.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "inputs": {
    "name": "John Doe"
  }
}
{
  "id": 22,
  "status": "success",
  "airops_apps_version_id": 21,
  "conversation_id": 23,
  "credits_used": 34,
  "error_code": null,
  "error_message": null,
  "feedback": "positive",
  "inputs": {
    "name": "John Doe"
  },
  "output": {
    "greet": "Hello John Doe!"
  },
  "runtime": 34,
  "source": null,
  "uuid": "c3405f16-d0e8-4d5c-8ad9-85ef332c44ee",
  "workspace_id": 1,
  "createdAt": "2024-02-01T16:39:28.161Z",
  "updatedAt": "2024-02-01T16:39:28.161Z"
}

Execute an app asynchronously

post

Execute an app asynchronously and get the execution ID to check the status of the execution.

Preconditions: The app must be published.

Note: Executions created through this endpoint will be queued and executed at your workspace's capacity.

If you want to execute an app immediately, use the execute endpoint instead.

Authorizations
Path parameters
app_uuidstring · uuidRequired

The unique identifier (UUID) for the app. You can find this in your app's Integrate section.

Example: 6d2f4e0b-1a1d-49ae-8034-ba56f932119e
Body
version_slugintegerOptional

The version of the app (will use the default version if not provided)

Example: 12
inputsobjectRequired

The inputs of the app

Example: {"name":"John Doe"}
Responses
200

Execution created

application/json
post
POST /public_api/airops_apps/{app_uuid}/async_execute HTTP/1.1
Host: api.airops.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "inputs": {
    "name": "John Doe"
  }
}
{
  "id": 22,
  "status": "pending",
  "airops_apps_version_id": 21,
  "conversation_id": null,
  "credits_used": 34,
  "error_code": null,
  "error_message": null,
  "feedback": null,
  "inputs": {
    "name": "John Doe"
  },
  "output": null,
  "runtime": null,
  "source": null,
  "uuid": "c3405f16-d0e8-4d5c-8ad9-85ef332c44ee",
  "workspace_id": 1,
  "createdAt": "2024-02-01T16:39:28.161Z",
  "updatedAt": "2024-02-01T16:39:28.161Z"
}

Execute a workflow definition synchronously

post

Execute a custom workflow definition synchronously. Use this endpoint to define and execute a workflow on-the-fly with custom steps.

Preconditions: The app must be published.

Important: This endpoint executes the workflow immediately and returns the result, unless you are at your current capacity, or your workflow takes more than 10 minutes to run, in which case it will fail.

If you want to execute a workflow definition asynchronously, use the async_execute_definition endpoint instead.

Authorizations
Path parameters
app_uuidstring · uuidRequired

The app uuid

Example: 6d2f4e0b-1a1d-49ae-8034-ba56f932119e
Body
inputsobjectRequired

The inputs of the workflow

Example: {"name":"John Doe"}
Responses
200

Execution created

application/json
post
POST /public_api/airops_apps/{app_uuid}/execute_definition HTTP/1.1
Host: api.airops.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 734

{
  "inputs": {
    "name": "John Doe"
  },
  "inputs_schema": [
    {
      "interface": "long_text",
      "label": "Name",
      "name": "name",
      "hint": "Enter your name",
      "required": true,
      "group_id": "no-group",
      "action_id": "name",
      "placeholder": "Enter your name",
      "test_value": "John Doe",
      "options": []
    }
  ],
  "definition": [
    {
      "name": "step_1",
      "type": "llm",
      "config": {
        "model": "gpt-3.5-turbo-instruct",
        "soft_fail": false,
        "config": {
          "prompt": "Provide a nickname for {{inputs.name}}",
          "request_consistent_results": true,
          "response_format": "text",
          "stream": false,
          "temperature": 0.5,
          "note": "",
          "model_source": "airops",
          "max_tokens": 100
        }
      }
    },
    {
      "name": "step_2",
      "type": "app",
      "config": {
        "app_id": 1,
        "inputs": {
          "name": "{{step_1.output}}"
        }
      }
    },
    {
      "name": "step_3",
      "type": "text",
      "config": {
        "text": "Hello {{step_2.output}}!"
      }
    }
  ]
}
{
  "id": 22,
  "status": "success",
  "airops_apps_version_id": 21,
  "conversation_id": 23,
  "credits_used": 34,
  "error_code": null,
  "error_message": null,
  "feedback": "positive",
  "inputs": {
    "name": "John Doe"
  },
  "output": {
    "greet": "Hello John Doe!"
  },
  "runtime": 34,
  "source": null,
  "uuid": "c3405f16-d0e8-4d5c-8ad9-85ef332c44ee",
  "workspace_id": 1,
  "createdAt": "2024-02-01T16:39:28.161Z",
  "updatedAt": "2024-02-01T16:39:28.161Z"
}

Execute a workflow definition asynchronously

post

Execute a custom workflow definition asynchronously. Use this endpoint to define and execute a workflow on-the-fly with custom steps.

Preconditions: The app must be published.

Note: Executions created through this endpoint will be queued and executed at your workspace's capacity.

If you want to execute a workflow definition immediately, use the execute_definition endpoint instead.

Authorizations
Path parameters
app_uuidstring · uuidRequired

The unique identifier (UUID) for the app. You can find this in your app's Integrate section.

Example: 6d2f4e0b-1a1d-49ae-8034-ba56f932119e
Body
inputsobjectRequired

The inputs of the workflow

Example: {"name":"John Doe"}
Responses
200

Execution created

application/json
post
POST /public_api/airops_apps/{app_uuid}/async_execute_definition HTTP/1.1
Host: api.airops.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 734

{
  "inputs": {
    "name": "John Doe"
  },
  "inputs_schema": [
    {
      "interface": "long_text",
      "label": "Name",
      "name": "name",
      "hint": "Enter your name",
      "required": true,
      "group_id": "no-group",
      "action_id": "name",
      "placeholder": "Enter your name",
      "test_value": "John Doe",
      "options": []
    }
  ],
  "definition": [
    {
      "name": "step_1",
      "type": "llm",
      "config": {
        "model": "gpt-3.5-turbo-instruct",
        "soft_fail": false,
        "config": {
          "prompt": "Provide a nickname for {{inputs.name}}",
          "request_consistent_results": true,
          "response_format": "text",
          "stream": false,
          "temperature": 0.5,
          "note": "",
          "model_source": "airops",
          "max_tokens": 100
        }
      }
    },
    {
      "name": "step_2",
      "type": "app",
      "config": {
        "app_id": 1,
        "inputs": {
          "name": "{{step_1.output}}"
        }
      }
    },
    {
      "name": "step_3",
      "type": "text",
      "config": {
        "text": "Hello {{step_2.output}}!"
      }
    }
  ]
}
{
  "id": 22,
  "status": "pending",
  "airops_apps_version_id": 21,
  "conversation_id": null,
  "credits_used": 34,
  "error_code": null,
  "error_message": null,
  "feedback": null,
  "inputs": {
    "name": "John Doe"
  },
  "output": null,
  "runtime": null,
  "source": null,
  "uuid": "c3405f16-d0e8-4d5c-8ad9-85ef332c44ee",
  "workspace_id": 1,
  "createdAt": "2024-02-01T16:39:28.161Z",
  "updatedAt": "2024-02-01T16:39:28.161Z"
}

Execute via webhook (asynchronous)

post

Execute an app asynchronously as a webhook for external services. The request payload will be mapped to the first input of your app.

Preconditions: The app must be published.

Learn More: See Webhook Documentation for detailed information.

Path parameters
app_uuidstring · uuidRequired

The unique identifier (UUID) for the app. You can find this in your app's Integrate section.

Example: 6d2f4e0b-1a1d-49ae-8034-ba56f932119e
Query parameters
auth_tokenstringRequired

Your workspace API key

Example: 23iu3h23-34n43yib4-3243n34b4-34n434h
Body
version_slugintegerOptional

The version of the app (will use the default version if not provided)

Example: 12
inputsobjectRequired

The inputs of the app

Example: {"name":"John Doe"}
Responses
200

Execution created

application/json
post
POST /public_api/airops_apps/{app_uuid}/webhook_async_execute?auth_token=23iu3h23-34n43yib4-3243n34b4-34n434h HTTP/1.1
Host: api.airops.com
Content-Type: application/json
Accept: */*
Content-Length: 30

{
  "inputs": {
    "name": "John Doe"
  }
}
[
  {
    "id": 22,
    "status": "success",
    "airops_apps_version_id": 21,
    "conversation_id": 23,
    "credits_used": 34,
    "error_code": null,
    "error_message": null,
    "feedback": "positive",
    "inputs": {
      "name": "John Doe"
    },
    "output": {
      "greet": "Hello John Doe!"
    },
    "runtime": 34,
    "source": null,
    "uuid": "c3405f16-d0e8-4d5c-8ad9-85ef332c44ee",
    "workspace_id": 1,
    "createdAt": "2024-02-01T16:39:28.161Z",
    "updatedAt": "2024-02-01T16:39:28.161Z"
  }
]

Cancel an execution

patch

Cancel a pending or running execution.

Preconditions: The execution must be in pending or running status.

Authorizations
Path parameters
execution_uuidstring · uuidRequired

The unique identifier (UUID) for the execution.

Example: c3405f16-d0e8-4d5c-8ad9-85ef332c44ee
Responses
204

Execution cancelled

No content

patch
PATCH /public_api/airops_apps/executions/{execution_uuid}/cancel HTTP/1.1
Host: api.airops.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Retry an execution

post

Retry a failed execution from the last failed step.

Preconditions: The execution must be in error status.

Authorizations
Path parameters
execution_uuidstring · uuidRequired

The unique identifier (UUID) for the execution.

Example: c3405f16-d0e8-4d5c-8ad9-85ef332c44ee
Responses
204

Execution retried

No content

post
POST /public_api/airops_apps/executions/{execution_uuid}/retry HTTP/1.1
Host: api.airops.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Rate an execution

patch

Provide feedback (positive, neutral, or negative) for a completed execution.

Preconditions: The execution must be in success status.

Authorizations
Path parameters
execution_uuidstring · uuidRequired

The unique identifier (UUID) for the execution.

Example: c3405f16-d0e8-4d5c-8ad9-85ef332c44ee
Body
feedbackstring · enumRequired

The feedback of the execution

Example: positivePossible values:
Responses
204

Feedback sent

No content

patch
PATCH /public_api/airops_apps/executions/{execution_uuid}/feedback HTTP/1.1
Host: api.airops.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 23

{
  "feedback": "positive"
}

No content

Retrieve all executions for an Airops app

get

Returns all the executions for a given Airops app. You can use this endpoint to check the status/input/output of all the executions.

Authorizations
Query parameters
airops_app_idintegerRequired

The Airops app ID to fetch executions from

cursorstringOptional

The cursor value to use for pagination

itemsinteger · min: 1 · max: 100Optional

The amount of items to fetch

Example: 10
Responses
200

Executions found

application/json
get
GET /public_api/airops_apps/:airops_app_id/executions?airops_app_id=1 HTTP/1.1
Host: api.airops.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "data": [
      {
        "id": 22,
        "status": "success",
        "airops_apps_version_id": 21,
        "conversation_id": 23,
        "credits_used": 34,
        "error_code": null,
        "error_message": null,
        "feedback": "positive",
        "inputs": {
          "name": "John Doe"
        },
        "output": {
          "greet": "Hello John Doe!"
        },
        "runtime": 34,
        "source": null,
        "uuid": "c3405f16-d0e8-4d5c-8ad9-85ef332c44ee",
        "workspace_id": 1,
        "createdAt": "2024-02-01T16:39:28.161Z",
        "updatedAt": "2024-02-01T16:39:28.161Z"
      }
    ],
    "meta": {
      "count": 2,
      "has_more": true,
      "cursor": 22
    }
  }
]

Was this helpful?