curl --request POST \
--url https://api.example.com/api/projects/{projectId}/documents/{documentId}/versions/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"path": "<string>",
"name": "<string>",
"type": "f",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"meta": {},
"contentType": "<string>",
"size": 123,
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publishedId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publishedAt": "<string>",
"publishedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>"
},
"published": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"content": "<unknown>",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>"
},
"createdAt": "<string>",
"versions": [
"<unknown>"
],
"releases": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>"
}
]
},
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"content": "<unknown>",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>"
},
"createdAt": "<string>",
"versions": [
"<unknown>"
],
"releases": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>"
}
]
}
],
"changeRequests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"status": "<string>",
"createdAt": "<string>"
}
],
"view": {
"description": "<string>",
"permissions": {}
},
"updatedAt": "<string>",
"deletedAt": "<string>"
}Restore a document to a previous version by creating a new version with the old content.
curl --request POST \
--url https://api.example.com/api/projects/{projectId}/documents/{documentId}/versions/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"versionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"path": "<string>",
"name": "<string>",
"type": "f",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"meta": {},
"contentType": "<string>",
"size": 123,
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publishedId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"publishedAt": "<string>",
"publishedBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>"
},
"published": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"content": "<unknown>",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>"
},
"createdAt": "<string>",
"versions": [
"<unknown>"
],
"releases": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>"
}
]
},
"versions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"parentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"content": "<unknown>",
"documentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdBy": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "[email protected]",
"firstName": "<string>",
"lastName": "<string>"
},
"createdAt": "<string>",
"versions": [
"<unknown>"
],
"releases": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>"
}
]
}
],
"changeRequests": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"status": "<string>",
"createdAt": "<string>"
}
],
"view": {
"description": "<string>",
"permissions": {}
},
"updatedAt": "<string>",
"deletedAt": "<string>"
}Personal access token is obtained through your profile
Document unique identifier
Project unique identifier
Version ID to restore from
Document with restored version
Document with restored version
Document unique identifier
Materialized lowercase path based on the name
Materialized path based on the name
Document name
Document type (file, directory, or external file)
f, d, e Project ID
Document metadata
Show child attributes
Content MIME type
Document size in bytes
Parent document ID
Currently published version ID
Publication timestamp
User who published the document
Show child attributes
Published version details
Show child attributes
Document versions
Show child attributes
Pending change requests
Show child attributes
Document view configuration
Show child attributes
Last update timestamp
Deletion timestamp if soft deleted
Was this page helpful?