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_id
listselectdeployment_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.

NameDatatypeDescription
deployment_run_idstringPath 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_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
;