Try it free

Replace document content

  • Latest Dynatrace
  • Reference
  • Published Oct 13, 2026

Replace document content in Dynatrace with the Document API, updating the full file and its content type with optimistic locking.

PUTSaaShttps://{your-environment-id}.apps.dynatrace.com/platform/document/v1/documents/{id}/content

Overview

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;

Authentication

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.

Parameters

ParameterTypeDescriptionInRequired
idstring

System-generated or user-given id of a document.

pathRequired
optimistic-locking-versionstring

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.

queryRequired
admin-accessboolean

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.

queryOptional
bodyobject-bodyRequired

Request body objects

The RequestBody object

ElementTypeDescriptionRequired
contentstring-Required

Request body JSON model

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"
}

Response

Response codes

CodeDescription
200-
400-
401-
403-
404-
409-
413-
500-
503-
507-
default-
Related tags
Platform APIDynatrace Platform