Skip to main content

deployment_runs

Creates, updates, deletes, gets or lists a deployment_runs resource.

Overview​

Namedeployment_runs
TypeResource
Idanthropic.deployments.deployment_runs

Fields​

The following fields are returned by SELECT queries:

Successful response (OK)

NameDatatypeDescription
idstringUnique identifier for this run (`drun_...`).
deployment_idstringID of the deployment that produced this run.
session_idstringPopulated on success. Null on creation failure. Exactly one of `session_id` or `error` is non-null.
▶agentobjectSnapshot of the agent at fire time. Always fully resolved — deployments pin agent + version.
created_atstring (date-time)Time this run record was persisted.
▶errorobjectPopulated on creation failure. Null on success. Exactly one of `session_id` or `error` is non-null.
▶trigger_contextobjectWhat triggered this run and trigger-specific metadata.
typestring (deployment_run)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdeployment_run_idanthropic-workspace-id
listselectdeployment_id, trigger_type, has_error, created_at[gte], created_at[lte], created_at[gt], created_at[lt], anthropic-workspace-id

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.

NameDatatypeDescription
deployment_run_idstringPath parameter deployment_run_id
anthropic-workspace-idstringOptional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy). Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace. (example: wrkspc_011CZkZaBF1tNoB5wlCeusgy)
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_idstringFilter 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_errorbooleanFilter: true for runs with non-null error, false for runs with non-null session_id. Omit for all.
trigger_typestringFilter runs by what triggered them. Omit to return all runs.

SELECT examples​

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
AND "anthropic-workspace-id" = '{{ anthropic-workspace-id }}'
;