Macrometa Position API

The Position API from Macrometa — 2 operation(s) for position.

OpenAPI Specification

macrometa-position-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Macrometa API Reference Activity Metrics Position API
  version: 0.17.17
  description: API reference for the Macrometa Global Data Network.
  license:
    name: Macrometa License, Version 2.0
servers:
- url: https://api-play.paas.macrometa.io
  description: GDN API
host: api-play.paas.macrometa.io
security:
- ApiKeyAuth: []
- BearerAuth: []
tags:
- name: Position
paths:
  /api/vwr/v1/position/{waitingroom_key}:
    get:
      summary: Get initial position in the waiting room
      description: Get initial position in the waiting room.
      tags:
      - Position
      security:
      - APIKeyAuth: []
      parameters:
      - in: path
        name: waitingroom_key
        required: true
        schema:
          type: string
        description: The unique key of a waiting room.
      responses:
        '200':
          description: Successfully retrieved waiting room data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPositionResponse'
        '400':
          description: Bad request.
        '401':
          description: Authorization failure due to invalid authentication credentials.
        '404':
          description: Not found.
        '500':
          description: Internal server error.
  /api/vwr/v1/position/{waitingroom_key}/{request_id}:
    get:
      summary: Provide current position in the waiting room
      description: Provides the user's position in the waiting room.\n\nA position of 0 indicates that the user is no longer in the waiting room and has gained access to the requested resource.
      tags:
      - Position
      security:
      - APIKeyAuth: []
      parameters:
      - in: path
        name: waitingroom_key
        required: true
        schema:
          type: string
      - in: path
        name: request_id
        required: true
        schema:
          type: number
        description: The user's request ID.
      responses:
        '200':
          description: Successfully obtained waiting room data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPositionResponse'
        '400':
          description: Bad request.
        '401':
          description: Authorization failure due to invalid authentication credentials.
        '404':
          description: Not found.
        '500':
          description: Internal server error.
components:
  schemas:
    GetPositionResponse:
      type: object
      required:
      - position
      properties:
        position:
          type: number
          description: The user's current position in the waiting room. 0 means the user doesn't need to wait in the waiting room any longer and can go to the origin.
        waiting_time:
          type: number
          description: Expected time, in seconds, to spend in waiting room.
        queue_depth:
          type: number
          description: Number of users currently in the waiting room.
        request_id:
          type: number
          description: The user's session ID for this access request.
        refresh_interval:
          type: number
          description: Specifies the time interval, in seconds, for subsequent checks of the session status.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Provide an API Key to the `Authorization` header, prefixed with "apikey".


        Example: `Authorization: apikey <key>`'
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Provide a JSON Web Token (JWT) to the `Authorization` header, prefixed with "bearer".


        Example: `Authorization: bearer <jwt>`'