External assets REST API reference
As Dagster doesn't control scheduling or materializing external assets, it's up to you to keep their metadata updated. Use the endpoints described in this reference to report updates for external assets back to Dagster.
API functionality
Using the External Asset APIs, you can:
- Report an
AssetMaterializationevent for an external asset to Dagster - Report an
asset_checkevaluation for an external asset to Dagster - Report an
AssetObservationevent for an external asset to Dagster
Authentication
Authentication is required only if requests are being made against a Dagster+ instance. To authenticate, provide a valid Dagster+ user token using the Dagster-Cloud-Api-Token header:
curl --request POST \
--url https://{ORGANIZATION}.dagster.cloud/{deployment_name}/report_asset_materialization/ \
--header 'Content-Type: application/json' \
--header 'Dagster-Cloud-Api-Token: {TOKEN}' \
--data '{
"asset_key": "{ASSET_KEY}",
"metadata": {
"rows": 10
},
}'
Constructing request URLs
The full URL you send requests to will vary depending on how you access your Dagster instance:
| Location | URL | Example request URL |
|---|---|---|
| Local webserver | Defaults to localhost:3000 | localhost:3000/report_asset_check |
| Dagster+ | {ORGANIZATION}.dagster.plus/{DEPLOYMENT_NAME} | https://my-org.dagster.plus/prod/report_asset_check |
| Open source deployment | URL of the Dagster webserver | https://dagster.my-org.com/report_asset_check |
Available APIs
| Endpoint | Description |
|---|---|
POST /report_asset_materialization/ | Records an AssetMaterialization event for an external asset. |
POST /report_asset_check/ | Records an asset_check evaluation for an external asset. |
POST /report_asset_observation/ | Records an AssetObservation event for an external asset. |