Skip to main content

dg api reference

dg api

Make REST-like API calls to Dagster Plus.

dg api [OPTIONS] COMMAND [ARGS]...

agent

Manage agents in Dagster Plus.

dg api agent [OPTIONS] COMMAND [ARGS]...

get

Get detailed information about a specific agent.

dg api agent get [OPTIONS] AGENT_ID

Options:

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Arguments:

AGENT_ID

Required argument

Environment variables:

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

list

List all agents in the organization.

dg api agent list [OPTIONS]

Options:

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Environment variables:

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

asset

Manage assets in Dagster Plus.

dg api asset [OPTIONS] COMMAND [ARGS]...

get

Get specific asset details.

dg api asset get [OPTIONS] ASSET_KEY

Options:

--status

Include health and runtime status information

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-d, --deployment <deployment>

Deployment to target.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Arguments:

ASSET_KEY

Required argument

Environment variables:

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

get-evaluations

Get automation condition evaluation records for an asset.

Evaluations are only recorded when at least one subcondition has a different value than the previous evaluation.

dg api asset get-evaluations [OPTIONS] ASSET_KEY

Options:

--limit <limit>

Max evaluations to return (default: 50, max: 1000)

--cursor <cursor>

Cursor for pagination (evaluation ID)

--include-nodes

Include the condition evaluation node tree (verbose)

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-d, --deployment <deployment>

Deployment to target.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Arguments:

ASSET_KEY

Required argument

Environment variables:

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

get-events

Get materialization and observation events for an asset.

dg api asset get-events [OPTIONS] ASSET_KEY

Options:

--event-type <event_type>

Filter by event type (default: both)

Options: ASSET_MATERIALIZATION | ASSET_OBSERVATION

--limit <limit>

Max events to return (default: 50, max: 1000)

--before <before>

Events before this ISO timestamp (e.g. 2024-01-15T00:00:00)

--partition <partitions>

Filter by partition key (repeatable)

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-d, --deployment <deployment>

Deployment to target.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Arguments:

ASSET_KEY

Required argument

Environment variables:

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

list

List assets with pagination.

dg api asset list [OPTIONS]

Options:

--limit <limit>

Number of assets to return (default: 50, max: 1000)

--cursor <cursor>

Cursor for pagination

--status

Include health and runtime status information

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-d, --deployment <deployment>

Deployment to target.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Environment variables:

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

deployment

Manage deployments in Dagster Plus.

dg api deployment [OPTIONS] COMMAND [ARGS]...

get

Show detailed information about a specific deployment.

dg api deployment get [OPTIONS] NAME

Options:

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Arguments:

NAME

Required argument

Environment variables:

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

list

List all deployments in the organization.

dg api deployment list [OPTIONS]

Options:

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Environment variables:

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

run

Manage runs in Dagster Plus.

dg api run [OPTIONS] COMMAND [ARGS]...

get

Get run metadata by ID.

dg api run get [OPTIONS] RUN_ID

Options:

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-d, --deployment <deployment>

Deployment to target.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Arguments:

RUN_ID

Required argument

Environment variables:

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

get-events

Get execution log events for a specific run ID.

dg api run get-events [OPTIONS] RUN_ID

Options:

--level <levels>

Filter by log level (DEBUG, INFO, WARNING, ERROR, CRITICAL). Repeatable.

--event-type <event_types>

Filter by event type (e.g. STEP_FAILURE, RUN_START). Repeatable.

--step <step_keys>

Filter by step key (partial matching). Repeatable.

--limit <limit>

Maximum number of log entries to return

--cursor <after_cursor>

Pagination cursor for retrieving more logs

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-d, --deployment <deployment>

Deployment to target.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Arguments:

RUN_ID

Required argument

Environment variables:

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

list

List runs with optional filtering and pagination.

dg api run list [OPTIONS]

Options:

--limit <limit>

Number of runs to return (default: 50, max: 1000)

--cursor <cursor>

Cursor for pagination (run ID)

--status <statuses>

Filter by run status. Repeatable.

Options: QUEUED | STARTING | STARTED | SUCCESS | FAILURE | CANCELING | CANCELED

--job <job_name>

Filter by job name

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-d, --deployment <deployment>

Deployment to target.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Environment variables:

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

schedule

Manage schedules in Dagster Plus.

dg api schedule [OPTIONS] COMMAND [ARGS]...

get

Get specific schedule details.

dg api schedule get [OPTIONS] SCHEDULE_NAME

Options:

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-d, --deployment <deployment>

Deployment to target.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Arguments:

SCHEDULE_NAME

Required argument

Environment variables:

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

list

List schedules in the deployment.

dg api schedule list [OPTIONS]

Options:

--status <status>

Filter schedules by status

Options: RUNNING | STOPPED

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-d, --deployment <deployment>

Deployment to target.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Environment variables:

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

secret

Manage secrets in Dagster Plus.

Secrets are environment variables that are encrypted and securely stored in Dagster Plus. They can be scoped to different deployment levels and code locations.

Security Note: Secret values are hidden by default. Use appropriate flags and caution when displaying sensitive values.

dg api secret [OPTIONS] COMMAND [ARGS]...

get

Get details for a specific secret.

By default, the secret value is not shown for security reasons. Use –show-value flag to display the actual secret value.

WARNING: When using –show-value, the secret will be visible in your terminal and may be stored in shell history. Use with caution.

dg api secret get [OPTIONS] SECRET_NAME

Options:

--location <location>

Filter by code location name

--show-value

Include secret value in output (use with caution - values will be visible in terminal)

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Arguments:

SECRET_NAME

Required argument

Environment variables:

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

list

List secrets in the organization.

By default, secret values are not shown for security reasons. Use ‘dg api secret get NAME –show-value’ to view specific values.

dg api secret list [OPTIONS]

Options:

--location <location>

Filter secrets by code location name

--scope <scope>

Filter secrets by scope

Options: deployment | organization

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Environment variables:

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

sensor

Manage sensors in Dagster Plus.

dg api sensor [OPTIONS] COMMAND [ARGS]...

get

Get specific sensor details.

dg api sensor get [OPTIONS] SENSOR_NAME

Options:

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-d, --deployment <deployment>

Deployment to target.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Arguments:

SENSOR_NAME

Required argument

Environment variables:

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token

list

List sensors in the deployment.

dg api sensor list [OPTIONS]

Options:

--status <status>

Filter sensors by status

Options: RUNNING | STOPPED | PAUSED

--json

Output in JSON format for machine readability

--response-schema

Print the JSON Schema of the response model and exit.

-d, --deployment <deployment>

Deployment to target.

-o, --organization <organization>

Organization to target.

--api-token <api_token>

Dagster Cloud API token.

--view-graphql

Print GraphQL queries and responses to stderr for debugging.

Environment variables:

DAGSTER_CLOUD_DEPLOYMENT

Provide a default for --deployment

DAGSTER_CLOUD_ORGANIZATION

Provide a default for --organization

DAGSTER_CLOUD_API_TOKEN

Provide a default for --api-token