# API GAMEMONITORING

REST API GAMEMONITORING returnează date JSON despre servere, jucători, postări, istoricul online și voturi. Aici găsiți regulile de bază ale integrării și prima cerere. Parametrii și testarea cererilor sunt disponibile pe paginile metodelor.

## Adresa de bază

https://api.gamemonitoring.ro

## Prima cerere

Începeți cu datele publice ale unui server. ID-ul serverului se află la sfârșitul adresei paginii sale din GAMEMONITORING.

```bash
curl --header 'Accept: application/json' 'https://api.gamemonitoring.ro/servers/1'
```

## Alegeți metoda

- [POST /servers — Adaugă server](https://gamemonitoring.ro/developers/docs/api/servers/__post.md)
- [GET /servers/{server_id} — Server](https://gamemonitoring.ro/developers/docs/api/servers/:server_id/__get.md)
- [GET /servers/{server_id}/players — Jucătorii serverului](https://gamemonitoring.ro/developers/docs/api/servers/:server_id/players/__get.md)
- [GET /servers/{server_id}/posts — Postări care menționează serverul](https://gamemonitoring.ro/developers/docs/api/servers/:server_id/posts/__get.md)
- [GET /servers/{server_id}/stats/players_online — Graficul numărului de jucători pe server](https://gamemonitoring.ro/developers/docs/api/servers/:server_id/stats/players_online/__get.md)
- [GET /servers/{server_id}/votes — Voturile serverului](https://gamemonitoring.ro/developers/docs/api/servers/:server_id/votes/__get.md)
- [GET /servers/{server_id}/votes/chart — Graficul voturilor serverului](https://gamemonitoring.ro/developers/docs/api/servers/:server_id/votes/chart/__get.md)
- [GET /servers/{server_id}/votes/top — Top votanți ai serverului](https://gamemonitoring.ro/developers/docs/api/servers/:server_id/votes/top/__get.md)
- [GET /projects/{project_id}/stats/players_online — Graficul numărului de jucători din proiect](https://gamemonitoring.ro/developers/docs/api/projects/:project_id/stats/players_online/__get.md)
- [GET /projects/{project_id}/votes — Voturile proiectului](https://gamemonitoring.ro/developers/docs/api/projects/:project_id/votes/__get.md)
- [GET /projects/{project_id}/votes/chart — Graficul voturilor proiectului](https://gamemonitoring.ro/developers/docs/api/projects/:project_id/votes/chart/__get.md)
- [GET /projects/{project_id}/votes/top — Top votanți ai proiectului](https://gamemonitoring.ro/developers/docs/api/projects/:project_id/votes/top/__get.md)
- [GET /votes/{vote_id} — Vot](https://gamemonitoring.ro/developers/docs/api/votes/:vote_id/__get.md)
- [POST /votes/{vote_id}/claim — Confirmă procesarea votului](https://gamemonitoring.ro/developers/docs/api/votes/:vote_id/claim/__post.md)
- [GET /users/{id} — Profil de utilizator](https://gamemonitoring.ro/developers/docs/api/users/:id/__get.md)
- [POST /users/verify-code — Confirmă titularul contului](https://gamemonitoring.ro/developers/docs/api/users/verify-code/__post.md)

## Versiuni API

Puteți selecta versiunea API prin parametrul opțional v din interogare. Versiunea actuală este 1.0.0. Versiunea determină căile disponibile, câmpurile cererii și formatul răspunsului.

Fără v se folosește cea mai mică versiune acceptată. După retragerea ei, următoarea versiune minimă devine implicită. Specificați v pentru un contract fix. O versiune invalidă, repetată sau neacceptată returnează HTTP 400; pentru versiunile neacceptate, valorile disponibile sunt în error.data.supported_versions.

## Transmiterea parametrilor

ID-urile sunt în calea cererii: server_id și project_id sunt ID-uri numerice GAMEMONITORING, iar vote_id identifică un vot. Înlocuiți parametrii dintre acolade cu valorile concrete.

Filtrele, perioadele și paginarea se transmit după ? în URL. Codificați valorile prin URLSearchParams sau funcția bibliotecii folosite, în special poreclele și textul căutat.

Pentru adăugarea unui server, trimiteți JSON cu Content-Type: application/json. connect este un host:port public, iar steam_app_id este Steam App ID al jocului. Folosiți query când portul de interogare diferă de cel de conectare.

## Formatul datelor

HTTP 200 include rezultatul în response: un obiect, o listă sau un obiect cu items, în funcție de metodă. Consultați schema metodei; o listă goală nu este în sine o eroare.

Unele câmpuri pot fi null sau absente. Aceste valori diferă de 0, false și textul gol; tratați separat datele lipsă.

created_at, expires_at și last_update folosesc timpul Unix în secunde. Înmulțiți cu 1000 pentru JavaScript Date; pentru filtre, împărțiți Date.now() la 1000 și rotunjiți în jos.

Păstrați identificatorii Steam pe 64 de biți ca șiruri de caractere. Conversia la JavaScript Number poate pierde precizia. ID-ul serverului GAMEMONITORING și Steam App ID al jocului sunt diferite.

## Erori și reîncercări

Verificați statusul HTTP și obiectul error: code conține codul, message explicația, iar data detalii suplimentare când sunt disponibile. Textul depinde de regiune și se poate schimba; nu îl folosiți drept condiție în cod.

Corectați erorile de parametri sau acces înainte de reîncercare. Tratați și erorile de rețea sau răspunsurile proxy care pot să nu conțină JSON.

Datele reflectă ultima interogare a serverului și pot fi memorate în cache. Verificați last_update, alegeți un interval rezonabil de actualizare și memorați rezultatul în integrare. Interogarea frecventă a API nu accelerează actualizarea serverului de joc.

## Voturi și Webhook

Configurați Webhook-ul proiectului pentru a reacționa la voturi noi. Verificați signature, ignorați testele is_test=true și folosiți event_id ca vote_id pentru a obține votul prin API. Verificați entity_type și entity_id și procesați o singură dată perechea event_type + event_id. Confirmați evenimentele de test cu un răspuns 2xx, fără a acorda recompense.

## Ajutor pentru integrare

Pentru raportarea unei erori, pregătiți metoda HTTP, calea, parametrii, momentul cererii, statusul HTTP și error primit. Aceste date ajută la reproducerea problemei.

## OpenAPI

```json
{
  "openapi": "3.1.1",
  "info": {
    "title": "GAMEMONITORING",
    "version": "1.0.0"
  },
  "paths": {
    "/servers": {
      "post": {
        "operationId": "createServer",
        "summary": "Adaugă server",
        "description": "Adaugă un server după adresa de conectare sau returnează serverul existent.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connect": {
                    "type": "string",
                    "minLength": 1,
                    "example": "198.51.100.24:27015"
                  },
                  "steam_app_id": {
                    "type": "integer",
                    "minimum": 0,
                    "example": 730
                  },
                  "query": {
                    "type": "integer",
                    "minimum": 10,
                    "maximum": 65535,
                    "example": 27016
                  }
                },
                "required": [
                  "connect",
                  "steam_app_id"
                ]
              },
              "example": {
                "connect": "198.51.100.24:27015",
                "steam_app_id": 730
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created or existing server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerCreateResult"
                },
                "example": {
                  "response": {
                    "connect": "198.51.100.24:27015",
                    "game": 730,
                    "id": 100001,
                    "name": "Example Arena",
                    "request": "198.51.100.24:27016",
                    "status": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing game or address, invalid address or offline server"
          },
          "403": {
            "description": "Blocked address"
          },
          "409": {
            "description": "Query address is already in use"
          },
          "503": {
            "description": "Server creation service is unavailable"
          },
          "504": {
            "$ref": "#/components/responses/QueryTimeout"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/servers/{server_id}": {
      "get": {
        "operationId": "getServer",
        "summary": "Server",
        "description": "Returnează datele publice ale serverului.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Server details response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerEnvelope"
                },
                "example": {
                  "response": {
                    "steam_id": "90123456789012345",
                    "domain": null,
                    "id": 1,
                    "ip": "198.51.100.24",
                    "port": 27015,
                    "query": 27015,
                    "project_id": 42,
                    "color": 0,
                    "city": "Prague",
                    "description": "[]",
                    "game": 730,
                    "boosts": 3,
                    "last_offline": 1782751200,
                    "last_online": 1783201200,
                    "icon": null,
                    "name": "Example CS2 Server",
                    "connect": "198.51.100.24:27015",
                    "request": "198.51.100.24:27015",
                    "map": "de_mirage",
                    "gamemode": "Counter-Strike 2",
                    "version": "1.41.6.5",
                    "numplayers": 12,
                    "maxplayers": 64,
                    "bots": 0,
                    "secured": true,
                    "private": false,
                    "country": "CZ",
                    "status": true,
                    "votes": 128,
                    "points": 2450,
                    "add_date": 1701541119,
                    "last_update": 1783201200,
                    "ban_reason": null,
                    "banned": false,
                    "wipe": null,
                    "official": null,
                    "wipe_period": null,
                    "next_wipe": null,
                    "pve": null,
                    "pvp": null,
                    "list_hidden": false,
                    "hide_address": false,
                    "hide_query": false,
                    "position_game": 12,
                    "language": "en",
                    "parked": false,
                    "app": {
                      "id": 2,
                      "steam_id": 730,
                      "name": "Counter-Strike 2",
                      "url": "counter-strike-2"
                    },
                    "mods": [
                      {
                        "id": 5,
                        "name": "Admin System"
                      },
                      {
                        "id": 14,
                        "name": "Advertisement"
                      },
                      {
                        "id": 9,
                        "name": "Admins"
                      },
                      {
                        "id": 3,
                        "name": "Admin Commands"
                      }
                    ],
                    "disabled_modules": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/QueryTimeout"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/servers/{server_id}/players": {
      "get": {
        "operationId": "getServerPlayers",
        "summary": "Jucătorii serverului",
        "description": "Returnează lista jucătorilor serverului.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Număr de elemente de la 1 la 100, implicit 50",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50,
              "example": 5
            }
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Server players",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerPlayersResult"
                },
                "example": {
                  "response": {
                    "items": [
                      {
                        "avatar": "no.jpg",
                        "created": 1783200000,
                        "last_online": 1783203600,
                        "last_session_time": 0,
                        "name": "NovaPlayer",
                        "user": null,
                        "username": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/QueryTimeout"
          }
        }
      }
    },
    "/servers/{server_id}/posts": {
      "get": {
        "operationId": "getServerPosts",
        "summary": "Postări care menționează serverul",
        "description": "Returnează postările publice cu o mențiune vizibilă a serverului indicat.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "before_created_at",
            "in": "query",
            "description": "Pentru pagina următoare, trimiteți `created_at` al ultimei postări în secunde Unix și `id` al acesteia în `before_id`. Păstrați celelalte filtre. Cursorul funcționează când `sort` și `period` sunt omise. Dacă setați oricare dintre ele, folosiți `offset`.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "before_id",
            "in": "query",
            "description": "ID-ul publicației pentru cursor",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "conversation_post_id",
            "in": "query",
            "description": "ID-ul publicației din discuție",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "Folosiți top pentru perioada celor mai bune publicații.",
            "schema": {
              "type": "string",
              "const": "top"
            }
          },
          {
            "name": "reply_to_post_id",
            "in": "query",
            "description": "ID-ul publicației părinte",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "root_only",
            "in": "query",
            "description": "Valoarea 1 returnează doar publicațiile principale",
            "schema": {
              "type": "number",
              "const": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Ordinea publicațiilor. Pentru cele mai bune publicații folosiți helpful-desc.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "visibility",
            "in": "query",
            "description": "Această operație returnează numai publicații publice.",
            "schema": {
              "type": "string",
              "const": "public"
            }
          },
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Număr de elemente de la 1 la 100, implicit 20",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20,
              "example": 5
            }
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 120,
              "example": "admin"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public posts mentioning the server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerPostsResult"
                },
                "example": {
                  "response": [
                    {
                      "id": 1001,
                      "comment": "Great server! Thanks to the admin team.",
                      "conversation_post_id": null,
                      "language": "en",
                      "moderation_needed": false,
                      "replays": 0,
                      "reply_to_post_id": null,
                      "views": 25,
                      "updated_at": null,
                      "created_at": 1783200000,
                      "translated_content": null,
                      "user": {
                        "avatar": "no.jpg",
                        "id": 204801,
                        "username": "demo_user"
                      },
                      "images": [],
                      "mentions": [
                        {
                          "type": "server",
                          "meta": {
                            "game": {
                              "id": 2,
                              "name": "Counter-Strike 2",
                              "steam_id": 730,
                              "url": "counter-strike-2"
                            },
                            "icon": null,
                            "id": 1,
                            "name": "Example CS2 Server"
                          }
                        }
                      ],
                      "reactions": [],
                      "replays_items": [],
                      "replays_items_count": 0
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "description": "Server not found"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/QueryTimeout"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/servers/{server_id}/stats/players_online": {
      "get": {
        "operationId": "getServerPlayerStats",
        "summary": "Graficul numărului de jucători pe server",
        "description": "Returnează graficul numărului de jucători cu minimul, media și maximul fiecărui interval.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "type",
            "in": "query",
            "description": "Perioada statisticilor: day, week sau month; implicit month",
            "schema": {
              "type": "string",
              "default": "month",
              "example": "week",
              "enum": [
                "day",
                "week",
                "month"
              ]
            }
          },
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Player statistics grouped by time interval",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerPlayerStatsResult"
                },
                "example": {
                  "response": {
                    "items": [
                      {
                        "avg_players": 12,
                        "date": 1783200000,
                        "maps": [
                          "de_mirage"
                        ],
                        "max_players": 16,
                        "min_players": 8,
                        "x": 1783200000,
                        "y": 16
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/QueryTimeout"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/servers/{server_id}/votes": {
      "get": {
        "operationId": "getServerVotes",
        "summary": "Voturile serverului",
        "description": "Returnează lista voturilor pentru serverul indicat.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "user_id",
            "in": "query",
            "description": "Identificatorul utilizatorului",
            "schema": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 42
            }
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/sort"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/claimed"
          },
          {
            "$ref": "#/components/parameters/nickname"
          },
          {
            "$ref": "#/components/parameters/created"
          },
          {
            "$ref": "#/components/parameters/created__gt"
          },
          {
            "$ref": "#/components/parameters/created__gte"
          },
          {
            "$ref": "#/components/parameters/created__lt"
          },
          {
            "$ref": "#/components/parameters/created__lte"
          },
          {
            "$ref": "#/components/parameters/expire"
          },
          {
            "$ref": "#/components/parameters/expire__gt"
          },
          {
            "$ref": "#/components/parameters/expire__gte"
          },
          {
            "$ref": "#/components/parameters/expire__lt"
          },
          {
            "$ref": "#/components/parameters/expire__lte"
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "response": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VoteDetails"
                      }
                    }
                  },
                  "required": [
                    "response"
                  ]
                },
                "example": {
                  "response": [
                    {
                      "claimed_at": null,
                      "created_at": 1783200000,
                      "entity_id": 42,
                      "entity_type": "server",
                      "expires_at": 1783243200,
                      "id": "9824cabb-2203-437e-9b6c-aba43dde3e4b",
                      "nickname": "NovaPlayer",
                      "server": {
                        "app": {
                          "id": 2,
                          "name": "Counter-Strike 2",
                          "steam_id": 730,
                          "url": "counter-strike-2"
                        },
                        "game": 730,
                        "icon": null,
                        "id": 42,
                        "name": "Example CS2 Server"
                      },
                      "user": {
                        "avatar": "no.jpg",
                        "id": 204801,
                        "username": "demo_user",
                        "uuid": "d4f9c57e-7c8b-49c7-8d7e-b2f1a39f4a25",
                        "connections": []
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/QueryTimeout"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/servers/{server_id}/votes/chart": {
      "get": {
        "operationId": "getServerVoteChart",
        "summary": "Graficul voturilor serverului",
        "description": "Returnează numărul de voturi pe zile.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 42
            }
          },
          {
            "$ref": "#/components/parameters/period"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "response": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "x": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          },
                          "y": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "response"
                  ]
                },
                "example": {
                  "response": [
                    {
                      "x": 1800000000,
                      "y": 10
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/servers/{server_id}/votes/top": {
      "get": {
        "operationId": "getServerTopVoters",
        "summary": "Top votanți ai serverului",
        "description": "Returnează utilizatorii cu cele mai multe voturi.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "server_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 42
            }
          },
          {
            "$ref": "#/components/parameters/period"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "response": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "counts": {
                            "type": "object",
                            "properties": {
                              "active": {
                                "type": [
                                  "integer",
                                  "string"
                                ]
                              },
                              "total": {
                                "type": [
                                  "integer",
                                  "string"
                                ]
                              }
                            }
                          },
                          "last": {
                            "type": "object",
                            "properties": {
                              "created_at": {
                                "type": "integer"
                              },
                              "expire_at": {
                                "type": "integer"
                              },
                              "nickname": {
                                "type": "string"
                              }
                            }
                          },
                          "user": {
                            "type": "object",
                            "properties": {
                              "avatar": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "username": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "response"
                  ]
                },
                "example": {
                  "response": [
                    {
                      "counts": {
                        "active": 2,
                        "total": 10
                      },
                      "last": {
                        "created_at": 1783200000,
                        "expire_at": 1783243200,
                        "nickname": "NovaPlayer"
                      },
                      "user": {
                        "avatar": "no.jpg",
                        "username": "demo_user"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      }
    },
    "/projects/{project_id}/stats/players_online": {
      "get": {
        "operationId": "getProjectPlayerStats",
        "summary": "Graficul numărului de jucători din proiect",
        "description": "Returnează numărul total minim, mediu și maxim de jucători de pe serverele proiectului pentru fiecare interval.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "type",
            "in": "query",
            "description": "Perioada statisticilor: day, week sau month; implicit month",
            "schema": {
              "type": "string",
              "default": "month",
              "example": "week",
              "enum": [
                "day",
                "week",
                "month"
              ]
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Combined project player statistics grouped by time interval",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectPlayerStatsResult"
                },
                "example": {
                  "response": {
                    "items": [
                      {
                        "avg_players": 12,
                        "date": 1783200000,
                        "max_players": 16,
                        "min_players": 8,
                        "x": 1783200000
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "description": "Private project is not accessible to the requester"
          },
          "404": {
            "description": "Project not found"
          }
        }
      }
    },
    "/projects/{project_id}/votes": {
      "get": {
        "operationId": "getProjectVotes",
        "summary": "Voturile proiectului",
        "description": "Returnează voturile pentru proiect. Fără autentificare sunt accesibile doar proiectele publice.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "user_id",
            "in": "query",
            "description": "Identificatorul utilizatorului",
            "schema": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 42
            }
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/sort"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/claimed"
          },
          {
            "$ref": "#/components/parameters/nickname"
          },
          {
            "$ref": "#/components/parameters/created"
          },
          {
            "$ref": "#/components/parameters/created__gt"
          },
          {
            "$ref": "#/components/parameters/created__gte"
          },
          {
            "$ref": "#/components/parameters/created__lt"
          },
          {
            "$ref": "#/components/parameters/created__lte"
          },
          {
            "$ref": "#/components/parameters/expire"
          },
          {
            "$ref": "#/components/parameters/expire__gt"
          },
          {
            "$ref": "#/components/parameters/expire__gte"
          },
          {
            "$ref": "#/components/parameters/expire__lt"
          },
          {
            "$ref": "#/components/parameters/expire__lte"
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "response": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VoteDetails"
                      }
                    }
                  },
                  "required": [
                    "response"
                  ]
                },
                "example": {
                  "response": [
                    {
                      "claimed_at": null,
                      "created_at": 1783200000,
                      "entity_id": 42,
                      "entity_type": "project",
                      "expires_at": 1785792000,
                      "id": "7206f073-2f18-4660-91b8-bd947fbc4be2",
                      "nickname": "NovaPlayer",
                      "project": {
                        "id": 42
                      },
                      "user": {
                        "avatar": "no.jpg",
                        "id": 204801,
                        "username": "demo_user",
                        "uuid": "d4f9c57e-7c8b-49c7-8d7e-b2f1a39f4a25",
                        "connections": []
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "description": "Private project is not accessible to the requester"
          },
          "404": {
            "description": "Project not found"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/QueryTimeout"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        }
      }
    },
    "/projects/{project_id}/votes/chart": {
      "get": {
        "operationId": "getProjectVoteChart",
        "summary": "Graficul voturilor proiectului",
        "description": "Returnează numărul zilnic de voturi pentru proiect. Fără autentificare sunt accesibile doar proiectele publice.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 42
            }
          },
          {
            "$ref": "#/components/parameters/period"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "response": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "x": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          },
                          "y": {
                            "type": [
                              "integer",
                              "string"
                            ]
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "response"
                  ]
                },
                "example": {
                  "response": [
                    {
                      "x": 1800000000,
                      "y": 10
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "description": "Private project is not accessible to the requester"
          },
          "404": {
            "description": "Project not found"
          }
        }
      }
    },
    "/projects/{project_id}/votes/top": {
      "get": {
        "operationId": "getProjectTopVoters",
        "summary": "Top votanți ai proiectului",
        "description": "Returnează utilizatorii cu cele mai multe voturi pentru proiect. Fără autentificare sunt accesibile doar proiectele publice.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "example": 42
            }
          },
          {
            "$ref": "#/components/parameters/period"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "response": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "counts": {
                            "type": "object",
                            "properties": {
                              "active": {
                                "type": [
                                  "integer",
                                  "string"
                                ]
                              },
                              "total": {
                                "type": [
                                  "integer",
                                  "string"
                                ]
                              }
                            }
                          },
                          "last": {
                            "type": "object",
                            "properties": {
                              "created_at": {
                                "type": "integer"
                              },
                              "expire_at": {
                                "type": "integer"
                              },
                              "nickname": {
                                "type": "string"
                              }
                            }
                          },
                          "user": {
                            "type": "object",
                            "properties": {
                              "avatar": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "username": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "response"
                  ]
                },
                "example": {
                  "response": [
                    {
                      "counts": {
                        "active": 2,
                        "total": 10
                      },
                      "last": {
                        "created_at": 1783200000,
                        "expire_at": 1785792000,
                        "nickname": "NovaPlayer"
                      },
                      "user": {
                        "avatar": "no.jpg",
                        "username": "demo_user"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "description": "Private project is not accessible to the requester"
          },
          "404": {
            "description": "Project not found"
          }
        }
      }
    },
    "/votes/{vote_id}": {
      "get": {
        "operationId": "getVote",
        "summary": "Vot",
        "description": "Returnează informații despre un vot după ID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "vote_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "9824cabb-2203-437e-9b6c-aba43dde3e4b"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Vote details response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoteDetailsEnvelope"
                },
                "example": {
                  "response": {
                    "created_at": 1783200000,
                    "expires_at": 1783243200,
                    "id": "6f59a4a8-2f0f-4d96-a50a-9d7a21f4b812",
                    "entity_id": 100001,
                    "entity_type": "server",
                    "nickname": "NovaPlayer",
                    "server": {
                      "app": {
                        "id": 2400,
                        "name": "Example Shooter",
                        "steam_id": 111111,
                        "url": "example-shooter"
                      },
                      "game": 111111,
                      "icon": null,
                      "id": 100001,
                      "name": "Example Arena"
                    },
                    "user": {
                      "avatar": "8f14e45f-e9a1-4f4d-a9f3-6d7b0d4a2c18.webp",
                      "id": 204801,
                      "username": "demo_user",
                      "uuid": "d4f9c57e-7c8b-49c7-8d7e-b2f1a39f4a25",
                      "connections": [
                        {
                          "id": "100000000000000001",
                          "name": "demo_user",
                          "type": "discord",
                          "url": "https://discord.com/users/100000000000000001"
                        },
                        {
                          "id": "76561198000000001",
                          "name": "NovaPlayer",
                          "type": "steam",
                          "url": "https://steamcommunity.com/profiles/76561198000000001"
                        }
                      ]
                    },
                    "claimed_at": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          },
          "504": {
            "$ref": "#/components/responses/QueryTimeout"
          },
          "default": {
            "$ref": "#/components/responses/UnexpectedError"
          }
        },
        "security": []
      }
    },
    "/votes/{vote_id}/claim": {
      "post": {
        "operationId": "claimVote",
        "summary": "Confirmă procesarea votului",
        "description": "Marchează votul ca procesat. Disponibil proprietarului serverului sau proiectului.",
        "security": [
          {
            "AccountAPIKey": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "vote_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "9824cabb-2203-437e-9b6c-aba43dde3e4b"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoteClaimResult"
                },
                "example": {
                  "response": {
                    "success": true
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "description": "Missing, invalid, expired or revoked credential."
          },
          "403": {
            "description": "Missing API key scope, restricted account or entity ownership."
          },
          "404": {
            "description": "Unknown vote or invalid entity association."
          },
          "429": {
            "description": "Account claim quota exceeded: 12 000 per minute. Honor Retry-After."
          }
        }
      }
    },
    "/users/{id}": {
      "get": {
        "operationId": "getPublicUser",
        "summary": "Profil de utilizator",
        "description": "Returnează datele profilului utilizatorului.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "ID-ul contului.",
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "ef57cc6f-f068-11ef-a5bf-d00d12c6f2dd"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User profile.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserProfileResult"
                },
                "example": {
                  "response": {
                    "avatar": "447f9470-325b-4e0a-ada0-f4f1659ef805.png",
                    "id": 1,
                    "username": "GAMEMONITORING",
                    "banner": "469ebf64-206c-4374-a742-7730ea227f95.webp",
                    "connections": [
                      {
                        "account_id": "76561197960287930",
                        "account_level": 1,
                        "id": 220354,
                        "name": "Rabscuttle",
                        "platform": {
                          "icon": null,
                          "id": 3,
                          "name": "Steam",
                          "url": "steam"
                        }
                      }
                    ],
                    "created": 1435235037,
                    "last_online": 1793734264,
                    "uuid": "ef57cc6f-f068-11ef-a5bf-d00d12c6f2dd"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "description": "User not found."
          }
        }
      }
    },
    "/users/verify-code": {
      "post": {
        "operationId": "verifyUserCode",
        "summary": "Confirmă titularul contului",
        "description": "Pentru a confirma că este titularul unui cont GAMEMONITORING, utilizatorul obține un cod din secțiunea „[Integrare](/settings/integration)”. Codul este valabil 5 minute de la emitere. Dacă verificarea reușește, API-ul returnează ID-ul contului pentru care a fost emis codul și marchează codul ca folosit.",
        "security": [],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersion"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "Cod de verificare a contului de unică folosință. Majusculele și minusculele sunt echivalente.",
                    "pattern": "^\\s*[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{4}(?:-[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{4}){2}\\s*$",
                    "example": "7KMD-P9RX-3WHT"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The stable GAMEMONITORING account ID.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "response"
                  ],
                  "properties": {
                    "response": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "id"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "response": {
                    "id": "550e8400-e29b-41d4-a716-446655440000"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or code format."
          },
          "404": {
            "description": "Unknown, expired or already redeemed code."
          },
          "429": {
            "description": "Too many requests."
          },
          "503": {
            "description": "A required service is temporarily unavailable."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorEnvelope": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "description": "Codul de stare HTTP."
              },
              "message": {
                "type": "string",
                "description": "Mesaj în limba API. Textul poate varia; folosiți codul de stare pentru tratarea erorilor."
              },
              "data": {
                "description": "Detalii suplimentare despre eroare, dacă sunt disponibile."
              }
            }
          }
        }
      },
      "Server": {
        "type": "object",
        "properties": {
          "add_date": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "Marcaj temporal Unix în secunde (UTC)."
          },
          "app": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "name": {
                    "type": "string"
                  },
                  "steam_id": {
                    "description": "Steam App ID of the game. Use this as game_steam_id when searching servers.",
                    "anyOf": [
                      {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "string"
                          }
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "url": {
                    "type": "string"
                  }
                },
                "additionalProperties": {}
              },
              {
                "type": "null"
              }
            ]
          },
          "color": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "connect": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "game": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "hide_address": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1
              }
            ]
          },
          "hide_query": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1
              }
            ]
          },
          "icon": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "ip": {
            "type": [
              "string",
              "null"
            ]
          },
          "language": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_update": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "Marcaj temporal Unix în secunde (UTC)."
          },
          "map": {
            "type": [
              "string",
              "null"
            ]
          },
          "maxplayers": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "numplayers": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "official": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "points": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "port": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "private": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "project_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "pve": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "pvp": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "query": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "request": {
            "type": [
              "string",
              "null"
            ]
          },
          "secured": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1
              }
            ]
          },
          "steam_id": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "string"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "Păstrați identificatorii text ca text pentru a evita pierderea preciziei."
          },
          "version": {
            "type": [
              "string",
              "null"
            ]
          },
          "votes": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "wipe": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "Marcaj temporal Unix în secunde (UTC)."
          },
          "ban_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "banned": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1
              }
            ]
          },
          "boosts": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "bots": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "city": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Descrierea serverului ca listă de blocuri codificată într-un șir JSON."
          },
          "disabled_modules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "gamemode": {
            "type": [
              "string",
              "null"
            ]
          },
          "hidden": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1
              }
            ]
          },
          "last_offline": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "Marcaj temporal Unix în secunde (UTC)."
          },
          "last_online": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "Marcaj temporal Unix în secunde (UTC)."
          },
          "list_hidden": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 1
              }
            ]
          },
          "map_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "mods": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ],
              "additionalProperties": {}
            }
          },
          "next_wipe": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ],
            "description": "Marcaj temporal Unix în secunde (UTC)."
          },
          "parked": {
            "type": "boolean"
          },
          "position_game": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "wipe_period": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "parked"
        ],
        "additionalProperties": {}
      },
      "ServerEnvelope": {
        "type": "object",
        "required": [
          "response"
        ],
        "properties": {
          "response": {
            "$ref": "#/components/schemas/Server",
            "description": "Răspunsurile reușite conțin rezultatul în response. Listele pot fi tablouri sau obiecte cu items; consultați schema operației."
          }
        }
      },
      "UserProfileResult": {
        "type": "object",
        "required": [
          "response"
        ],
        "properties": {
          "response": {
            "type": "object",
            "required": [
              "id",
              "uuid",
              "username",
              "avatar",
              "banner",
              "created",
              "last_online"
            ],
            "properties": {
              "id": {
                "type": "integer",
                "minimum": 1,
                "description": "Numeric profile ID."
              },
              "uuid": {
                "type": "string",
                "format": "uuid",
                "description": "Account ID."
              },
              "username": {
                "type": "string"
              },
              "avatar": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "banner": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "last_online": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "connections": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "account_id",
                    "account_level",
                    "name"
                  ],
                  "properties": {
                    "id": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "account_id": {
                      "type": "string"
                    },
                    "account_level": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "platform": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "id",
                        "name",
                        "icon",
                        "url"
                      ],
                      "properties": {
                        "id": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "name": {
                          "type": "string"
                        },
                        "icon": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "url": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ServerCreateResult": {
        "type": "object",
        "properties": {
          "response": {
            "type": "object",
            "properties": {
              "connect": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "game": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "id": {
                "type": "integer",
                "minimum": 1
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "request": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": [
                  "boolean",
                  "null"
                ]
              }
            },
            "required": [
              "connect",
              "game",
              "id",
              "name",
              "request",
              "status"
            ]
          }
        },
        "required": [
          "response"
        ]
      },
      "ServerPlayersResult": {
        "type": "object",
        "properties": {
          "response": {
            "type": "object",
            "properties": {
              "items": {
                "description": "Dacă interogarea istoricului sesiunilor nu găsește jucători, `items` conține lista completă de jucători din ultima interogare a serverului, dacă este disponibilă.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "avatar": {
                      "type": "string"
                    },
                    "created": {
                      "type": [
                        "number",
                        "string",
                        "null"
                      ]
                    },
                    "last_online": {
                      "type": [
                        "number",
                        "string",
                        "null"
                      ]
                    },
                    "last_session_time": {
                      "type": "number"
                    },
                    "name": {
                      "type": [
                        "number",
                        "string",
                        "null"
                      ]
                    },
                    "user": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "avatar": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "username": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    "username": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "avatar",
                    "last_session_time",
                    "username"
                  ]
                }
              }
            },
            "required": [
              "items"
            ]
          }
        },
        "required": [
          "response"
        ]
      },
      "ServerPostsResult": {
        "type": "object",
        "properties": {
          "response": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        },
        "required": [
          "response"
        ]
      },
      "ServerPlayerStatsResult": {
        "type": "object",
        "properties": {
          "response": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "avg_players": {
                      "type": "number"
                    },
                    "date": {
                      "type": "number"
                    },
                    "maps": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "max_players": {
                      "type": "number"
                    },
                    "min_players": {
                      "type": "number"
                    },
                    "x": {
                      "type": "number"
                    },
                    "y": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "avg_players",
                    "date",
                    "maps",
                    "max_players",
                    "min_players",
                    "x",
                    "y"
                  ]
                }
              }
            },
            "required": [
              "items"
            ]
          }
        },
        "required": [
          "response"
        ]
      },
      "ProjectPlayerStatsResult": {
        "type": "object",
        "properties": {
          "response": {
            "type": "object",
            "properties": {
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "avg_players": {
                      "type": "number"
                    },
                    "date": {
                      "type": "number"
                    },
                    "max_players": {
                      "type": "number"
                    },
                    "min_players": {
                      "type": "number"
                    },
                    "x": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "avg_players",
                    "date",
                    "max_players",
                    "min_players",
                    "x"
                  ]
                }
              }
            },
            "required": [
              "items"
            ]
          }
        },
        "required": [
          "response"
        ]
      },
      "VoteDetailsEnvelope": {
        "type": "object",
        "properties": {
          "response": {
            "$ref": "#/components/schemas/VoteDetails"
          }
        }
      },
      "VoteDetails": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "9824cabb-2203-437e-9b6c-aba43dde3e4b"
          },
          "entity_id": {
            "type": "number",
            "description": "ID of the entity that received the vote.",
            "example": 1
          },
          "entity_type": {
            "type": "string",
            "description": "Type of the entity that received the vote.",
            "enum": [
              "server",
              "project"
            ],
            "example": "server"
          },
          "nickname": {
            "type": [
              "string",
              "null"
            ],
            "example": "PlayerName"
          },
          "created_at": {
            "type": "number",
            "example": 1710000000
          },
          "expires_at": {
            "type": "number",
            "example": 1710086400
          },
          "server": {
            "type": [
              "object",
              "null"
            ],
            "description": "Present for `server` votes.",
            "properties": {
              "id": {
                "type": [
                  "number",
                  "string",
                  "null"
                ],
                "example": 1
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "Public Server"
              },
              "icon": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "game": {
                "type": [
                  "number",
                  "null"
                ],
                "example": 730
              }
            }
          },
          "project": {
            "type": [
              "object",
              "null"
            ],
            "description": "Present for `project` votes.",
            "properties": {
              "id": {
                "type": "number",
                "example": 1
              }
            }
          },
          "user": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": [
                  "number",
                  "string",
                  "null"
                ]
              },
              "uuid": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "avatar": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "webhook": {
            "type": [
              "object",
              "null"
            ],
            "description": "Present only when the requester can view webhook delivery details.",
            "properties": {
              "attempted_at": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "event_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "event_type": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "server.vote",
                  "project.vote",
                  null
                ],
                "example": "project.vote"
              },
              "is_test": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "request_body": {
                "type": [
                  "object",
                  "null"
                ]
              },
              "response_body": {},
              "response_code": {
                "type": [
                  "number",
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "delivered",
                  "failed",
                  "no_result",
                  "pending",
                  null
                ]
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "claimed_at": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Processing acknowledgement time in Unix seconds; null means unclaimed.",
            "example": null
          }
        }
      },
      "VoteClaimResult": {
        "type": "object",
        "properties": {
          "response": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "const": true
              }
            },
            "required": [
              "success"
            ]
          }
        },
        "required": [
          "response"
        ]
      }
    },
    "parameters": {
      "ApiVersion": {
        "name": "v",
        "in": "query",
        "required": false,
        "description": "Versiunea API. Omiteți v pentru cea mai mică versiune acceptată. Specificați v=1.0.0 pentru contractul documentat. Valorile invalide, repetate sau neacceptate returnează HTTP 400.",
        "schema": {
          "type": "string",
          "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$",
          "const": "1.0.0"
        }
      },
      "created": {
        "name": "created",
        "in": "query",
        "description": "Filtrează după momentul exact al creării votului, în secunde Unix. În lipsa filtrelor de dată, interogarea include toate voturile păstrate.",
        "schema": {
          "type": "integer",
          "example": 1800000000
        }
      },
      "created__gt": {
        "name": "created__gt",
        "in": "query",
        "description": "Data creării, secunde Unix >",
        "schema": {
          "type": "integer",
          "example": 1800000000
        }
      },
      "created__gte": {
        "name": "created__gte",
        "in": "query",
        "description": "Data creării, secunde Unix ≥",
        "schema": {
          "type": "integer",
          "example": 1800000000
        }
      },
      "created__lt": {
        "name": "created__lt",
        "in": "query",
        "description": "Data creării, secunde Unix <",
        "schema": {
          "type": "integer",
          "example": 1800000000
        }
      },
      "created__lte": {
        "name": "created__lte",
        "in": "query",
        "description": "Data creării, secunde Unix ≤",
        "schema": {
          "type": "integer",
          "example": 1800000000
        }
      },
      "expire": {
        "name": "expire",
        "in": "query",
        "description": "Data expirării, secunde Unix",
        "schema": {
          "type": "integer",
          "example": 1800000000
        }
      },
      "expire__gt": {
        "name": "expire__gt",
        "in": "query",
        "description": "Data expirării, secunde Unix >",
        "schema": {
          "type": "integer",
          "example": 1800000000
        }
      },
      "expire__gte": {
        "name": "expire__gte",
        "in": "query",
        "description": "Data expirării, secunde Unix ≥",
        "schema": {
          "type": "integer",
          "example": 1800000000
        }
      },
      "expire__lt": {
        "name": "expire__lt",
        "in": "query",
        "description": "Data expirării, secunde Unix <",
        "schema": {
          "type": "integer",
          "example": 1800000000
        }
      },
      "expire__lte": {
        "name": "expire__lte",
        "in": "query",
        "description": "Data expirării, secunde Unix ≤",
        "schema": {
          "type": "integer",
          "example": 1800000000
        }
      },
      "claimed": {
        "name": "claimed",
        "in": "query",
        "description": "Starea procesării: 0 neprocesate, 1 procesate; implicit toate",
        "schema": {
          "type": "integer",
          "enum": [
            0,
            1
          ],
          "example": 0
        }
      },
      "limit": {
        "name": "limit",
        "in": "query",
        "description": "Număr de elemente de la 1 la 1000, implicit 100",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000,
          "default": 100,
          "example": 100
        }
      },
      "offset": {
        "name": "offset",
        "in": "query",
        "description": "Număr de elemente de omis, minimum 0, implicit 0",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "default": 0,
          "example": 0
        }
      },
      "order": {
        "name": "order",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "asc",
            "desc"
          ],
          "default": "desc",
          "example": "asc"
        }
      },
      "sort": {
        "name": "sort",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "created",
            "expire"
          ],
          "default": "created",
          "example": "created"
        }
      },
      "nickname": {
        "name": "nickname",
        "in": "query",
        "description": "Căutare după fragmente din pseudonimul votantului, de la 3 la 255 de caractere",
        "schema": {
          "type": "string",
          "minLength": 3,
          "maxLength": 255,
          "example": "Player"
        }
      },
      "server_id": {
        "name": "server_id",
        "in": "query",
        "schema": {
          "type": "integer",
          "example": 42
        }
      },
      "entity_type": {
        "name": "entity_type",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "server",
            "project"
          ],
          "example": "server"
        }
      },
      "webhook_status": {
        "name": "webhook_status",
        "in": "query",
        "schema": {
          "type": "string",
          "enum": [
            "delivered",
            "failed",
            "no_result",
            "pending"
          ],
          "example": "failed"
        }
      },
      "period": {
        "name": "period",
        "in": "query",
        "description": "Perioadă după data creării votului, implicit întregul istoric păstrat",
        "schema": {
          "type": "string",
          "enum": [
            "24h",
            "7d",
            "30d",
            "90d"
          ],
          "example": "30d"
        }
      }
    },
    "securitySchemes": {
      "AccountAPIKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Account API key: 43 base64url characters without a prefix. Claim requires votes:claim scope plus current ownership. Send only in Authorization: Bearer <token>."
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Parametri sau JSON incorect. Verificați tipurile, câmpurile obligatorii și valorile permise.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": 400,
                "message": "Invalid request parameters."
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "Acces interzis: adresa este blocată sau proiectul nu este public.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": 403,
                "message": "Access denied."
              }
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "Serviciul este temporar indisponibil. Încercați mai târziu.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": 503,
                "message": "Service temporarily unavailable."
              }
            }
          }
        }
      },
      "QueryTimeout": {
        "description": "Interogarea a depășit limita de timp. Încercați mai târziu sau restrângeți cererea.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": 504,
                "message": "Query timed out."
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "Resursa solicitată nu există.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": 404,
                "message": "Resource not found."
              }
            }
          }
        }
      },
      "UnexpectedError": {
        "description": "Eroare neașteptată de server. Obiectul error conține codul de stare real.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "example": {
              "error": {
                "code": 500,
                "message": "Internal server error."
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.gamemonitoring.ro"
    }
  ]
}
```
