> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.erlcrussia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Системная информация

> Получение системной информации и статистики Economy API.

Доступные действия:
- `stats` - общая статистика (users, businesses, mafias, governmentBalance).
- `uptime` - время работы сервера.
- `dbStatus` - статус подключения к базе данных.




## OpenAPI

````yaml ru/openapi/ru-economy-v2-openapi.yaml GET /moscowroleplay/civops/system
openapi: 3.1.0
info:
  title: ER:LC Россия API V2 - Moscow RolePlay API Экономики V2
  version: 2.0.0
servers:
  - url: https://api.erlcrussia.xyz/v2
    description: ER:LC Россия API V2
security: []
tags:
  - name: Moscow RolePlay API Экономики V2
    description: Эндпоинты для управления экономикой и CivOps системой.
paths:
  /moscowroleplay/civops/system:
    get:
      tags:
        - Moscow RolePlay API Экономики V2
      summary: Системная информация
      description: >
        Получение системной информации и статистики Economy API.


        Доступные действия:

        - `stats` - общая статистика (users, businesses, mafias,
        governmentBalance).

        - `uptime` - время работы сервера.

        - `dbStatus` - статус подключения к базе данных.
      parameters:
        - name: action
          in: query
          description: Тип действия для получения данных.
          required: true
          schema:
            type: string
            enum:
              - stats
              - uptime
              - dbStatus
      responses:
        '200':
          description: Успешный ответ с системными данными.
          content:
            application/json:
              schema:
                type: object
              examples:
                stats:
                  summary: Статистика системы.
                  value:
                    users: 216
                    businesses: 9
                    mafias: 1
                    governmentBalance: 99990000001
                    uptime: 1132.925331823
                    memory:
                      rss: 194883584
                      heapTotal: 72372224
                      heapUsed: 69451704
                      external: 6152340
                      arrayBuffers: 416832
                    timestamp: '2026-04-23T16:21:16.502Z'
                uptime:
                  summary: Время работы.
                  value:
                    uptime: 1138.501762406
                    uptimeFormatted: 0д 0ч 18м 58с
                    timestamp: '2026-04-23T16:21:22.078Z'
                dbStatus:
                  summary: Статус БД.
                  value:
                    status: connected
                    timestamp: '2026-04-23T16:21:29.210Z'
        '400':
          description: Ошибка запроса (неизвестный action).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedMissingOrInvalidToken'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          description: Ошибка при проверке статуса БД.
          content:
            application/json:
              schema:
                type: object
              examples:
                db_error:
                  summary: Ошибка подключения к БД.
                  value:
                    status: disconnected
                    error: Connection timeout
      security:
        - MRPAPIKey: []
components:
  schemas:
    ErrorResponse:
      type: object
      description: Стандартный формат ошибки.
      required:
        - code
        - message
      properties:
        code:
          type: integer
          description: Код ошибки API.
          example: 5007
        message:
          type: string
          description: Сообщение/идентификатор ошибки.
          example: Missing Token
    UnauthorizedError:
      type: object
      description: Ошибка аутентификации (отсутствует или неверный токен).
      required:
        - code
        - message
      properties:
        code:
          type: integer
          example: 5007
        message:
          type: string
          example: Missing Token
    ForbiddenError:
      type: object
      description: Ошибка доступа (запрещено).
      required:
        - code
        - message
      properties:
        code:
          type: integer
          example: 5009
        message:
          type: string
          example: Forbidden
    RateLimitError:
      type: object
      description: Ошибка превышения лимита запросов.
      required:
        - code
        - message
      properties:
        code:
          type: integer
          example: 6021
        message:
          type: string
          example: Rate Limit Exceeded
        retry_after:
          type: integer
          description: Время до сброса лимита в секундах.
          example: 30
  responses:
    UnauthorizedMissingOrInvalidToken:
      description: Ошибка аутентификации.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedError'
          examples:
            Missing Token:
              summary: Нет токена.
              value:
                code: 5007
                message: Missing Token
            Invalid Token:
              summary: Неверный или деактивированный токен.
              value:
                code: 5008
                message: Invalid Token
            Invalid Master Key:
              summary: Неверный мастер-ключ.
              value:
                code: 5006
                message: Invalid Master Key
    Forbidden:
      description: Доступ запрещён.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenError'
          examples:
            Forbidden:
              summary: Нет прав доступа к эндпоинту.
              value:
                code: 5009
                message: Forbidden
            Api Version Forbidden:
              summary: Доступ к этой версии API запрещён.
              value:
                code: 5010
                message: Api Version Forbidden
            Query Param Forbidden:
              summary: Query-параметр запрещён.
              value:
                code: 5011
                message: Query Param Forbidden
    TooManyRequests:
      description: Превышено количество запросов.
      headers:
        X-RateLimit-Limit:
          description: Максимум запросов в минуту.
          schema:
            type: integer
            example: 60
        X-RateLimit-Remaining:
          description: Оставшееся количество запросов.
          schema:
            type: integer
            example: 0
        Retry-After:
          description: Секунд до сброса лимита.
          schema:
            type: integer
            example: 30
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitError'
          examples:
            Rate Limit Exceeded:
              summary: Превышение лимита запросов.
              value:
                code: 6021
                message: Rate Limit Exceeded
                retry_after: 30
  securitySchemes:
    MRPAPIKey:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: |
        API ключ для доступа к эндпоинтам Гражданских Операций.

        Передается в заголовке `Authorization: Bearer <ключ>`.

        ОБЯЗАТЕЛЕН ДЛЯ ВСЕХ ЭНДПОИНТОВ ГРАЖДАНСКИХ ОПЕРАЦИЙ (кроме /health).

````