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

/web_api/autotest_case/create_mass

/web_api/autotest_case/create_mass ​

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

Запрос ​

main-app://schemas/api_elements/autotest_case/create_mass.request.json

REQUEST /web_api/autotest_case/create_mass

ИмяТипОбязательноеОграничение
itemsarray of objectДаminItems 1; maxItems 50

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

items[] ​

ИмяТипОбязательноеОграничение
team_idintegerДаminimum 0
project_idintegerДаminimum 0
autotest_suite_idinteger | nullНетminimum 0
test_case_idinteger | nullНетminimum 0
execution_context_idinteger | nullНетminimum 0
autotest_case_titlestringНетmaxLength 500
autotest_case_descriptionstring | nullНет-
autotest_case_statusenumНет"PENDING", "READY", "DISABLED"
autotest_case_kindenumНет"CASE", "COMMON"
test_account_idinteger | nullНетminimum 0
created_atstringНет-
updated_atstringНет-
autotest_steps-Нет-
pre_autotest_case_ids-Нет-

Ответ ​

main-app://schemas/api_elements/autotest_case/create_mass.response.json

RESPONSE /web_api/autotest_case/create_mass

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

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

api_result ​

ИмяТипОбязательноеОграничение
createdarray of objectДа-
failedarray of objectДа-
created_countintegerДаminimum 0
failed_countintegerДаminimum 0

api_result.created[] ​

ИмяТипОбязательноеОграничение
itemintegerДаminimum 1
autotest_case_idintegerДаminimum 1

api_result.failed[] ​

ИмяТипОбязательноеОграничение
itemintegerДаminimum 1
messagestringДа-

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

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

Запрос: main-app://schemas/api_elements/autotest_case/create_mass.request.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/autotest_case/create_mass.request.json",
  "title": "REQUEST /web_api/autotest_case/create_mass",
  "$comment": "Generated from the DB model structure_scheme. Edit the model, then run node fill-from-structure-scheme.mjs.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "items"
  ],
  "properties": {
    "items": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "$ref": "main-app://schemas/api_elements/autotest_case/create.request.json"
      }
    }
  }
}
Фрагмент: main-app://schemas/api_elements/autotest_case/create.request.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/autotest_case/create.request.json",
  "title": "REQUEST /web_api/autotest_case/create",
  "$comment": "Generated from the DB model structure_scheme. Edit the model, then run node fill-from-structure-scheme.mjs.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "team_id": {
      "type": "integer",
      "minimum": 0
    },
    "project_id": {
      "type": "integer",
      "minimum": 0
    },
    "autotest_suite_id": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "test_case_id": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "execution_context_id": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "autotest_case_title": {
      "type": "string",
      "maxLength": 500
    },
    "autotest_case_description": {
      "type": [
        "string",
        "null"
      ]
    },
    "autotest_case_status": {
      "type": "string",
      "enum": [
        "PENDING",
        "READY",
        "DISABLED"
      ]
    },
    "autotest_case_kind": {
      "type": "string",
      "enum": [
        "CASE",
        "COMMON"
      ]
    },
    "test_account_id": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "created_at": {
      "type": "string",
      "description": "timestamp Y-m-d H:i:s"
    },
    "updated_at": {
      "type": "string",
      "description": "timestamp Y-m-d H:i:s"
    },
    "autotest_steps": {
      "description": "Accepted on create. Not a column."
    },
    "pre_autotest_case_ids": {
      "description": "Accepted on create. Not a column."
    }
  },
  "required": [
    "team_id",
    "project_id"
  ]
}
Ответ: main-app://schemas/api_elements/autotest_case/create_mass.response.json
json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "main-app://schemas/api_elements/autotest_case/create_mass.response.json",
  "title": "RESPONSE /web_api/autotest_case/create_mass",
  "$comment": "Generated from the DB model structure_scheme. Edit the model, then run node fill-from-structure-scheme.mjs.",
  "allOf": [
    {
      "$ref": "main-app://schemas/_shared/envelope-success.json"
    },
    {
      "type": "object",
      "properties": {
        "api_result": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "created",
            "failed",
            "created_count",
            "failed_count"
          ],
          "properties": {
            "created": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "item",
                  "autotest_case_id"
                ],
                "additionalProperties": true,
                "properties": {
                  "item": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "autotest_case_id": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            },
            "failed": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "item",
                  "message"
                ],
                "additionalProperties": true,
                "properties": {
                  "item": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            },
            "created_count": {
              "type": "integer",
              "minimum": 0
            },
            "failed_count": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  ]
}
Фрагмент: 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

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