openapi: 3.0.2
info:
  version: 2.0.0
  title: Cisco Umbrella Key Admin API
  description: Manage your Umbrella API keys.
  contact:
    name: Cloud Security Developer Community

servers:
  - url: https://api.umbrella.com/{basePath}
    variables:
      basePath:
        default: admin/v2

security:
  - oauthFlow: []

tags:
 - name: API Keys
 - name: Umbrella

paths:

  /apiKeys:

    get:
      summary: List API Keys
      description: List the API keys created by your organization.
      tags:
        - API Keys
        - Umbrella
      operationId: getAPIKeys
      security:
        - oauthFlow:
            - admin.apikeys:read
      parameters:
        - $ref: '#/components/parameters/offset'
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          $ref: '#/components/responses/KeysResponseList'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '503':
          $ref: '#/components/responses/serviceUnavailableError'
        'default':
          $ref: '#/components/responses/invalidRequestError'

    post:
      summary: Create API Key
      description: |-
        Create an API key with certain scopes, name, description, allowed IP addresses and CIDR blocks, and expiration.
        The `description` and `allowedIPs` fields are optional.
      tags:
        - API Keys
        - Umbrella
      operationId: createAPIKeys
      security:
        - oauthFlow:
            - admin.apikeys:create
      requestBody:
        $ref: '#/components/requestBodies/KeysRequest'
      responses:
        '201':
          $ref: '#/components/responses/KeyResponseWithSecret'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '409':
          $ref: '#/components/responses/alreadyExistsError'
        '415':
          $ref: '#/components/responses/unsupportedMediaError'
        '503':
          $ref: '#/components/responses/serviceUnavailableError'
        'default':
          $ref: '#/components/responses/invalidRequestError'

  /apiKeys/{apiKeyId}:

    get:
      summary: Get API Key
      description: Get an API key.
      tags:
        - API Keys
        - Umbrella
      operationId: getAPIKey
      parameters:
        - $ref: '#/components/parameters/apiKeyId'
      security:
        - oauthFlow:
            - admin.apikeys:read
      responses:
        '200':
          $ref: '#/components/responses/KeyResponse'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '503':
          $ref: '#/components/responses/serviceUnavailableError'
        'default':
          $ref: '#/components/responses/invalidRequestError'

    delete:
      summary: Delete API Key
      description: Delete an API key.
      tags:
        - API Keys
        - Umbrella
      operationId: deleteAPIKey
      parameters:
        - $ref: '#/components/parameters/apiKeyId'
      security:
        - oauthFlow:
            - admin.apikeys:delete
      responses:
        '204':
          description: No Content
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '503':
          $ref: '#/components/responses/serviceUnavailableError'
        'default':
          $ref: '#/components/responses/invalidRequestError'

    patch:
      summary: Update API Key
      description: Update the name, description, scopes, and allowed IPs for an API key.
      tags:
        - API Keys
        - Umbrella
      operationId: patchAPIKey
      parameters:
        - $ref: '#/components/parameters/apiKeyId'
      security:
        - oauthFlow:
            - admin.apikeys:update
      requestBody:
        $ref: '#/components/requestBodies/KeyRequestPatch'
      responses:
        '200':
          $ref: '#/components/responses/KeyResponse'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '415':
          $ref: '#/components/responses/unsupportedMediaError'
        '503':
          $ref: '#/components/responses/serviceUnavailableError'
        'default':
          $ref: '#/components/responses/invalidRequestError'

  /apiKeys/{apiKeyId}/refresh:

    post:
      summary: Refresh API Key
      description: Refresh the API key and secret.
      operationId: refreshApiKey
      tags:
        - API Keys
        - Umbrella
      security:
        - oauthFlow:
            - admin.apikeys:refresh
      parameters:
        - $ref: '#/components/parameters/apiKeyId'
      responses:
        '200':
          $ref: '#/components/responses/KeyResponseRefreshSecret'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '403':
          $ref: '#/components/responses/forbiddenError'
        '404':
          $ref: '#/components/responses/notFoundError'
        '415':
          $ref: '#/components/responses/unsupportedMediaError'
        '503':
          $ref: '#/components/responses/serviceUnavailableError'
        'default':
          $ref: '#/components/responses/invalidRequestError'


