AltitudeWeb/open_api/api.yml
2025-04-02 19:18:39 +02:00

67 lines
1.5 KiB
YAML

openapi: 3.0.4
info:
title: Altitude Web API
description: |-
The API for the Altitude website
version: 1.0.0
servers:
- url: https://alttd.com/api/v3
tags:
- name: player
description: Retrieve player information
paths:
/player/history:
post:
tags:
- user
summary: Get player history
description: Retrieves all types of player history about the player
operationId: getPlayerHistory
requestBody:
description: The player history
content:
application/json:
schema:
$ref: '#/components/schemas/Player'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/PlayerHistory'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
components:
schemas:
Player:
type: object
properties:
uuid:
type: string
example: 0c35e520-927e-4c6a-87ad-ff0739c22e9d
PlayerHistory:
type: object
properties:
punishmentType:
type: string
punishment:
type: string
active:
type: boolean
start:
type: integer
format: int64
duration:
type: integer
format: int64
Error:
type: object
properties:
reason:
type: string