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

/web_api/custom_property_value/add

/web_api/custom_property_value/add ​

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

Запрос ​

main-app://schemas/api_elements/custom_property_value/add.request.json

REQUEST /web_api/custom_property_value/add

ИмяТипОбязательноеОграничение
custom_property_idintegerДаminimum 1
element_typeenumДа"test_case", "bug", "autotest_case", "autotest_run", "object_repository_page", "object_repository_element", "object_repository_folder", "test_run", "test_run_result", "test_account", "execution_context", "text_document", "checklist_id", "checklist_result_id"
element_idintegerДаminimum 1
checkbox_valueanyНет-
date_valueanyНет-
integer_valueanyНет-
option_idanyНет-
string_valueanyНет-
text_valueanyНет-
urlanyНет-
user_id_valueanyНет-
value-Нет-

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

Ответ ​

main-app://schemas/api_elements/custom_property_value/add.response.json

POST /web_api/custom_property_value/add success

ИмяТипОбязательноеОграничение
api_codeintegerДаconst 200
api_resultobjectДадругие поля допустимы
emptybooleanНет-

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

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

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

Запрос: main-app://schemas/api_elements/custom_property_value/add.request.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/custom_property_value/add.request.json",
  "title": "REQUEST /web_api/custom_property_value/add",
  "$comment": "Generated from CustomPropertyValueType and the value writers. Edit those, then run node fill-from-structure-scheme.mjs.",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "custom_property_id",
    "element_type",
    "element_id"
  ],
  "properties": {
    "custom_property_id": {
      "type": "integer",
      "minimum": 1
    },
    "element_type": {
      "type": "string",
      "enum": [
        "test_case",
        "bug",
        "autotest_case",
        "autotest_run",
        "object_repository_page",
        "object_repository_element",
        "object_repository_folder",
        "test_run",
        "test_run_result",
        "test_account",
        "execution_context",
        "text_document",
        "checklist_id",
        "checklist_result_id"
      ]
    },
    "element_id": {
      "type": "integer",
      "minimum": 1
    },
    "checkbox_value": true,
    "date_value": true,
    "integer_value": true,
    "option_id": true,
    "string_value": true,
    "text_value": true,
    "url": true,
    "user_id_value": true,
    "value": {
      "description": "Same value as the typed column for this value_type."
    }
  }
}
Ответ: main-app://schemas/api_elements/custom_property_value/add.response.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/custom_property_value/add.response.json",
  "title": "POST /web_api/custom_property_value/add success",
  "allOf": [
    {
      "$ref": "main-app://schemas/_shared/envelope-success.json"
    },
    {
      "type": "object",
      "properties": {
        "api_result": {
          "type": "object",
          "additionalProperties": true
        }
      }
    }
  ]
}
Фрагмент: 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

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