components:

  headers:

    Content-Type:
      schema:
        type: string
      description: The MIME content type of the response body.
      example: application/json

    Date:
      schema:
        type: string
        pattern: '^[0-90-90-90-9-0-90-9-0-90-9T0-90-9:0-90-9:0-90-9Z]+$'
      description: The timestamp of the response.
      example: '2023-03-14T18:34:25Z'


  # =========================================
  # Parameters Components
  # =========================================
  parameters:

    apiKeyId:
      in: path
      name: apiKeyId
      required: true
      description: The ID of the API key.
      schema:
        type: string
      example: '39b18499-4cf3-470d-997b-960e55ee0085'

    offset:
      in: query
      name: offset
      description: The place to start reading in the collection. The default offset is 0.
      schema:
        type: integer
        format: int64
        default: 0
      example: 1

    limit:
      in: query
      name: limit
      description: |-
        The number of items to return in the page. The default limit is 0, which designates no limit.
      schema:
        type: integer
        format: int64
        default: 0
      example: 25

  # =========================================
  # Security Schemes Components
  # =========================================
  securitySchemes:

    oauthFlow:
      type: oauth2
      description: client credential flow
      flows:
        clientCredentials:
          tokenUrl: https://api.umbrella.com/auth/v2/token
          scopes:
            admin.apikeys:create: 'Create admin API keys'
            admin.apikeys:read: 'Read admin API keys'
            admin.apikeys:delete: 'Delete admin API keys'
            admin.apikeys:update: 'Update admin API keys'
            admin.apikeys:refresh: 'Refresh admin API keys'


  # =========================================
  # Responses Components
  # =========================================
  responses:

    KeyResponse:
      description: OK
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Date:
          $ref: '#/components/headers/Date'
      content:
        application/json:
          schema:
            type: object
            description: Successfully created an API key.
            properties:
              message:
                type: string
                description: The status message that describes the response.
              key:
                $ref: '#/components/schemas/Key'
          example:
            message: success
            key:
              name: Networks RW
              id: '39b18499-4cf3-470d-997b-960e55ee0085'
              clientId: '1023845394834890324032948234'
              creatorKeyId: ""
              creatorName: 'Name of API key creator'
              creatorEmail: 'yourname@cisco.com'
              createdAt: '2021-10-02T20:00:00Z'
              description: 'An API key to create and modify network deployments.'
              expireAt: '2022-01-12T20:00:00Z00:00'
              lastUsedAt: '2021-10-05T19:34:00Z'
              modifiedAt: '2021-10-02T20:00:00Z'
              lastRefreshedAt: '2021-10-02T20:00:00Z'
              scopes: [ "deployments.networks:read", "deployments.networks:write" ]
              allowedIPs: ['2001:420:c0c4:1006::427', '143.10.10.0/24']

    KeyResponseWithSecret:
      description: Created
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Date:
          $ref: '#/components/headers/Date'
      content:
        application/json:
          schema:
            type: object
            description: Successfully created an API key.
            properties:
              message:
                type: string
                description: The status message that describes the response.
                enum: [success, error]
                example: success
              key:
                $ref: '#/components/schemas/KeyWithSecret'
          example:
            message: success
            key:
              name: Networks RW
              id: '39b18499-4cf3-470d-997b-960e55ee0085'
              clientId: '1023845394834890324032948234'
              clientSecret: '1023845394834890324032948233'
              creatorKeyId: '130eec4c3825463e8d06f1dd9c0b2c19'
              creatorName: ''
              creatorEmail: ''
              createdAt: '2022-10-02T20:00:00Z'
              description: 'An API key to create and modify network deployments.'
              expireAt: ''
              lastUsedAt: '2022-10-05T19:34:00Z'
              modifiedAt: '2022-10-02T20:00:00Z'
              lastRefreshedAt: '2022-10-05T20:00:00Z'
              scopes: [ "deployments.networks:read", "deployments.networks:write" ]

    # Key response without the allowedIPs field
    KeyResponseRefreshSecret:
      description: OK
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Date:
          $ref: '#/components/headers/Date'
      content:
        application/json:
          schema:
            type: object
            description: Successfully refreshed an API key.
            properties:
              message:
                type: string
                description: The status message that describes the response.
                enum: [success, error]
                example: success
              key:
                $ref: '#/components/schemas/KeyRefreshSecret'
          example:
            message: success
            key:
              name: Networks RW
              id: '39b18499-4cf3-470d-997b-960e55ee0085'
              clientId: '1023845394834890324032948234'
              clientSecret: '1023845394834890324032948233'
              creatorKeyId: '130eec4c3825463e8d06f1dd9c0b2c19'
              creatorName: ''
              creatorEmail: ''
              createdAt: '2022-10-02T20:00:00Z'
              description: 'An API key to create and modify network deployments.'
              expireAt: ''
              lastUsedAt: '2022-10-05T19:34:00Z'
              modifiedAt: '2022-10-02T20:00:00Z'
              lastRefreshedAt: '2022-10-05T20:00:00Z'
              scopes: [ "deployments.networks:read", "deployments.networks:write" ]

    KeysResponseList:
      description: OK
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Date:
          $ref: '#/components/headers/Date'
      content:
        application/json:
          schema:
            type: object
            description: List the key information.
            properties:
              message:
                type: string
                example: success
                enum: [success, error]
                description: The status message that describes the response.
              offset:
                type: integer
                format: int64
                description: The place to start reading in the collection. The default offset is 0.
                example: 1
              limit:
                type: integer
                format: int64
                description: |-
                  The number of items to return in the page. The default limit is 0, which
                  designates no limit.
                example: 10
              total:
                type: integer
                format: int64
                example: 1
                description: The total number of items read in the collection.
              keys:
                type: array
                items:
                  $ref: '#/components/schemas/KeyForList'
          example:
            message: success
            offset: 0
            limit: 100
            total: 40
            keys:
              - id: "39b18499-4cf3-470d-997b-960e55ee0085"
                creatorName: 'Name of the API key creator'
                creatorEmail: 'yourname@cisco.com'
                createdAt: '2021-10-02T20:00:00'
                description: 'An API key to create and modify network deployments.'
                expireAt: '2022-01-12T20:00:00Z00:00'
                lastUsedAt: '2021-10-05T19:34:00'
                modifiedAt: '2021-10-02T20:00:00'
                lastRefreshedAt: '2021-10-02T20:00:00Z'
                scopes: [ "deployments.networks:read", "deployments.networks:write" ]

    invalidRequestError:
      description: Bad Request
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Date:
          $ref: '#/components/headers/Date'
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              description:
                type: string
            example:
              message: 'error'
              description: Bad Request

    unauthorizedError:
      description: Unauthorized
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Date:
          $ref: '#/components/headers/Date'
        WWW-Authenticate:
          schema:
            type: string
          description: A challenge response for the intended resource.
      content:
        application/json:
          schema:
            type: object
            description: The request is not authorized.
            properties:
              message:
                type: string
                example: success
                enum: [success, error]
              description:
                type: string
            example:
              message: 'error'
              description: Unauthorized request

    forbiddenError:
      description: Forbidden
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Date:
          $ref: '#/components/headers/Date'
      content:
        application/json:
          schema:
            type: object
            description: The request is forbidden.
            properties:
              message:
                type: string
                example: success
                enum: [success, error]
              description:
                type: string
            example:
              message: 'error'
              description: Forbidden

    serviceUnavailableError:
      description: Service Unavailable
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Date:
          $ref: '#/components/headers/Date'
      content:
        application/json:
          schema:
            type: object
            description: The request failed because a dependent service is temporarily unavailable.
            properties:
              message:
                type: string
                example: error
                enum: [success, error]
              description:
                type: string
            example:
              message: 'error'
              description: Service Unavailable

    alreadyExistsError:
      description: Already Exists
      # 409 Conflict?
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Date:
          $ref: '#/components/headers/Date'
      content:
        application/json:
          schema:
            type: object
            description: The request failed because the `APIKey` with that `name` already exists.
            properties:
              message:
                type: string
                example: error
                enum: [success, error]
              description:
                type: string
            example:
              message: 'error'
              description: Already Exists

    notFoundError:
      description: Not Found
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Date:
          $ref: '#/components/headers/Date'
      content:
        application/json:
          schema:
            type: object
            description: The request failed because the resource doesn't exist.
            properties:
              message:
                type: string
                example: error
                enum: [success, error]
              description:
                type: string
            example:
              message: 'error'
              description: Not Found

    unsupportedMediaError:
      description: Unsupported Media Type
      headers:
        Content-Type:
          $ref: '#/components/headers/Content-Type'
        Date:
          $ref: '#/components/headers/Date'
      content:
        application/json:
          schema:
            type: object
            description: The request failed because the Content-Type was not an allowed media type.
            properties:
              message:
                type: string
                example: error
                enum: [success, error]
              description:
                type: string
            example:
              message: 'error'
              description: Unsupported Media Type

  # =========================================
  # Request Bodies Components
  # =========================================
  requestBodies:

    KeysRequest:
      description: Request body for creating an API key.
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                $ref: '#/components/schemas/name'
              description:
                $ref: '#/components/schemas/description'
              scopes:
                $ref: '#/components/schemas/scopes'
              expireAt:
                type: string
                description: |
                  The date and time when the key is set to expire. Specify an ISO 8601-formatted timestamp or
                  an empty string (`''`). Use an empty string to set the API key to never expire.
              allowedIPs:
                $ref: '#/components/schemas/allowedIPs'
            required:
              - name
              - scopes
          example:
            name: Network RW
            scopes: [ "deployments.networks:write" ]
            description: An API key to create and modify network deployments.

    KeyRequestPatch:
      description: Request body for updating an API key.
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              name:
                $ref: '#/components/schemas/name'
              description:
                $ref: '#/components/schemas/description'
              scopes:
                $ref: '#/components/schemas/scopes'
              allowedIPs:
                $ref: '#/components/schemas/allowedIPs'
            required:
              - name
              - scopes
          example:
            name: Network RW
            scopes: [ "deployments.networks:write" ]
            description: An API key to create and modify network deployments.
            allowedIPs: ['2001:420:c0c4:1006::427', '143.10.10.0/24']

  # =========================================
  # Schemas Components
  # =========================================
  schemas:

    name:
      description: The unique descriptive label for the API key.
      type: string
      pattern: '^[a-zA-Z0-9:.-_+=\s]+$'
      maxLength: 256
      example: Network deployments

    description:
      type: string
      maxLength: 256
      description: The text that describes the purpose of the API key.
      example: An API key to create and modify network deployments.

    allowedIPs:
      type: array
      description: |-
        The list of public IP addresses and CIDR blocks that can make API requests with the API key.
      items:
        type: string
        description: |-
          An IP address that can make API requests with the API key.
        example: '2001:420:c0c4:1006::427'
      example:
        - '2001:420:c0c4:1006::427'

    createdAt:
      type: string
      format: date-time
      description: The date and time when the key was created, specified in the ISO 8601 format.
      example: '2021-10-02T20:00:00Z'

    expireAt:
      type: string
      description: |
        The date and time when the key is set to expire. The timestamp is specified as an ISO 8601 formatted string,
        or an empty string (`''`).  An empty string indicates that the key never expires.
      example: '2022-10-02T20:00:00Z'

    modifiedAt:
      type: string
      format: date-time
      description: The date and time when the key was updated, specified in the ISO 8601 format.
      example: '2021-11-02T20:00:00Z'

    lastUsedAt:
      type: string
      format: date-time
      description: The date and time when the key was last used, specified in the ISO 8601 format.
      example: '2021-10-02T20:00:00'

    lastRefreshedAt:
      type: string
      format: date-time
      description: The date and time when the key was last refreshed, specified in the ISO 8601 format.
      example: '2021-12-02T20:00:00Z'

    scopes:
      type: array
      description: A list of scopes and permissions attached to the API key.
      items:
        type: string
      example: [ "deployments.networks:read", "deployments.networks:write" ]

    id:
      type: string
      description: A unique identifier for the key.
      example: '39b18499-4cf3-470d-997b-960e55ee0085'

    clientId:
      type: string
      description: |
        The client ID associated with the API key. The client ID is used with the client secret to attain a token for making API calls.
      example: '1023845394834890324032948234'

    clientSecret:
      type: string
      description: |
        The client secret. The client secret is used with the client ID to attain a token for making API calls.
      example: '1023845394834890324032948233'

    creatorKeyId:
      type: string
      description: The ID of the KeyAdmin key that generated the key.
      example: '130eec4c3825463e8d06f1dd9c0b2c19'

    creatorName:
      type: string
      description: The name of the user who created the key.
      example: The name of API key creator.

    creatorEmail:
      type: string
      description: The email address of the user who created the key.
      example: 'yourname@cisco.com'

    Key:
      type: object
      description: The API key information.
      properties:
        name:
          $ref: '#/components/schemas/name'
        id:
          $ref: '#/components/schemas/id'
        clientId:
          $ref: '#/components/schemas/clientId'
        creatorKeyId:
          $ref: '#/components/schemas/creatorKeyId'
        creatorName:
          $ref: '#/components/schemas/creatorName'
        creatorEmail:
          $ref: '#/components/schemas/creatorEmail'
        createdAt:
          $ref: '#/components/schemas/createdAt'
        description:
          $ref: '#/components/schemas/description'
        expireAt:
          $ref: '#/components/schemas/expireAt'
        modifiedAt:
          $ref: '#/components/schemas/modifiedAt'
        lastUsedAt:
          $ref: '#/components/schemas/lastUsedAt'
        lastRefreshedAt:
          $ref: '#/components/schemas/lastRefreshedAt'
        scopes:
          $ref: '#/components/schemas/scopes'
        allowedIPs:
          $ref: '#/components/schemas/allowedIPs'
      required:
        - id
        - creatorName
        - creatorEmail
        - createdAt
        - expireAt
        - modifiedAt
        - lastUsedAt
        - lastRefreshedAt
        - scopes
      example:
        name: Networks RW
        id: '39b18499-4cf3-470d-997b-960e55ee0085'
        clientId: "1023845394834890324032948234"
        creatorName: 'Name of API key creator'
        creatorEmail: 'yourname@cisco.com'
        createdAt: '2021-10-02T20:00:00Z'
        description: "An API key to create and modify network deployments."
        expireAt: '2023-12-05T19:34:00Z'
        lastUsedAt: '2021-10-05T19:34:00Z'
        modifiedAt: '2021-10-02T20:00:00Z'
        lastRefreshedAt: '2021-10-02T20:00:00Z'
        scopes: [ "deployments.networks:read", "deployments.networks:write" ]
        allowedIPs: ['2001:420:c0c4:1006::427', '143.10.10.0/24']

  # Includes Key without allowedIPs field
    KeyForList:
      type: object
      description: The API key information.
      properties:
        name:
          $ref: '#/components/schemas/name'
        id:
          $ref: '#/components/schemas/id'
        clientId:
          $ref: '#/components/schemas/clientId'
        creatorKeyId:
          $ref: '#/components/schemas/creatorKeyId'
        creatorName:
          $ref: '#/components/schemas/creatorName'
        creatorEmail:
          $ref: '#/components/schemas/creatorEmail'
        createdAt:
          $ref: '#/components/schemas/createdAt'
        description:
          $ref: '#/components/schemas/description'
        expireAt:
          $ref: '#/components/schemas/expireAt'
        modifiedAt:
          $ref: '#/components/schemas/modifiedAt'
        lastUsedAt:
          $ref: '#/components/schemas/lastUsedAt'
        lastRefreshedAt:
          $ref: '#/components/schemas/lastRefreshedAt'
        scopes:
          $ref: '#/components/schemas/scopes'
 
      required:
        - id
        - creatorName
        - creatorEmail
        - createdAt
        - expireAt
        - modifiedAt
        - lastUsedAt
        - lastRefreshedAt
        - scopes
      example:
        name: Networks RW
        id: '39b18499-4cf3-470d-997b-960e55ee0085'
        clientId: "1023845394834890324032948234"
        creatorName: 'Name of API key creator'
        creatorEmail: 'yourname@cisco.com'
        createdAt: '2021-10-02T20:00:00Z'
        description: "An API key to create and modify network deployments."
        expireAt: '2023-12-05T19:34:00Z'
        lastUsedAt: '2021-10-05T19:34:00Z'
        modifiedAt: '2021-10-02T20:00:00Z'
        lastRefreshedAt: '2021-10-02T20:00:00Z'
        scopes: [ "deployments.networks:read", "deployments.networks:write" ]

    KeyWithSecret:
      type: object
      description: The API key information including the client id and secret.
      properties:
        name:
          $ref: '#/components/schemas/name'
        id:
          $ref: '#/components/schemas/id'
        clientId:
          $ref: '#/components/schemas/clientId'
        clientSecret:
          $ref: '#/components/schemas/clientSecret'
        creatorKeyId:
          $ref: '#/components/schemas/creatorKeyId'
        creatorName:
          $ref: '#/components/schemas/creatorName'
        creatorEmail:
          $ref: '#/components/schemas/creatorEmail'
        createdAt:
          $ref: '#/components/schemas/createdAt'
        description:
          $ref: '#/components/schemas/description'
        expireAt:
          $ref: '#/components/schemas/expireAt'
        modifiedAt:
          $ref: '#/components/schemas/modifiedAt'
        lastUsedAt:
          $ref: '#/components/schemas/lastUsedAt'
        lastRefreshedAt:
          $ref: '#/components/schemas/lastRefreshedAt'
        scopes:
          $ref: '#/components/schemas/scopes'
        allowedIPs:
          $ref: '#/components/schemas/allowedIPs'
      required:
        - id
        - clientId
        - clientSecret
        - creatorName
        - creatorEmail
        - createdAt
        - expireAt
        - modifiedAt
        - lastUsedAt
        - lastRefreshedAt
        - scopes
      example:
        name: Networks RW
        id: "39b18499-4cf3-470d-997b-960e55ee0085"
        clientId: '1023845394834890324032948234'
        clientSecret: '1023845394834890324032948233'
        creatorKeyId: '130eec4c3825463e8d06f1dd9c0b2c19'
        creatorName: 'Name of API key creator'
        creatorEmail: ''
        createdAt: '2021-10-02T20:00:00Z'
        description: "An API key to create and modify network deployments."
        expireAt: '2022-01-12T20:00:00Z'
        lastUsedAt: '2021-10-05T19:34:00Z'
        modifiedAt: '2021-10-02T20:00:00Z'
        lastRefreshedAt: '2021-10-02T20:00:00Z'
        scopes: [ "deployments.networks:read", "deployments.networks:write" ]
        allowedIPs:
          - '2001:420:c0c4:1006::427'

    # Key refresh secret, no allowedIPs field
    KeyRefreshSecret:
      type: object
      description: The API key information including the client id and secret.
      properties:
        name:
          $ref: '#/components/schemas/name'
        id:
          $ref: '#/components/schemas/id'
        clientId:
          $ref: '#/components/schemas/clientId'
        clientSecret:
          $ref: '#/components/schemas/clientSecret'
        creatorKeyId:
          $ref: '#/components/schemas/creatorKeyId'
        creatorName:
          $ref: '#/components/schemas/creatorName'
        creatorEmail:
          $ref: '#/components/schemas/creatorEmail'
        createdAt:
          $ref: '#/components/schemas/createdAt'
        description:
          $ref: '#/components/schemas/description'
        expireAt:
          $ref: '#/components/schemas/expireAt'
        modifiedAt:
          $ref: '#/components/schemas/modifiedAt'
        lastUsedAt:
          $ref: '#/components/schemas/lastUsedAt'
        lastRefreshedAt:
          $ref: '#/components/schemas/lastRefreshedAt'
        scopes:
          $ref: '#/components/schemas/scopes'
      required:
        - id
        - clientId
        - clientSecret
        - creatorName
        - creatorEmail
        - createdAt
        - expireAt
        - modifiedAt
        - lastUsedAt
        - lastRefreshedAt
        - scopes
      example:
        name: Networks RW
        id: "39b18499-4cf3-470d-997b-960e55ee0085"
        clientId: '1023845394834890324032948234'
        clientSecret: '1023845394834890324032948233'
        creatorKeyId: '130eec4c3825463e8d06f1dd9c0b2c19'
        creatorName: 'Name of API key creator'
        creatorEmail: ''
        createdAt: '2021-10-02T20:00:00Z'
        description: "An API key to create and modify network deployments."
        expireAt: '2022-01-12T20:00:00Z'
        lastUsedAt: '2021-10-05T19:34:00Z'
        modifiedAt: '2021-10-02T20:00:00Z'
        lastRefreshedAt: '2021-10-02T20:00:00Z'
        scopes: [ "deployments.networks:read", "deployments.networks:write" ]
