mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-04-03 08:36:00 +00:00
136 lines
3.5 KiB
YAML
136 lines
3.5 KiB
YAML
openapi: "3.0.2"
|
|
info:
|
|
title: BeamMP-Server
|
|
version: "api-v1"
|
|
description: |
|
|
The BeamMP-Server optionally runs an HTTP server
|
|
which can be used to query information about the server's
|
|
status, health, players, etc.
|
|
servers:
|
|
- url: http://localhost:{port}/api/v1
|
|
description: BeamMP-Server API v1
|
|
variables:
|
|
port:
|
|
default: "8000"
|
|
|
|
paths:
|
|
/player/{name}/vehicles:
|
|
parameters:
|
|
- name: "name"
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
example: "LionKor"
|
|
get:
|
|
summary: vehicles this player has spawend
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
content:
|
|
"application/json":
|
|
schema:
|
|
type: array
|
|
items:
|
|
type: object
|
|
properties:
|
|
jbm:
|
|
type: string
|
|
example: "bolide"
|
|
/version:
|
|
get:
|
|
summary: server version
|
|
description: |
|
|
Server version in 'major.minor.patch' semver format
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
content:
|
|
"text/plain":
|
|
schema:
|
|
type: string
|
|
example: "3.1.0"
|
|
/players:
|
|
get:
|
|
summary: list of players on this server
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
content:
|
|
"application/json":
|
|
schema:
|
|
type: array
|
|
example:
|
|
- "LionKor"
|
|
- "Titch"
|
|
items:
|
|
type: string
|
|
/config:
|
|
get:
|
|
summary: describes server configuration
|
|
description: |
|
|
An overview over the configuration currently
|
|
used by this server.
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
content:
|
|
"application/json":
|
|
schema:
|
|
type: object
|
|
properties:
|
|
name:
|
|
type: string
|
|
example: "my awesome beammp server"
|
|
description:
|
|
type: string
|
|
example: "join!"
|
|
max_players:
|
|
type: integer
|
|
example: 7
|
|
max_cars:
|
|
type: integer
|
|
example: 2
|
|
map:
|
|
type: string
|
|
example: "/levels/gridmap_v2/info.json"
|
|
private:
|
|
type: boolean
|
|
/ready:
|
|
get:
|
|
summary: whether the server has started fully
|
|
description: |
|
|
True once all subsystems have started up.
|
|
This doesn't tell you whether they're healthy,
|
|
check /health for that information.
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
content:
|
|
"text/plain":
|
|
schema:
|
|
type: boolean
|
|
/health:
|
|
get:
|
|
summary: health of the server's systems
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
content:
|
|
"application/json":
|
|
schema:
|
|
type: object
|
|
properties:
|
|
healthy:
|
|
type: boolean
|
|
good:
|
|
type: array
|
|
items:
|
|
type: string
|
|
example: "Heartbeat"
|
|
bad:
|
|
type: array
|
|
items:
|
|
type: string
|
|
example: "ResourceManager"
|