-
Notifications
You must be signed in to change notification settings - Fork 1
Migrate from Import APIs to standard Create/Update APIs #90
Description
Problem
The CLI currently uses the Dash0 Import APIs (POST /api/import/*) for all asset creation, both in the create subcommands and in apply.
The Import API documentation explicitly states:
This endpoint is not recommended for Infrastructure-as-Code (IaC) workflows.
Using it in IaC scenarios can cause configuration drift and inconsistencies between your source configuration and the imported dashboard state.
The import endpoints are intended for one-time migrations, not ongoing asset management — which is exactly what the CLI does.
Current state
| Operation | API used | Should use |
|---|---|---|
dashboards create |
POST /api/import/dashboard |
POST /api/dashboards |
check-rules create |
POST /api/import/check-rule |
POST /api/alerting/check-rules |
views create |
POST /api/import/view |
POST /api/views |
synthetic-checks create |
POST /api/import/synthetic-check |
POST /api/synthetic-checks |
apply (create path) |
POST /api/import/* |
POST /api/* (standard create) |
* update |
PUT /api/* (standard update) |
PUT /api/* (already correct) |
The update commands already use the standard CRUD endpoints directly.
The list, get, and delete commands also use standard endpoints.
Only the create path (used by both create subcommands and apply) routes through the Import API.