Documents API: Get document version
Endpoint#
Section titled “Endpoint#”| Property | Value |
|---|---|
| Type | query |
| Method | GET |
| Path | /api/external/v1/documents/get_document_version |
| Handler | OperatelyWeb.Api.Documents.GetVersion |
Authentication#
Section titled “Authentication#”- Requires a valid API token.
- Read-only and full-access tokens can execute this query.
| Field | Type | Required | Nullable | Default |
|---|---|---|---|---|
document_id | id primitive (encoded as string) | Yes | No | - |
version_number | integer | Yes | No | - |
Outputs#
Section titled “Outputs#”| Field | Type | Required | Nullable |
|---|---|---|---|
version | document_version object | Yes | No |
cURL Example#
Section titled “cURL Example#”Copied
curl --request GET \
--url "https://app.operately.com/api/external/v1/documents/get_document_version?document_id=value&version_number=123" \
--header "Authorization: Bearer ${OPERATELY_API_TOKEN}"Response Example#
Section titled “Response Example#”{ "version": { "__typename": "value", "content": "value", "content_changed": true, "editor": "<person>", "id": "value", "inserted_at": "value", "is_current": true, "origin": "value", "restored_from_version_number": 123, "title": "value", "title_changed": true, "version_number": 123 }}