Restore a documentation page checkpoint
Restores the historical title, tags, and body using exact generation and page-update preconditions. Retrying the same stable command ID is idempotent. Organization members cannot call this endpoint.
POST
/projects/documentation/{pageId}/checkpoints/{checkpointId}/restoreAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
pageIdstring<uuid>requiredcheckpointIdstring<uuid>requiredRequest body
requiredapplication/jsoncommandIdstringrequiredClient-generated stable command identity, up to 100 characters. Reuse it only for an exact retry of this restore.
max length 100
expectedGenerationnumberrequiredmin 1
expectedUpdatedAtstring<date-time>requiredResponses
200
checkpointIdstring<uuid>requiredcommandIdstringrequiredmax length 100
contentGenerationnumberrequiredmin 1
duplicatebooleanrequiredpageIdstring<uuid>required400The page or checkpoint UUID is invalid, or the request body is invalid.
errorstring | objectHTTP error name or a structured HTTP exception response.
Show propertiesHide properties
One of:
string
stringobject
objectmessagestring | string[] | objectrequiredError message, validation message list, or request-field validation message map.
Show propertiesHide properties
One of:
string
stringstring[]
Array of
stringstringobject
objectstatusCodenumberrequiredHTTP status code for this response.
401Unauthorized - Invalid or missing authentication token
403Missing manageDocumentation permission, or organization members cannot access documentation history.
errorstring | objectHTTP error name or a structured HTTP exception response.
Show propertiesHide properties
One of:
string
stringobject
objectmessagestring | string[] | objectrequiredError message, validation message list, or request-field validation message map.
Show propertiesHide properties
One of:
string
stringstring[]
Array of
stringstringobject
objectstatusCodenumberrequiredHTTP status code for this response.
404The page or checkpoint does not exist or is not accessible.
errorstring | objectHTTP error name or a structured HTTP exception response.
Show propertiesHide properties
One of:
string
stringobject
objectmessagestring | string[] | objectrequiredError message, validation message list, or request-field validation message map.
Show propertiesHide properties
One of:
string
stringstring[]
Array of
stringstringobject
objectstatusCodenumberrequiredHTTP status code for this response.
409The generation or page update timestamp is stale.
errorstring | objectHTTP error name or a structured HTTP exception response.
Show propertiesHide properties
One of:
string
stringobject
objectmessagestring | string[] | objectrequiredError message, validation message list, or request-field validation message map.
Show propertiesHide properties
One of:
string
stringstring[]
Array of
stringstringobject
objectstatusCodenumberrequiredHTTP status code for this response.
Request
curl -X POST "https://leadtime.app/api/public/projects/documentation/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08/restore" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"commandId": "restore-runbook-v2",
"expectedGeneration": 1,
"expectedUpdatedAt": "2019-08-24T14:15:22Z"
}'const response = await fetch("https://leadtime.app/api/public/projects/documentation/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08/restore", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"commandId": "restore-runbook-v2",
"expectedGeneration": 1,
"expectedUpdatedAt": "2019-08-24T14:15:22Z"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/documentation/497f6eca-6276-4993-bfeb-53cbbbba6f08/checkpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08/restore",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"commandId": "restore-runbook-v2",
"expectedGeneration": 1,
"expectedUpdatedAt": "2019-08-24T14:15:22Z"
},
)Response
{
"checkpointId": "16673a5e-107b-463f-be42-5cfae1eaa8fe",
"commandId": "restore-runbook-v2",
"contentGeneration": 1,
"duplicate": true,
"pageId": "347b9bf8-fe00-46f6-b8ca-1e06b3bd5809"
}{
"error": "string",
"message": "string",
"statusCode": 0
}Unauthorized - Invalid or missing authentication token
{
"error": "string",
"message": "string",
"statusCode": 0
}{
"error": "string",
"message": "string",
"statusCode": 0
}{
"error": "string",
"message": "string",
"statusCode": 0
}