openapi: 3.0.0
info:
  description: This is the OAS 3.0 specification for the Whoami API in Sophos Central.
  version: 1.0.0
  contact:
    name: Sophos Central APIs
    email: apis@sophos.com
    url: 'https://developer.sophos.com'
  title: Whoami API
tags:
  - name: whoami
    description: Whoami API.
servers:
  - url: 'https://api.central.sophos.com/whoami/v1'
    description: Global service in the production environment.
security:
  - bearerAuth: []
paths:
  /:
    get:
      tags:
        - whoami
      summary: Who am I?
      description: Returns information about the caller.
      operationId: whoami
      responses:
        '200':
          description: Information about the caller.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Tells the caller more about themselves based on their auth
                  token.
                required:
                  - id
                properties:
                  id:
                    description: ID of the caller.
                    type: string
                    format: uuid
                  idType:
                    type: string
                    description: The type of the ID of the caller.
                    enum:
                      - partner
                      - organization
                      - distributor
                      - tenant
                  apiHosts:
                    type: object
                    description: API hosts that are available to the caller.
                    properties:
                      global:
                        type: string
                        format: uri
                      dataRegion:
                        type: string
                        format: uri
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
