Mesh Connect Auth token API

The Auth token API from Mesh Connect — 1 operation(s) for auth token.

OpenAPI Specification

mesh-connect-auth-token-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Admin Assets Auth token API
  version: v1
servers:
- url: https://admin-api.meshconnect.com
security:
- Bearer: []
tags:
- name: Auth token
paths:
  /admin/api/v1/Token:
    post:
      tags:
      - Auth token
      summary: Generate Auth token
      description: Get a short lived token for initializing request calls for Registered client API.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientAdminTokenRequest'
            example:
              clientId: <api-key>
              clientSecret: <api-key>
          text/json:
            schema:
              $ref: '#/components/schemas/ClientAdminTokenRequest'
            example:
              clientId: <api-key>
              clientSecret: <api-key>
          application/*+json:
            schema:
              $ref: '#/components/schemas/ClientAdminTokenRequest'
            example:
              clientId: <api-key>
              clientSecret: <api-key>
      responses:
        '200':
          description: Token created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuthTokenResponseApiResult'
              example:
                content:
                  id_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.KMUFsIDTnFmyG3nMiGM6H9FNFUROf3wh7SmqJp-QV30
                  expires_in: 3600
                  status: succeeded
                status: ok
                message: ''
                errorHash: e47df370
                teamCode: P4
                errorType: ''
        '400':
          description: Token request is not correct
          content:
            application/json:
              schema: {}
              example:
                status: badRequest
                message: Error message
                displayMessage: Optional display message
                errorHash: cd59bd31
                teamCode: P4
                errorType: missingField
        '403':
          description: 'Permission denied: Client Id or Client Secret are not correct or missing'
          content:
            application/json:
              schema: {}
              example:
                status: permissionDenied
                message: Error message
                displayMessage: Optional display message
                errorHash: cd59bd31
                teamCode: P4
                errorType: missingField
components:
  schemas:
    OAuthTokenResponse:
      type: object
      properties:
        id_token:
          type: string
          description: Authentication token.
          nullable: true
        expires_in:
          type: integer
          description: Expiration time in seconds.
          format: int64
          nullable: true
        status:
          $ref: '#/components/schemas/AuthenticationStatus'
      additionalProperties: false
    ApiResultStatus:
      enum:
      - ok
      - serverFailure
      - permissionDenied
      - badRequest
      - notFound
      - conflict
      - tooManyRequest
      - locked
      - unavailableForLegalReasons
      type: string
    OAuthTokenResponseApiResult:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/ApiResultStatus'
        message:
          type: string
          description: A message generated by the API
          nullable: true
        displayMessage:
          type: string
          description: User-friendly display message that can be presented to the end user
          nullable: true
        errorHash:
          type: string
          description: An error grouping hash from string components and caller information. Used by bugsnag on FE for correct error grouping
          nullable: true
          readOnly: true
        teamCode:
          type: string
          description: "Opaque team code for error routing. Resolved from exception origin or caller file path via CODEOWNERS.\r\nFormat: 2-character code (e.g., \"7K\", \"M2\"). Use for alerting/routing, not display."
          nullable: true
          readOnly: true
        errorType:
          type: string
          description: "Strictly-typed error type that is explaining the reason of an unsuccessful status of the operation.\r\nAll possible error types are available in the documentation."
          nullable: true
        errorData:
          nullable: true
          readOnly: true
        content:
          $ref: '#/components/schemas/OAuthTokenResponse'
      additionalProperties: false
    ClientAdminTokenRequest:
      required:
      - clientId
      - clientSecret
      type: object
      properties:
        clientId:
          minLength: 1
          type: string
          description: Contact Mesh to get client Id.
        clientSecret:
          minLength: 1
          type: string
          description: Contact Mesh to get Client Secret for Account Management API.
      additionalProperties: false
      description: Generate Auth token.
    AuthenticationStatus:
      enum:
      - failed
      - succeeded
      - mfaRequired
      - available
      type: string
  securitySchemes:
    Bearer:
      type: http
      description: 'Authorization header using the Bearer scheme. Example: "Authorization: Bearer {Value}"'
      scheme: bearer