AccelByte Cloud Save API

Player and game record storage.

Documentation

Specifications

Other Resources

OpenAPI Specification

accelbyte-cloud-save-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: AccelByte Gaming Services (AGS) Achievement Cloud Save API
  description: Representative OpenAPI description of the core AccelByte Gaming Services (AGS) REST surface. AGS is delivered as a set of independent microservices (IAM, Basic, Cloud Save, Statistics/Leaderboard, Matchmaking, Session, Platform/Commerce, Season Pass, Achievement, DSMC/Armada, Game Telemetry, and UGC), each mounted under its own path prefix on the environment base URL (for example https://demo.accelbyte.io). Almost every operation is scoped to a `namespace` path parameter and secured with an OAuth2 Bearer access token issued by IAM. This document models a representative slice of each service rather than the exhaustive per-service specs, which AccelByte publishes individually.
  termsOfService: https://accelbyte.io/terms-of-service
  contact:
    name: AccelByte
    url: https://accelbyte.io/contact-us
  version: '1.0'
servers:
- url: https://demo.accelbyte.io
  description: Shared AccelByte demo environment
- url: https://{namespace}.accelbyte.io
  description: Customer environment base URL
  variables:
    namespace:
      default: demo
      description: Customer environment host prefix
security:
- bearerAuth: []
tags:
- name: Cloud Save
  description: Player and game record storage.
paths:
  /cloudsave/v1/namespaces/{namespace}/users/{userId}/records/{key}:
    get:
      operationId: cloudSaveGetPlayerRecord
      tags:
      - Cloud Save
      summary: Get a player record by key.
      parameters:
      - $ref: '#/components/parameters/Namespace'
      - $ref: '#/components/parameters/UserId'
      - $ref: '#/components/parameters/RecordKey'
      responses:
        '200':
          description: The player record.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlayerRecord'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: cloudSaveCreatePlayerRecord
      tags:
      - Cloud Save
      summary: Create or replace a player record.
      parameters:
      - $ref: '#/components/parameters/Namespace'
      - $ref: '#/components/parameters/UserId'
      - $ref: '#/components/parameters/RecordKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: Record saved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlayerRecord'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        errorCode:
          type: integer
          description: AccelByte numeric error code.
        errorMessage:
          type: string
      required:
      - errorCode
      - errorMessage
    PlayerRecord:
      type: object
      properties:
        key:
          type: string
        namespace:
          type: string
        user_id:
          type: string
        value:
          type: object
          additionalProperties: true
        is_public:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  parameters:
    UserId:
      name: userId
      in: path
      required: true
      schema:
        type: string
    RecordKey:
      name: key
      in: path
      required: true
      schema:
        type: string
    Namespace:
      name: namespace
      in: path
      required: true
      description: The game namespace the request is scoped to.
      schema:
        type: string
      example: demogame
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2 access token issued by the IAM token endpoint.
    basicAuth:
      type: http
      scheme: basic
      description: OAuth2 client id / client secret used at the token endpoint.