openapi: 3.1.0
info:
  title: SAPOT Server — Gps
  version: 0.1.2
paths:
  /gps/history/{user_id}:
    get:
      tags:
      - GPS
      summary: Get User Location History
      description: Returns the last 'X' locations for a specific user to show their path.
      operationId: get_user_location_history_gps_history__user_id__get
      security:
      - OAuth2PasswordBearer: []
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: User Id
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 50
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '404':
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /gps/latest:
    get:
      tags:
      - GPS
      summary: Get All Latest Locations
      description: |-
        Returns the most recent location for every user who has sent a ping.
        Useful for the initial map load.
      operationId: get_all_latest_locations_gps_latest_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '404':
          description: Not Found
      security:
      - OAuth2PasswordBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: auth/token
