Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

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}/restore
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
pageIdstring<uuid>required
checkpointIdstring<uuid>required
Request body
requiredapplication/json
commandIdstringrequired

Client-generated stable command identity, up to 100 characters. Reuse it only for an exact retry of this restore.

max length 100
expectedGenerationnumberrequired
min 1
expectedUpdatedAtstring<date-time>required
Responses
200
checkpointIdstring<uuid>required
commandIdstringrequired
max length 100
contentGenerationnumberrequired
min 1
duplicatebooleanrequired
pageIdstring<uuid>required
400

The page or checkpoint UUID is invalid, or the request body is invalid.

errorstring | object

HTTP error name or a structured HTTP exception response.

Show properties
One of:
string
string
object
object
messagestring | string[] | objectrequired

Error message, validation message list, or request-field validation message map.

Show properties
One of:
string
string
string[]
Array of string
string
object
object
statusCodenumberrequired

HTTP status code for this response.

401

Unauthorized - Invalid or missing authentication token

403

Missing manageDocumentation permission, or organization members cannot access documentation history.

errorstring | object

HTTP error name or a structured HTTP exception response.

Show properties
One of:
string
string
object
object
messagestring | string[] | objectrequired

Error message, validation message list, or request-field validation message map.

Show properties
One of:
string
string
string[]
Array of string
string
object
object
statusCodenumberrequired

HTTP status code for this response.

404

The page or checkpoint does not exist or is not accessible.

errorstring | object

HTTP error name or a structured HTTP exception response.

Show properties
One of:
string
string
object
object
messagestring | string[] | objectrequired

Error message, validation message list, or request-field validation message map.

Show properties
One of:
string
string
string[]
Array of string
string
object
object
statusCodenumberrequired

HTTP status code for this response.

409

The generation or page update timestamp is stale.

errorstring | object

HTTP error name or a structured HTTP exception response.

Show properties
One of:
string
string
object
object
messagestring | string[] | objectrequired

Error message, validation message list, or request-field validation message map.

Show properties
One of:
string
string
string[]
Array of string
string
object
object
statusCodenumberrequired

HTTP status code for this response.

Try it
Server
Authorization
Parameters
Bodyapplication/json
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"
}'
Response
{
  "checkpointId": "16673a5e-107b-463f-be42-5cfae1eaa8fe",
  "commandId": "restore-runbook-v2",
  "contentGeneration": 1,
  "duplicate": true,
  "pageId": "347b9bf8-fe00-46f6-b8ca-1e06b3bd5809"
}