Import a view
/api/import/viewThis endpoint allows you to import an existing view into your organization. It's intended for one-time migrations rather than ongoing view management. Unlike the standard API, this endpoint supports importing views with full editability, allowing you to modify views that were previously created elsewhere. Note: 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 view state. Importing a view without an id will create a new view and return the created asset with a generated id. Importing a view with an existing id (metadata>dash0Extensions>id) will override the corresponding view definition. In case there is no view with the given id a new view will be created.
Parameters 1
datasetqueryOptional dataset to query across. Defaults to whatever is configured to be the default dataset for the organization.
"^[a-zA-Z0-9_-]{3,26}$"Sample request1234567891011121314151617181920212223242526272829curl --request POST 'https://api.eu-west-1.aws.dash0.com/api/import/view' \--header "Authorization: Bearer ${DASH0_AUTH_TOKEN}" \--header 'Content-Type: application/json' \--data-raw '{"kind": "Dash0View","metadata": {"name": "Example"},"spec": {"type": "resources","display": {"name": "Example"},"filter": [{"key": "service.name","operator": "is","value": "shop"}],"implicitFilter": [{"key": "service.name","operator": "is","value": "shop"}]}}'
Request body required
Responses
The imported view.