D-Wave Leap Account API

Manage Leap account projects and per-project SAPI tokens via OAuth. Endpoints include `account/active_project/oauth/` (retrieve user's active project), `account/projects/oauth/` (list all accessible projects), and `account/token/oauth/?project_id=...` (retrieve a project SAPI token for use against the Solver API). Backs the Ocean SDK's interactive Leap authorization flow, allowing developers to onboard, switch projects, and rotate SAPI tokens without leaving their development environment.

OpenAPI Specification

d-wave-leap-account-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: D-Wave Leap Account API
  version: '1.0'
  description: |
    D-Wave Leap Account API — OAuth-backed endpoints for retrieving the active Leap
    project, listing accessible projects, and provisioning project-scoped SAPI tokens
    for use against the Solver API.
  contact:
    name: D-Wave Quantum Inc.
servers:
- url: https://cloud.dwavesys.com/leap/api
security:
- LeapOAuth: []
paths:
  /account/active_project/oauth/:
    get:
      operationId: getActiveProject
      summary: Get Active Project
      description: Retrieve the authenticated user's active Leap project as selected in the Leap dashboard.
      tags: [Account]
      responses:
        '200':
          description: Active project
          content:
            application/json:
              schema: {$ref: '#/components/schemas/LeapProject'}
  /account/projects/oauth/:
    get:
      operationId: listProjects
      summary: List Projects
      description: Retrieve the list of Leap projects accessible to the authenticated user.
      tags: [Account]
      responses:
        '200':
          description: Project list
          content:
            application/json:
              schema:
                type: array
                items: {$ref: '#/components/schemas/LeapProject'}
  /account/token/oauth/:
    get:
      operationId: getProjectToken
      summary: Get Project SAPI Token
      description: Retrieve a SAPI token for a given Leap project.
      tags: [Account]
      parameters:
      - {in: query, name: project_id, required: true, schema: {type: string}}
      responses:
        '200':
          description: SAPI token
          content:
            application/json:
              schema: {$ref: '#/components/schemas/LeapProjectToken'}
components:
  securitySchemes:
    LeapOAuth:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://cloud.dwavesys.com/leap/oauth/authorize
          tokenUrl: https://cloud.dwavesys.com/leap/oauth/token
          scopes:
            account: Read account, projects, and tokens
  schemas:
    LeapProject:
      type: object
      properties:
        id: {type: string}
        name: {type: string}
        code: {type: string}
        description: {type: string}
        organization: {type: string}
    LeapProjectToken:
      type: object
      properties:
        token:
          type: string
          description: Opaque SAPI token to send as `X-Auth-Token` against the Solver API.
        project_id: {type: string}