Replace document content in Dynatrace with the Document API, updating the full file and its content type with optimistic locking.
| PUT | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/document/v1/documents/{id}/content |
Update a document's content, by completely replacing it.
The document must be accessible to you - therefore, you must either own it or you have received access through sharing.
Optimistic locking is enforced via the optimistic-locking-version parameter.
The content size must be greater than 0 and must not exceed 50 MB.
The Content-Type header must be set for the multipart part; it will be used as the (new) content type of the document. Illegal (non-mime-type) content types result in a 400 - Bad Request error.
The Content-Disposition header must be set for the multipart part;
To execute this request, you need a platform token or OAuth access token with document:documents:write 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 |
| body | object | - | body | Required |
RequestBody object| Element | Type | Description | Required |
|---|---|---|---|
| content | string | - | Required |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"content": "string"}
| Code | Description |
|---|---|
| 200 | - |
| 400 | - |
| 401 | - |
| 403 | - |
| 404 | - |
| 409 | - |
| 413 | - |
| 500 | - |
| 503 | - |
| 507 | - |
| default | - |