Hathora DiscoveryV2 API

Region ping endpoints for latency-based routing.

OpenAPI Specification

hathora-discoveryv2-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Hathora Cloud AppsV2 DiscoveryV2 API
  description: Hathora Cloud is on-demand, globally distributed compute for multiplayer game servers. Use the Hathora Cloud API to manage applications, upload and run game server builds, configure deployments, launch and stop processes, create and manage rooms, discover ping endpoints, stream logs, read process metrics, and manage organization tokens and billing. Player-facing authentication issues short-lived player tokens for use with room and lobby endpoints.
  termsOfService: https://hathora.dev/terms-of-service
  contact:
    name: Hathora Support
    url: https://hathora.dev
    email: support@hathora.dev
  version: '3.0'
servers:
- url: https://api.hathora.dev
  description: Hathora Cloud production API
security:
- hathoraDevToken: []
tags:
- name: DiscoveryV2
  description: Region ping endpoints for latency-based routing.
paths:
  /discovery/v2/ping:
    get:
      operationId: GetPingServiceEndpoints
      tags:
      - DiscoveryV2
      summary: Returns an array of all regions with a host and port that a client can directly ping for latency-based routing.
      security: []
      responses:
        '200':
          description: Ping service endpoints.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DiscoveryResponse'
components:
  schemas:
    DiscoveryResponse:
      type: object
      properties:
        region:
          $ref: '#/components/schemas/Region'
        host:
          type: string
        port:
          type: integer
    Region:
      type: string
      description: The region where a process, room, or lobby runs.
      enum:
      - Seattle
      - Los_Angeles
      - Washington_DC
      - Chicago
      - London
      - Frankfurt
      - Mumbai
      - Singapore
      - Tokyo
      - Sydney
      - Sao_Paulo
  securitySchemes:
    hathoraDevToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Organization developer/API token used for management endpoints (apps, builds, deployments, processes, rooms, logs, metrics, billing, tokens).
    playerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Short-lived player token issued by the AuthV1 login endpoints, used by game clients for room and lobby operations.