VATSIM members API

The members API from VATSIM — 7 operation(s) for members.

OpenAPI Specification

vatsim-members-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: VATSIM AIP Airport info members 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: members
paths:
  /v2/members/{member_id}/flightplans:
    get:
      operationId: members_api_retrieve_member_flightplans
      summary: Get a member's flight plans
      parameters:
      - in: path
        name: member_id
        schema:
          title: Member Id
          type: integer
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: Response
                type: array
                items:
                  $ref: '#/components/schemas/FlightPlans'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      description: Returns the last 50 flight plans filed by a member.
      tags:
      - members
  /v2/members/{member_id}/stats:
    get:
      operationId: members_api_retrieve_member_stats
      summary: Get a member's statistics
      parameters:
      - in: path
        name: member_id
        schema:
          title: Member Id
          type: integer
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stats'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      description: Returns a member's statistics per position and rating.
      tags:
      - members
  /v2/members/{member_id}/status:
    get:
      operationId: members_api_retrieve_member_status
      summary: Get a member's online status
      parameters:
      - in: path
        name: member_id
        schema:
          title: Member Id
          type: integer
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnlineSchema'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      description: Returns a member's current connection, or a 404 if offline.
      tags:
      - members
  /v2/members/{member_id}:
    get:
      operationId: members_api_retrieve_member_details
      summary: Get a member's details
      parameters:
      - in: path
        name: member_id
        schema:
          title: Member Id
          type: integer
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: Response
                anyOf:
                - $ref: '#/components/schemas/Member'
                - $ref: '#/components/schemas/LimitedMemberSchema'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      description: 'Returns a member''s details.


        The following fields are restricted to authenticated users only:

        - name_first

        - name_last'
      tags:
      - members
      security:
      - APIKeyAuth: []
      - LegacyAuth: []
    patch:
      operationId: members_api_update_member_details
      summary: Update a member's details
      parameters:
      - in: path
        name: member_id
        schema:
          title: Member Id
          type: integer
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Member'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      description: 'Updates a member''s details.


        - All fields, except for `comment`, are optional.

        - Modifiable fields may be limited by your key''s permissions.'
      tags:
      - members
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemberUnrestricted'
        required: true
      security:
      - APIKeyAuth: []
      - LegacyAuth: []
  /v2/members/{member_id}/atc:
    get:
      operationId: members_api_history_atc_cid
      summary: List a member's previous ATC sessions
      parameters:
      - in: path
        name: member_id
        schema:
          title: Member Id
          type: integer
        required: true
      - in: query
        name: limit
        schema:
          title: Limit
          default: 100
          minimum: 1
          type: integer
        required: false
      - in: query
        name: offset
        schema:
          title: Offset
          default: 0
          minimum: 0
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedAtcSchema'
      description: Returns a list of all previous controlling sessions for a member.
      tags:
      - members
  /v2/members/online:
    get:
      operationId: members_api_online
      summary: List all online pilots
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: Response
                type: array
                items:
                  $ref: '#/components/schemas/OnlineSchema'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      description: Returns a list of all online pilots.
      tags:
      - members
  /v2/members/{member_id}/history:
    get:
      operationId: members_api_history
      summary: List a member's previous pilot sessions
      parameters:
      - in: path
        name: member_id
        schema:
          title: Member Id
          type: integer
        required: true
      - in: query
        name: limit
        schema:
          title: Limit
          default: 100
          minimum: 1
          type: integer
        required: false
      - in: query
        name: offset
        schema:
          title: Offset
          default: 0
          minimum: 0
          type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagedConnection'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
      description: Returns a list of all previous pilot sessions for a member.
      tags:
      - members
