Программный интерфейс

/web_api/event/search

/web_api/event/search ​

Страница собрана из снимка JSON Schema в репозитории документации. Снимок обновляется отдельной командой из каталога основного приложения и при сборке сайта не переписывается.

Запрос ​

main-app://schemas/api_elements/event/search.request.json

REQUEST /web_api/event/search

ИмяТипОбязательноеОграничение
filtersarray of objectНет-
optionsobjectНетдругие поля допустимы
responseanyНет-

Другие поля верхнего уровня допустимы.

filters[] ​

ИмяТипОбязательноеОграничение
objectobjectДадругие поля допустимы
operatorstringДа-
valueanyНет-

filters[].object ​

ИмяТипОбязательноеОграничение
elementstringДа-
attributestringДа-

options ​

ИмяТипОбязательноеОграничение
addarray of stringНет-

Ответ ​

main-app://schemas/api_elements/event/search.response.json

RESPONSE /web_api/event/search

ИмяТипОбязательноеОграничение
api_codeintegerДаconst 200
api_resultarray of object | booleanДа-
emptybooleanНет-

Другие поля верхнего уровня запрещены.

Исходная схема ​

Файлы ниже скопированы из снимка без изменений. Фрагмент по $ref приведён отдельным блоком, схемы не сливаются.

Запрос: main-app://schemas/api_elements/event/search.request.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/event/search.request.json",
  "title": "REQUEST /web_api/event/search",
  "$ref": "main-app://schemas/_shared/search.request.json"
}
Фрагмент: main-app://schemas/_shared/search.request.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/_shared/search.request.json",
  "title": "Typical /web_api/{entity}/search body",
  "type": "object",
  "properties": {
    "filters": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["object", "operator"],
        "properties": {
          "object": {
            "type": "object",
            "required": ["element", "attribute"],
            "properties": {
              "element": { "type": "string" },
              "attribute": { "type": "string" }
            },
            "additionalProperties": true
          },
          "operator": { "type": "string" },
          "value": true
        },
        "additionalProperties": true
      }
    },
    "options": {
      "type": "object",
      "properties": {
        "add": {
          "type": "array",
          "items": { "type": "string" }
        }
      },
      "additionalProperties": true
    },
    "response": true
  },
  "additionalProperties": true
}
Ответ: main-app://schemas/api_elements/event/search.response.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/event/search.response.json",
  "title": "RESPONSE /web_api/event/search",
  "$ref": "main-app://schemas/_shared/search.response.json"
}
Фрагмент: main-app://schemas/_shared/search.response.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/_shared/search.response.json",
  "title": "Typical search success. Empty list is api_result false, not [].",
  "allOf": [
    { "$ref": "main-app://schemas/_shared/envelope-success.json" },
    {
      "type": "object",
      "properties": {
        "api_result": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": true
              }
            },
            { "const": false }
          ]
        }
      }
    }
  ]
}
Фрагмент: main-app://schemas/_shared/envelope-success.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/_shared/envelope-success.json",
  "title": "Canonical success envelope",
  "type": "object",
  "required": ["api_code", "api_result"],
  "properties": {
    "api_code": { "const": 200 },
    "api_result": true,
    "empty": { "type": "boolean" }
  },
  "additionalProperties": false
}

Версия 1.0.0 · Последнее изменение 2026-10-07

Страница не помогла?