openapi: 3.0.0
info:
  title: Nobl9 API
  version: "Latest"
  description:
    $ref: './md-partials/general-intro.mdx'
servers:
  - url: "https://app.nobl9.com/api"
  - url: "https://us1.nobl9.com/api"
tags:
  - name: access_token
    description: Generate an access token
    x-displayName: Access token
paths:
  /accessToken:
    post:
      summary: Generate access token
      tags:
        - Access token
      description:
        $ref: './md-partials/access-token.mdx'
      x-codeSamples:
        - lang: Bash
          label: cURL
          source: |
            curl -X \
            POST https://app.nobl9.com/api/accessToken -H 'Accept: application/json; version=v1alpha' \
            -H 'Organization: your-organization-id' \
            -H 'Authorization: Basic ${encoded_access_keys}'
      security:
        - basicAuth: [ ]
      parameters:
        - $ref: '#/components/parameters/organization'
      responses:
        200:
          description: Success
        400:
          $ref: '#/components/responses/BadRequestError'
        403:
          $ref: '#/components/responses/ForbiddenError'
        429:
          $ref: '#/components/responses/TooManyRequestsError'
        500:
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    organization:
      in: header
      name: Organization
      required: true
      schema:
        type: string
  responses:
    200:
      description: Success
    BadRequestError:
      description: Bad request
    ForbiddenError:
      description: Forbidden
    NotFoundError:
      description: One of the resources referenced in query or payload was not found
    InternalServerError:
      description: Internal server error
    TooManyRequestsError:
      description: API call exceeded the rate limit
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Use Basic authentication with base64-encoded credentials to generate an access token
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Authenticate API requests using an [access token](/api/access-token/generate-access-token). Include it in the Authorization header as `Bearer <token>`.