components:
  schemas:
    OnlineSchema:
      title: OnlineSchema
      type: object
      properties:
        id:
          title: Id
          type: integer
        callsign:
          title: Callsign
          maxLength: 15
          type: string
        start:
          title: Start
          type: string
          format: date-time
        server:
          title: Server
          maxLength: 20
          type: string
        rating:
          title: Rating
          type: integer
        fp:
          $ref: '#/components/schemas/FlightPlans'
      required:
      - start
      - rating
    Stats:
      title: Stats
      type: object
      properties:
        id:
          title: Id
          type: integer
        atc:
          title: Atc
          type: number
        pilot:
          title: Pilot
          type: number
        s1:
          title: S1
          type: number
        s2:
          title: S2
          type: number
        s3:
          title: S3
          type: number
        c1:
          title: C1
          type: number
        c2:
          title: C2
          type: number
        c3:
          title: C3
          type: number
        i1:
          title: I1
          type: number
        i2:
          title: I2
          type: number
        i3:
          title: I3
          type: number
        sup:
          title: Sup
          type: number
        adm:
          title: Adm
          type: number
      required:
      - atc
      - pilot
      - s1
      - s2
      - s3
      - c1
      - c2
      - c3
      - i1
      - i2
      - i3
      - sup
      - adm
    Member:
      title: Member
      description: Only to be used for response validation as it is unprotected.
      type: object
      properties:
        id:
          title: Id
          type: integer
        name_first:
          title: Name First
          type: string
        name_last:
          title: Name Last
          type: string
        email:
          title: Email
          type: string
        countystate:
          title: Countystate
          type: string
        country:
          title: Country
          type: string
        rating:
          title: Rating
          type: integer
        pilotrating:
          title: Pilotrating
          default: 0
          type: integer
        militaryrating:
          title: Militaryrating
          default: 0
          type: integer
        susp_date:
          title: Susp Date
          type: string
          format: date-time
        reg_date:
          title: Reg Date
          type: string
          format: date-time
        region_id:
          title: Region Id
          type: string
        division_id:
          title: Division Id
          type: string
        subdivision_id:
          title: Subdivision Id
          type: string
        lastratingchange:
          title: Lastratingchange
          type: string
          format: date-time
      required:
      - id
      - countystate
      - country
      - rating
      - reg_date
      - region_id
      - division_id
    LimitedMemberSchema:
      title: LimitedMemberSchema
      type: object
      properties:
        id:
          title: Id
          type: integer
        rating:
          title: Rating
          type: integer
        pilotrating:
          title: Pilotrating
          type: integer
        militaryrating:
          title: Militaryrating
          type: integer
        susp_date:
          title: Susp Date
          type: string
          format: date-time
        reg_date:
          title: Reg Date
          type: string
          format: date-time
        region_id:
          title: Region Id
          type: string
        division_id:
          title: Division Id
          type: string
        subdivision_id:
          title: Subdivision Id
          type: string
        lastratingchange:
          title: Lastratingchange
          type: string
          format: date-time
      required:
      - id
      - rating
      - pilotrating
      - militaryrating
      - reg_date
      - region_id
      - division_id
    NotFound:
      title: NotFound
      type: object
      properties:
        detail:
          title: Detail
          default: Not Found.
          type: string
    Message:
      title: Message
      description: Requests that produce an error use this schema
      type: object
      properties:
        message:
          title: Message
          type: string
      required:
      - message
    AtcSchema:
      title: AtcSchema
      type: object
      properties:
        connection_id:
          $ref: '#/components/schemas/Connection'
        aircrafttracked:
          title: Aircrafttracked
          type: integer
        aircraftseen:
          title: Aircraftseen
          type: integer
        flightsamended:
          title: Flightsamended
          type: integer
        handoffsinitiated:
          title: Handoffsinitiated
          type: integer
        handoffsreceived:
          title: Handoffsreceived
          type: integer
        handoffsrefused:
          title: Handoffsrefused
          type: integer
        squawksassigned:
          title: Squawksassigned
          type: integer
        cruisealtsmodified:
          title: Cruisealtsmodified
          type: integer
        tempaltsmodified:
          title: Tempaltsmodified
          type: integer
        scratchpadmods:
          title: Scratchpadmods
          type: integer
      required:
      - connection_id
      - aircrafttracked
      - aircraftseen
      - flightsamended
      - handoffsinitiated
      - handoffsreceived
      - handoffsrefused
      - squawksassigned
      - cruisealtsmodified
      - tempaltsmodified
      - scratchpadmods
    PagedConnection:
      title: PagedConnection
      type: object
      properties:
        items:
          title: Items
          type: array
          items:
            $ref: '#/components/schemas/Connection'
        count:
          title: Count
          type: integer
      required:
      - items
      - count
    PagedAtcSchema:
      title: PagedAtcSchema
      type: object
      properties:
        items:
          title: Items
          type: array
          items:
            $ref: '#/components/schemas/AtcSchema'
        count:
          title: Count
          type: integer
      required:
      - items
      - count
    FlightPlans:
      title: FlightPlans
      type: object
      properties:
        id:
          title: Id
          type: integer
        connection_id:
          title: Connection Id
          type: integer
        vatsim_id:
          title: Vatsim Id
          maxLength: 8
          type: string
        flight_type:
          title: Flight Type
          maxLength: 4
          type: string
        callsign:
          title: Callsign
          maxLength: 10
          type: string
        aircraft:
          title: Aircraft
          maxLength: 135
          type: string
        cruisespeed:
          title: Cruisespeed
          maxLength: 5
          type: string
        dep:
          title: Dep
          maxLength: 4
          type: string
        arr:
          title: Arr
          maxLength: 4
          type: string
        alt:
          title: Alt
          maxLength: 4
          type: string
        altitude:
          title: Altitude
          maxLength: 6
          type: string
        rmks:
          title: Rmks
          maxLength: 1200
          type: string
        route:
          title: Route
          maxLength: 2535
          type: string
        deptime:
          title: Deptime
          maxLength: 5
          type: string
        hrsenroute:
          title: Hrsenroute
          type: integer
        minenroute:
          title: Minenroute
          type: integer
        hrsfuel:
          title: Hrsfuel
          type: integer
        minsfuel:
          title: Minsfuel
          type: integer
        filed:
          title: Filed
          type: string
          format: date-time
        assignedsquawk:
          title: Assignedsquawk
          maxLength: 4
          type: string
        modifiedbycid:
          title: Modifiedbycid
          maxLength: 8
          type: string
        modifiedbycallsign:
          title: Modifiedbycallsign
          maxLength: 10
          type: string
      required:
      - vatsim_id
      - flight_type
      - callsign
      - aircraft
      - cruisespeed
      - dep
      - arr
      - altitude
      - hrsenroute
      - minenroute
      - hrsfuel
      - minsfuel
      - filed
    Connection:
      title: Connection
      type: object
      properties:
        id:
          title: Id
          type: integer
        vatsim_id:
          title: Vatsim Id
          maxLength: 8
          type: string
        type:
          title: Type
          type: integer
        rating:
          title: Rating
          type: integer
        callsign:
          title: Callsign
          type: string
        start:
          title: Start
          type: string
          format: date-time
        end:
          title: End
          type: string
          format: date-time
        server:
          title: Server
          maxLength: 20
          type: string
      required:
      - vatsim_id
      - type
      - rating
      - callsign
    MemberUnrestricted:
      title: MemberUnrestricted
      description: Superuser schema - this can set suspended ratings and passwords.
      type: object
      properties:
        name_first:
          title: Name First
          type: string
        name_last:
          title: Name Last
          type: string
        name_mothermaiden:
          title: Name Mothermaiden
          type: string
        email:
          title: Email
          type: string
        password:
          title: Password
          type: string
        age:
          title: Age
          type: integer
        countystate:
          title: Countystate
          type: string
        country:
          title: Country
          type: string
        rating:
          title: Rating
          type: integer
        pilotrating:
          title: Pilotrating
          type: integer
        militaryrating:
          title: Militaryrating
          type: integer
        susp_date:
          title: Susp Date
          type: string
          format: date-time
        susp_prevrat:
          title: Susp Prevrat
          type: integer
        region_id:
          title: Region Id
          type: string
        division_id:
          title: Division Id
          type: string
        subdivision_id:
          title: Subdivision Id
          type: string
        lastregionxfer:
          title: Lastregionxfer
          type: string
          format: date-time
        lastratingchange:
          title: Lastratingchange
          type: string
          format: date-time
        comment:
          title: Comment
          type: string