{
 "openapi": "3.1.0",
 "info": {
  "title": "hw-cloud",
  "description": "Облако hw-cloud: кассы аккаунта и их состояние, тревоги, события и метрики, команды кассам и чеки через облако.\n\nКлюч — заголовок `X-Api-Key: hwk_…` (кабинет hw-connector.ru → «Облако»). Касса чужого аккаунта — `404`.\nОшибки — `application/problem+json` с машинным кодом в поле `code`. Списки — `limit` и `offset`, всего — в заголовке `X-Total-Count`.\nAPI агента на кассе через облако — `/agent/api/v1/**` (тот же API, что на `http://localhost:7790`).\n",
  "version": "v1"
 },
 "servers": [
  {
   "url": "https://cloud.hw-connector.ru",
   "description": "Облако hw-connector"
  }
 ],
 "security": [
  {
   "apiKey": []
  }
 ],
 "paths": {
  "/api/v1/receipts": {
   "get": {
    "tags": [
     "Чеки"
    ],
    "summary": "Последние чеки",
    "description": "Свежие сверху; deviceId — только эта касса, idempotencyKey — найти чек по своему ключу",
    "operationId": "list",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "idempotencyKey",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "deviceId",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 50
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/ReceiptView"
         }
        }
       }
      }
     }
    }
   },
   "post": {
    "tags": [
     "Чеки"
    ],
    "summary": "Пробить чек на кассе аккаунта",
    "description": "Чек — как в API агента (POST /api/v1/registers/{n}/receipts). Новый — 202, тот же ключ — 200 с тем же чеком, тот же ключ с другим чеком — 409. Касса не на связи — чек ждёт в очереди до cloud.receipts.ttl-hours; Prefer: wait=N — подождать итог до 60 с. Пробный тариф сверх лимита — 402",
    "operationId": "create",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "Prefer",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/ReceiptRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "$ref": "#/components/schemas/ReceiptView"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/devices/{id}/commands": {
   "post": {
    "tags": [
     "Команды"
    ],
    "summary": "Команда на кассу (конверт)",
    "description": "Запрос к API агента в теле {method, path, body, idempotencyKey}; ответ агента как есть. То же без конверта, с файлами и заголовками — прокси /agent/api/v1/**. Не на связи — 503, не ответила — 504 (повтор с тем же idempotencyKey не выполнит операцию дважды), выключена — 403 DEVICE_DISABLED",
    "operationId": "command",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/CommandRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/devices/{id}": {
   "get": {
    "tags": [
     "Кассы"
    ],
    "summary": "Карточка кассы",
    "description": "Касса, на связи ли, последние значения метрик за 7 дней, открытые тревоги и последние события",
    "operationId": "device",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "events",
      "in": "query",
      "description": "Сколько последних событий (1–500)",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 20
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "$ref": "#/components/schemas/DeviceDetail"
        }
       }
      }
     }
    }
   },
   "patch": {
    "tags": [
     "Кассы"
    ],
    "summary": "Переименовать или выключить кассу",
    "description": "label — своё название (агент его не затирает), disabled — выключить: команды и прокси отвечают 403 DEVICE_DISABLED, чеки на неё не уходят",
    "operationId": "update",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/DevicePatch"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "$ref": "#/components/schemas/DeviceView"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/summary": {
   "get": {
    "tags": [
     "Мониторинг"
    ],
    "summary": "Сводка аккаунта",
    "description": "Сколько касс на связи, версии агента, открытые тревоги по кодам, запросы к агентам за сутки — состояние парка одним запросом",
    "operationId": "summary",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "$ref": "#/components/schemas/Summary"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/requests": {
   "get": {
    "tags": [
     "Команды"
    ],
    "summary": "Журнал запросов к агентам",
    "description": "Запросы через прокси /agent/api/v1/** и POST /api/v1/devices/{id}/commands: касса, метод, путь без строки запроса, код ответа, ошибка прокси, мс. Тела не хранятся; 30 дней",
    "operationId": "requests",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "deviceId",
      "in": "query",
      "description": "Только эта касса",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "failed",
      "in": "query",
      "description": "Только неудачные: ошибки прокси и ответы 4xx/5xx",
      "required": false,
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     },
     {
      "name": "offset",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/LogEntry"
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/receipts/{id}": {
   "get": {
    "tags": [
     "Чеки"
    ],
    "summary": "Чек",
    "description": "status: QUEUED, SENDING, DONE, FAILED, UNKNOWN, EXPIRED; result — ФД, ФП, ссылка на чек для покупателя",
    "operationId": "get",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "$ref": "#/components/schemas/ReceiptView"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/receipts/stats": {
   "get": {
    "tags": [
     "Чеки"
    ],
    "summary": "Учёт чеков по точкам за месяц",
    "description": "Сколько чеков и на какую сумму пробила каждая касса, тариф и пробный лимит; month=2026-11",
    "operationId": "stats",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "month",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "$ref": "#/components/schemas/Stats"
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/metrics/latest": {
   "get": {
    "tags": [
     "Мониторинг"
    ],
    "summary": "Последние значения метрики по кассам",
    "description": "Например name=fn.days_left — сколько дней осталось ФН на каждой кассе аккаунта; значение за последние 7 дней, по одному на кассу и набор меток",
    "operationId": "latest",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "name",
      "in": "query",
      "description": "Имя метрики: fn.days_left, ofd.not_sent, shift.open, register.ok, agent.up…",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "deviceId",
      "in": "query",
      "description": "Только эта касса",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/LatestMetric"
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/events": {
   "get": {
    "tags": [
     "Мониторинг"
    ],
    "summary": "События касс",
    "description": "Неудачные операции, принтеры, питание, ККТ не отвечает — свежие сверху; всего — в X-Total-Count",
    "operationId": "events",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "deviceId",
      "in": "query",
      "description": "Только эта касса",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "type",
      "in": "query",
      "description": "Тип события: operation.failed, printer, power, register.unavailable…",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "since",
      "in": "query",
      "description": "Не раньше этого времени (ISO 8601)",
      "required": false,
      "schema": {
       "type": "string",
       "format": "date-time"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     },
     {
      "name": "offset",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/EventView"
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/devices": {
   "get": {
    "tags": [
     "Кассы"
    ],
    "summary": "Кассы аккаунта",
    "description": "Версия агента, на связи ли сейчас, когда была на связи, открытые тревоги. Отбор — online, q (название, номер установки), страницы — limit/offset, всего — в X-Total-Count",
    "operationId": "list_1",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "online",
      "in": "query",
      "description": "true — только на связи, false — только не на связи",
      "required": false,
      "schema": {
       "type": "boolean"
      }
     },
     {
      "name": "q",
      "in": "query",
      "description": "Часть названия, своего названия или номера установки",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 1000
      }
     },
     {
      "name": "offset",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/DeviceView"
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/devices/{id}/metrics": {
   "get": {
    "tags": [
     "Кассы"
    ],
    "summary": "Метрики кассы",
    "description": "Значения за всё время хранения, свежие сверху; name — только эта метрика",
    "operationId": "metrics",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "name",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "limit",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 100
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/MetricPoint"
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/v1/alerts": {
   "get": {
    "tags": [
     "Мониторинг"
    ],
    "summary": "Тревоги касс",
    "description": "FN_EXPIRING (ФН ≤ 30 дн., ≤ 7 — критично), OFD_BACKLOG, SHIFT_EXPIRED, REGISTER_UNAVAILABLE, DEVICE_OFFLINE. Открываются и закрываются сами; open=false — и закрытые",
    "operationId": "alerts",
    "parameters": [
     {
      "name": "X-Api-Key",
      "in": "header",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "open",
      "in": "query",
      "required": false,
      "schema": {
       "type": "boolean",
       "default": true
      }
     },
     {
      "name": "deviceId",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int64"
      }
     },
     {
      "name": "code",
      "in": "query",
      "description": "Только этот код: FN_EXPIRING, OFD_BACKLOG…",
      "required": false,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "severity",
      "in": "query",
      "description": "WARNING или CRITICAL",
      "required": false,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "*/*": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/Alert"
         }
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "ReceiptRequest": {
    "type": "object",
    "properties": {
     "idempotencyKey": {
      "type": "string",
      "maxLength": 100,
      "minLength": 0
     },
     "deviceId": {
      "type": "integer",
      "format": "int64"
     },
     "register": {
      "type": "integer",
      "format": "int32",
      "maximum": 99,
      "minimum": 1
     },
     "receipt": {
      "type": "object"
     },
     "callbackUrl": {
      "type": "string",
      "maxLength": 500,
      "minLength": 0,
      "pattern": "https?://.+"
     }
    },
    "required": [
     "receipt"
    ]
   },
   "Error": {
    "type": "object",
    "properties": {
     "code": {
      "type": "string"
     },
     "message": {
      "type": "string"
     }
    }
   },
   "ReceiptView": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "idempotencyKey": {
      "type": "string"
     },
     "status": {
      "type": "string"
     },
     "deviceId": {
      "type": "integer",
      "format": "int64"
     },
     "register": {
      "type": "integer",
      "format": "int32"
     },
     "total": {
      "type": "integer",
      "format": "int64"
     },
     "attempts": {
      "type": "integer",
      "format": "int32"
     },
     "createdAt": {
      "type": "string",
      "format": "date-time"
     },
     "doneAt": {
      "type": "string",
      "format": "date-time"
     },
     "result": {
      "$ref": "#/components/schemas/Result"
     },
     "error": {
      "$ref": "#/components/schemas/Error"
     }
    }
   },
   "Result": {
    "type": "object",
    "properties": {
     "fdNumber": {
      "type": "integer",
      "format": "int64"
     },
     "fiscalSign": {
      "type": "string"
     },
     "shiftNumber": {
      "type": "integer",
      "format": "int32"
     },
     "receiptNumber": {
      "type": "integer",
      "format": "int32"
     },
     "fnNumber": {
      "type": "string"
     },
     "registrationNumber": {
      "type": "string"
     },
     "dateTime": {
      "type": "string"
     },
     "qrCode": {
      "type": "string"
     },
     "fnsUrl": {
      "type": "string"
     },
     "link": {
      "type": "string"
     }
    }
   },
   "CommandRequest": {
    "type": "object",
    "properties": {
     "method": {
      "type": "string",
      "pattern": "GET|POST|PUT|DELETE|PATCH"
     },
     "path": {
      "type": "string",
      "minLength": 1,
      "pattern": "/api/v1/.*"
     },
     "body": {},
     "idempotencyKey": {
      "type": "string"
     }
    },
    "required": [
     "path"
    ]
   },
   "DevicePatch": {
    "type": "object",
    "properties": {
     "label": {
      "type": "string",
      "maxLength": 200,
      "minLength": 0
     },
     "disabled": {
      "type": "boolean"
     }
    }
   },
   "DeviceView": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "machineId": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "agentVersion": {
      "type": "string"
     },
     "os": {
      "type": "string"
     },
     "lastSeenAt": {
      "type": "string",
      "format": "date-time"
     },
     "online": {
      "type": "boolean"
     },
     "label": {
      "type": "string"
     },
     "disabled": {
      "type": "boolean"
     },
     "openAlerts": {
      "type": "integer",
      "format": "int32"
     }
    }
   },
   "Summary": {
    "type": "object",
    "properties": {
     "devices": {
      "type": "object",
      "additionalProperties": {
       "type": "integer",
       "format": "int64"
      }
     },
     "agentVersions": {
      "type": "object",
      "additionalProperties": {
       "type": "integer",
       "format": "int64"
      }
     },
     "alerts": {
      "type": "object",
      "additionalProperties": {}
     },
     "requests": {
      "type": "object",
      "additionalProperties": {
       "type": "integer",
       "format": "int64"
      }
     }
    }
   },
   "LogEntry": {
    "type": "object",
    "properties": {
     "at": {
      "type": "string",
      "format": "date-time"
     },
     "deviceId": {
      "type": "integer",
      "format": "int64"
     },
     "method": {
      "type": "string"
     },
     "path": {
      "type": "string"
     },
     "status": {
      "type": "integer",
      "format": "int32"
     },
     "error": {
      "type": "string"
     },
     "ms": {
      "type": "integer",
      "format": "int32"
     },
     "source": {
      "type": "string"
     }
    }
   },
   "PointStats": {
    "type": "object",
    "properties": {
     "deviceId": {
      "type": "integer",
      "format": "int64"
     },
     "name": {
      "type": "string"
     },
     "done": {
      "type": "integer",
      "format": "int64"
     },
     "failed": {
      "type": "integer",
      "format": "int64"
     },
     "pending": {
      "type": "integer",
      "format": "int64"
     },
     "total": {
      "type": "integer",
      "format": "int64"
     }
    }
   },
   "Stats": {
    "type": "object",
    "properties": {
     "month": {
      "type": "string"
     },
     "plan": {
      "type": "string"
     },
     "paidPoints": {
      "type": "integer",
      "format": "int32"
     },
     "trialMonthly": {
      "type": "integer",
      "format": "int32"
     },
     "trialUsed": {
      "type": "integer",
      "format": "int64"
     },
     "points": {
      "type": "integer",
      "format": "int64"
     },
     "done": {
      "type": "integer",
      "format": "int64"
     },
     "failed": {
      "type": "integer",
      "format": "int64"
     },
     "total": {
      "type": "integer",
      "format": "int64"
     },
     "byPoint": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/PointStats"
      }
     }
    }
   },
   "LatestMetric": {
    "type": "object",
    "properties": {
     "deviceId": {
      "type": "integer",
      "format": "int64"
     },
     "at": {
      "type": "string",
      "format": "date-time"
     },
     "name": {
      "type": "string"
     },
     "value": {
      "type": "number",
      "format": "double"
     },
     "labels": {
      "type": "string"
     }
    }
   },
   "EventView": {
    "type": "object",
    "properties": {
     "at": {
      "type": "string",
      "format": "date-time"
     },
     "type": {
      "type": "string"
     },
     "payload": {
      "type": "object"
     },
     "deviceId": {
      "type": "integer",
      "format": "int64"
     }
    }
   },
   "Alert": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "deviceId": {
      "type": "integer",
      "format": "int64"
     },
     "code": {
      "type": "string"
     },
     "subject": {
      "type": "string"
     },
     "severity": {
      "type": "string"
     },
     "message": {
      "type": "string"
     },
     "value": {
      "type": "number",
      "format": "double"
     },
     "openedAt": {
      "type": "string",
      "format": "date-time"
     },
     "updatedAt": {
      "type": "string",
      "format": "date-time"
     },
     "closedAt": {
      "type": "string",
      "format": "date-time"
     }
    }
   },
   "DeviceDetail": {
    "type": "object",
    "properties": {
     "id": {
      "type": "integer",
      "format": "int64"
     },
     "name": {
      "type": "string"
     },
     "machineId": {
      "type": "string"
     },
     "agentVersion": {
      "type": "string"
     },
     "os": {
      "type": "string"
     },
     "createdAt": {
      "type": "string",
      "format": "date-time"
     },
     "lastSeenAt": {
      "type": "string",
      "format": "date-time"
     },
     "online": {
      "type": "boolean"
     },
     "metrics": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/MetricPoint"
      }
     },
     "alerts": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Alert"
      }
     },
     "events": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/EventView"
      }
     },
     "label": {
      "type": "string"
     },
     "disabled": {
      "type": "boolean"
     }
    }
   },
   "MetricPoint": {
    "type": "object",
    "properties": {
     "at": {
      "type": "string",
      "format": "date-time"
     },
     "name": {
      "type": "string"
     },
     "value": {
      "type": "number",
      "format": "double"
     },
     "labels": {
      "type": "string"
     }
    }
   }
  },
  "securitySchemes": {
   "apiKey": {
    "type": "apiKey",
    "name": "X-Api-Key",
    "in": "header"
   }
  }
 }
}