PlayCanvas Checkpoints API

Branch checkpoints (snapshots).

OpenAPI Specification

playcanvas-checkpoints-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: PlayCanvas REST Apps Checkpoints API
  version: 1.0.0-beta
  description: The PlayCanvas REST API lets you automate the PlayCanvas platform — manage project assets, branches and checkpoints (version control), list scenes, export projects, download self-hostable apps, poll asynchronous jobs, and publish Gaussian splats to the SuperSplat platform. The API is currently in beta; endpoints and responses may change. All access is over HTTPS using a Bearer access token generated on your Organization's Account page.
  termsOfService: https://playcanvas.com/terms
  contact:
    name: PlayCanvas Support
    url: https://developer.playcanvas.com/user-manual/api/
  license:
    name: MIT (engine)
    url: https://github.com/playcanvas/engine/blob/main/LICENSE
servers:
- url: https://playcanvas.com/api
  description: PlayCanvas REST API (beta)
security:
- bearerAuth: []
tags:
- name: Checkpoints
  description: Branch checkpoints (snapshots).
paths:
  /checkpoints:
    post:
      tags:
      - Checkpoints
      operationId: createCheckpoint
      summary: Create checkpoint
      description: Start a job to create a checkpoint (snapshot) of a branch. Returns job details; poll GET /jobs/{id} until complete, then read the checkpoint from the job data.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - projectId
              - branchId
              - description
              properties:
                projectId:
                  type: integer
                  description: The id of the project.
                branchId:
                  type: string
                  description: The id of the branch.
                description:
                  type: string
                  maxLength: 10000
                  description: A description for the checkpoint.
      responses:
        '201':
          description: Checkpoint job started.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /checkpoints/{id}:
    get:
      tags:
      - Checkpoints
      operationId: getCheckpoint
      summary: Get checkpoint
      description: Get a checkpoint by its id.
      parameters:
      - name: id
        in: path
        required: true
        description: The id of the checkpoint.
        schema:
          type: string
      responses:
        '200':
          description: Checkpoint record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Checkpoint'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
  /branches/{branchId}/checkpoints:
    get:
      tags:
      - Checkpoints
      operationId: listCheckpoints
      summary: List checkpoints
      description: 'List checkpoints for a branch, newest first. Cursor pagination: when pagination.hasMore is true, pass ?skip={lastCheckpointId} for older checkpoints.'
      parameters:
      - name: branchId
        in: path
        required: true
        description: The id of the branch.
        schema:
          type: string
      - name: limit
        in: query
        description: Maximum number of checkpoints to return. Cannot exceed 50.
        schema:
          type: integer
          maximum: 50
      - name: skip
        in: query
        description: A checkpoint id; only checkpoints created before it are returned.
        schema:
          type: string
      responses:
        '200':
          description: List of checkpoints.
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: array
                    items:
                      $ref: '#/components/schemas/Checkpoint'
                  pagination:
                    $ref: '#/components/schemas/CursorPagination'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    User:
      type: object
      properties:
        id:
          type: integer
        fullName:
          type: string
        username:
          type: string
    Job:
      type: object
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        modified_at:
          type: string
          format: date-time
        status:
          type: string
          enum:
          - running
          - complete
          - error
        messages:
          type: array
          items:
            type: string
        data:
          type: object
          description: Contents depend on the job type.
    Checkpoint:
      type: object
      properties:
        id:
          type: string
        user:
          $ref: '#/components/schemas/User'
        createdAt:
          type: string
          format: date-time
        description:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
          description: The error message.
      required:
      - error
    CursorPagination:
      type: object
      properties:
        hasMore:
          type: boolean
  responses:
    Forbidden:
      description: Forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Rate limit exceeded.
      headers:
        X-RateLimit-Limit:
          schema:
            type: integer
          description: Requests allowed per minute.
        X-RateLimit-Remaining:
          schema:
            type: integer
          description: Remaining requests this minute.
        X-RateLimit-Reset:
          schema:
            type: integer
          description: UTC epoch seconds when the window resets.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Access token generated on the Organization Account page, sent as `Authorization: Bearer {accessToken}`.'