VATSIM User API

The User API from VATSIM — 1 operation(s) for user.

OpenAPI Specification

vatsim-user-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: VATSIM AIP Airport info User API
  version: 2.0.0
  termsOfService: https://vatsim.net/docs/policy/user-agreement
  contact:
    email: tech@vatsim.net
    name: VATSIM Technology Team
servers:
- url: https://my.vatsim.net/api/v2/aip
tags:
- name: User
paths:
  /api/user:
    get:
      tags:
      - User
      summary: Get user details
      description: Returns details about the authenticated user
      operationId: getUser
      security:
      - connect:
        - full_name
        - email
        - vatsim_details
        - country
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/User'
        '500':
          description: Invalid client
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError'
components:
  schemas:
    User:
      type: object
      properties:
        cid:
          type: string
          description: VATSIM ID
          example: '1234567'
        personal:
          type: object
          description: Personal details
          properties:
            name_first:
              type: string
              description: First name
              example: Kennedy
            name_last:
              type: string
              description: Last name
              example: Steve
            name_full:
              type: string
              description: Full name
              example: Kennedy Steve
            email:
              type: string
              description: Email address
              example: k.steve@vatsim.net
            country:
              type: object
              description: Country of residence
              properties:
                id:
                  type: string
                  description: Country code
                  example: US
                name:
                  type: string
                  description: Country name
                  example: United States
        vatsim:
          type: object
          properties:
            rating:
              type: object
              description: Controller rating
              properties:
                id:
                  type: integer
                  description: Controller Rating ID
                  example: 0
                short:
                  type: string
                  pattern: /[A-Z0-9]{2,4}/
                  description: Short identifier
                  example: EXMP
                long:
                  type: string
                  description: Human-readable name
                  example: Example Rating
            pilotrating:
              type: object
              description: Pilot rating
              properties:
                id:
                  type: integer
                  description: Pilot Rating ID
                  example: 0
                short:
                  type: string
                  pattern: /[A-Z0-9]{2,4}/
                  description: Short identifier
                  example: EXMP
                long:
                  type: string
                  description: Human-readable name
                  example: Example Rating
            region:
              type: object
              description: Region
              properties:
                id:
                  type: string
                  description: Region ID
                  example: AMAS
                name:
                  type: string
                  description: Region name
                  example: Americas
            division:
              type: object
              description: Division
              properties:
                id:
                  type: string
                  description: Division ID
                  example: USA
                name:
                  type: string
                  description: Division name
                  example: United States
            subdivision:
              type: object
              description: Subdivision
              properties:
                id:
                  type: string
                  description: Subdivision ID
                  example: null
                name:
                  type: string
                  description: Subdivision name
                  example: null
        oauth:
          type: object
          properties:
            token_valid:
              type: string
              description: Whether the access token is valid
              enum:
              - 'true'
              - 'false'
    APIError:
      type: object
      properties:
        error_code:
          type: string
          description: Error code
          enum:
          - VSO1
          - VSO2
          - VSO3
        log_code:
          type: string
          description: Reference ID for VATSIM staff
          example: SSO7cQDRG
        error:
          type: string
          description: Human-readable error message