deployment_runs
Creates, updates, deletes, gets or lists a deployment_runs resource.
Overview
| Name | deployment_runs |
| Type | Resource |
| Id | anthropic.deployments.deployment_runs |
Fields
The following fields are returned by SELECT queries:
- get
- list
Successful response (OK)
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier for this run (`drun_...`). |
deployment_id | string | ID of the deployment that produced this run. |
session_id | string | Populated on success. Null on creation failure. Exactly one of session_id or error is non-null. |
agent | object | Snapshot of the agent at fire time. Always fully resolved — deployments pin agent + version. |
created_at | string (date-time) | Time this run record was persisted. |
error | object | Populated on creation failure. Null on success. Exactly one of session_id or error is non-null. |
trigger_context | object | What triggered this run and trigger-specific metadata. |
type | string | (deployment_run) |
Successful response (OK)
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier for this run (`drun_...`). |
deployment_id | string | ID of the deployment that produced this run. |
session_id | string | Populated on success. Null on creation failure. Exactly one of session_id or error is non-null. |
agent | object | Snapshot of the agent at fire time. Always fully resolved — deployments pin agent + version. |
created_at | string (date-time) | Time this run record was persisted. |
error | object | Populated on creation failure. Null on success. Exactly one of session_id or error is non-null. |
trigger_context | object | What triggered this run and trigger-specific metadata. |
type | string | (deployment_run) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | deployment_run_id | ||
list | select | deployment_id, trigger_type, has_error, created_at[gte], created_at[lte], created_at[gt], created_at[lt] |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
deployment_run_id | string | Path parameter deployment_run_id |
created_at[gt] | string (date-time) | Return runs created strictly after this time (exclusive). |
created_at[gte] | string (date-time) | Return runs created at or after this time (inclusive). |
created_at[lt] | string (date-time) | Return runs created strictly before this time (exclusive). |
created_at[lte] | string (date-time) | Return runs created at or before this time (inclusive). |
deployment_id | string | Filter to a specific deployment. Omit to list across all deployments in the workspace. Filtering by a non-existent deployment_id returns 200 with empty data. |
has_error | boolean | Filter: true for runs with non-null error, false for runs with non-null session_id. Omit for all. |
trigger_type | string | Filter runs by what triggered them. Omit to return all runs. |
SELECT examples
- get
- list
Successful response (OK)
SELECT
id,
deployment_id,
session_id,
agent,
created_at,
error,
trigger_context,
type
FROM anthropic.deployments.deployment_runs
WHERE deployment_run_id = '{{ deployment_run_id }}' -- required
;
Successful response (OK)
SELECT
id,
deployment_id,
session_id,
agent,
created_at,
error,
trigger_context,
type
FROM anthropic.deployments.deployment_runs
WHERE deployment_id = '{{ deployment_id }}'
AND trigger_type = '{{ trigger_type }}'
AND has_error = '{{ has_error }}'
AND "created_at[gte]" = '{{ created_at[gte] }}'
AND "created_at[lte]" = '{{ created_at[lte] }}'
AND "created_at[gt]" = '{{ created_at[gt] }}'
AND "created_at[lt]" = '{{ created_at[lt] }}'
;