Chalk home page
Docs
API
CLI
  1. Resolvers
  2. Triggered Runs

In addition to scheduling resolver executions, Chalk allows you to trigger resolver executions programmatically via the REST API. Using the trigger API endpoint allows you to build custom integrations with other data orchestration tools like Airflow.

The trigger endpoint will return within 300 seconds, even if the triggered run takes longer to execute. If the returned status is received, you should poll the v1/runs/{id} endpoint until status transitions to succeeded or failed.

Note: if you use a user-scoped token (i.e. one that’s derived from chalk login) you will need to specify the environment in which to trigger your resolver via the X-Chalk-Env-id header.

Trigger a run

POST
https://api.chalk.ai/v1/runs/trigger
Request Body
resolver_fqnstring
The fully qualified name of the resolver to trigger. Example: 'neobank.resolvers.offline_get_transactions'.

Response

Attributes
idstring
ID of the relevant run.
statusenum
One of 'received', 'succeeded', or 'failed'

Example

curl -XPOST -H "Authorization: Bearer $(chalk token)" \
     -H "X-Chalk-Env-Id: <your-environment-id>" \
     -H "Content-Type: application/json" \
     https://api.chalk.ai/v1/runs/trigger \
     -d '{ "resolver_fqn": "neobank.resolvers.offline_get_transactions" }'

# Returns

{
  "id": "<run-id>",
  "status": "succeeded"
}

Query run status

GET
https://api.chalk.ai/v1/runs/:id
Attributes
id
URL Param. ID of the relevant run.

Response

Attributes
idstring
ID of the relevant run.
statusenum
One of 'received', 'succeeded', or 'failed'

Example

curI -H "Authorization: Bearer $(chalk token)" \
     -H "X-Chalk-Env-Id: <your-environment-id>" \
     https://api.chalk.ai/v1/runs/{run_id}