Umbra Client Credentials API

The Client Credentials API from Umbra — 1 operation(s) for client credentials.

OpenAPI Specification

umbra-client-credentials-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Admin Client Credentials API
  description: Canopy Admin API for M2M Token Management
  version: 3.1.0
servers:
- url: https://api.canopy.umbra.space/admin
security:
- bearerAuth: []
tags:
- name: Client Credentials
paths:
  /m2m/token:
    get:
      tags:
      - Client Credentials
      summary: Get Token
      description: Retrieve the M2M client_id and client_secret for your Organization
      operationId: get_token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/M2MTokenResponse'
        '404':
          description: No M2M Application found. Send a POST to create one first.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - Client Credentials
      summary: Rotate Token
      description: Rotate the M2M client_id and client_secret for your Organization
      operationId: rotate_token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/M2MTokenResponse'
        '404':
          description: No M2M Application found. Send a POST to create one first.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Client Credentials
      summary: Create Token
      description: Create the M2M Application for your Organization
      operationId: create_token
      responses:
        '200':
          description: M2M token already exists. Returning existing token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/M2MTokenResponse'
        '201':
          description: New M2M Application created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/M2MTokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Client Credentials
      summary: Delete Token
      description: Delete the M2M Application for your Organization
      operationId: delete_token
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    M2MTokenResponse:
      properties:
        client_id:
          type: string
          title: Client Id
        client_secret:
          type: string
          title: Client Secret
        audiences:
          items:
            type: string
          type: array
          title: Audiences
      type: object
      required:
      - client_id
      - client_secret
      - audiences
      title: M2MTokenResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT