Skip to main content

Checkpoints - Create checkpoint

Route URL

POST https://playcanvas.com/api/checkpoints

Description

Start a job to create a new checkpoint for a branch. A checkpoint captures the current state of a branch so that it can be restored later.

The request will return job details immediately. You can poll the job by id until its status is either complete or error. When the job is complete, its data will contain the created checkpoint.

Example

curl -H "Authorization: Bearer {accessToken}" -H "Content-Type: application/json" -X POST -d '{"projectId": {projectId}, "branchId": "{branchId}", "description": "My checkpoint"}' "https://playcanvas.com/api/checkpoints"

HTTP Request

POST https://playcanvas.com/api/checkpoints
Authorization: Bearer {accessToken}
Content-Type: application/json

{
"projectId": {projectId},
"branchId": "{branchId}",
"description": "My checkpoint"
}

Parameters

NameTypeRequiredDescription
projectIdnumber✔️The id of the project.
branchIdstring✔️The id of the branch.
descriptionstring✔️A description for the checkpoint. Must be non-empty and cannot exceed 10,000 characters.

Response Schema

Status: 201 Created
{
"id": int,
"created_at": date,
"modified_at": date,
"status": "running" | "complete" | "error",
"messages": list of strings,
"data": {
"type": "checkpoint_create",
"project_id": int,
"branch_id": string,
"user_id": int,
"user": {
"id": int,
"fullName": string,
"username": string
},
"description": string
}
}

When the job is complete, the data field contains the created checkpoint:

{
"id": string,
"user": {
"id": int,
"fullName": string,
"username": string
},
"createdAt": date,
"description": string
}

Errors

CodeDescription
400Invalid request
401Unauthorized
403Forbidden
404Project not found / Branch not found
429Too many requests

Rate Limiting

This route uses a normal rate limit.