メインコンテンツまでスキップ

チェックポイント - Create checkpoint

ルートURL

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

説明

ブランチの新しいチェックポイントを作成するジョブを開始します。チェックポイントはブランチの現在の状態をキャプチャし、後で復元できるようにします。

リクエストはジョブの詳細をすぐに返します。ステータスが complete または error になるまで、ジョブを id でポーリングできます。ジョブが完了すると、data に作成されたチェックポイントが含まれます。

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 リクエスト

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

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

パラメーター

名前タイプRequired説明
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.

レスポンススキーマ

ステータス: 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
}
}

ジョブが完了すると、data フィールドには作成されたチェックポイントが含まれます。

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

エラー

コード説明
400Invalid request
401Unauthorized
403Forbidden
404Project not found / Branch not found
429Too many requests

レート制限

このルートは通常のレート制限を使用します。