Move a document to the trash in Dynatrace with the Document API, using optimistic locking to protect against accidental deletion.
| DELETE | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/document/v1/documents/{id} |
You pass the document id and the required optimistic-locking-version query parameter, and can also use admin-access. The response confirms the document was deleted, and the document becomes inaccessible until restored from the trash.
To execute this request, you need a platform token or OAuth access token with document:documents:delete scope. To learn how to obtain and use it, see Tokens and authentication.
| Parameter | Type | Description | In | Required |
|---|---|---|---|---|
| id | string | System-generated or user-given id of a document. | path | Required |
| optimistic-locking-version | string | To protect users from accidental overrides, the current version of the document must match the optimistic locking version parameter - otherwise, this request will fail and the entity is left unchanged. | query | Required |
| admin-access | boolean | Indicates whether the operation should be performed with elevated permissions - additionally requires document:documents:admin. If provided, the user effectively operates as owner of all documents. This isn't supported for ready-made documents. | query | Optional |
| Code | Description |
|---|---|
| 204 | - |
| 400 | - |
| 401 | - |
| 403 | - |
| 404 | - |
| 409 | - |
| 500 | - |
| 503 | - |
| default | - |