Create a document in Dynatrace with the Document API, setting its name, type, content, and sharing options while returning the new document metadata.
| POST | SaaS | https://{your-environment-id}.apps.dynatrace.com/platform/document/v1/documents |
Create a new document. You are the owner of the created document. By default the document isn't accessible to other users; set isPrivate to false to immediately make it public (readable by every user of the environment).
The document's name and type must be provided. These two properties can later be used for filtering purposes, when listing accessible documents.
Be aware, that the type isn't the same as the Content-Type of the document, but instead adds user-defined semantics of which the document-store is entirely agnostic.
The content size must not exceed 50 MB.
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 |
|---|---|---|---|---|
| body | object | - | body | Required |
RequestBody object| Element | Type | Description | Required |
|---|---|---|---|
| name | string | The name of this document. This name doesn't need to be unique and is not used as identifier. Maximum length is 128 characters. | Required |
| type | string | The type of this document. This type is not the Content-Type of the document, but instead adds a user-defined semantic. Maximum length is 128 characters. | Required |
| description | string | Optional description of this document. Maximum length is 256 characters. | Optional |
| content | string | The binary content of this document. Its exact type is taken from the | Required |
| id | string | Optional. If provided, this will be the id of the document. If not provided, a system-generated id is used. The following constraints apply:
| Optional |
| string | DEPRECATED Deprecated. Use the An optional user-provided id, in addition to the system-provided id. The following constraints apply:
| Optional | |
| isPrivate | boolean | Controls whether this document is public. Public documents can be read by every user of the environment. Optional - if not provided, the document is private. | Optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"name": "","type": "","description": "","content": "string","id": "","externalId": "","isPrivate": null}
| Code | Description |
|---|---|
| 201 | - |
| 400 | - |
| 401 | - |
| 403 | - |
| 409 | - |
| 413 | - |
| 500 | - |
| 503 | - |
| 507 | - |
| default | - |