Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space TMAG and version 7.13
Sv translation
languageru

Описание возможных ошибок:

  • not_unique_field – неуникальное значение;
  • unique – уникальное значение;
  • too_short – слишком короткое значение;
  • too_long – слишком длинное значение;
  • wrong_length – значение неправильной длины;
  • repeat_exactly – значение не совпадает со значением в другом поле;
  • required – у поля обязательно должно быть значение;
  • not_exist_in_list – значение не входит в список;
  • invalid – значение невалидно;
  • contains_child – узел является не листовым;
  • contains_items – узел категории содержит сущности;
  • parent_own_child – родитель содержит детей;
  • parent_self_set_current – попытка установить родителем самого себя;
  • not_valid_json – JSON невалиден;
  • invalid_cron_format – не правильный формат cron;
  • read_only – объект доступен только для чтения;
  • empty – значение не может быть пустым;
  • datastorage_connection_error – нет соединения с Data Storage;
  • datastorage_error – ошибка в работе с Data Storage.
ОшибкаКод возвратаОписание и формат/тело ответа
Успешный ответ 200
collapsetrue
Блок кодаexpand
titleФормат ответа:
Блок кода
language
text
{
    "data": "mixed",
    "meta": "mixed"
}
Ошибка валидации данных/версии400
collapsetrue
Блок кодаexpand
titleФормат ответа в случае неправильной версии API (JSON Scheme)
Блок кода
language
text
{
    "properties": {
        "error": {
            "description": "Контейнер ошибки",
            "properties":  {
                "code":       {
                    "description": "Общее описание ошибки",
                    "type":        "string",
                    "value":       "unsupported_version"
                },
                "meta": {
                    "description": "Дополнительные данные об ошибке",
                    "type":        "object",
                    "properties":  {
                        "supported_versions": {
                            "description": "Массив поддерживаемых версий",
                            "type":        "array",
                            "items": {
                                "description": "Поддерживаемая версия",
                                "type": "string"
                            }
                        }
                    }
                }
            }
        }
    }
}
collapsetrue
Блок кодаexpand
titleФормат ответа в случае ошибки валидации запроса (JSON Scheme)
Блок кода
language
text
{
    "properties": {
        "error": {
            "description": "Контейнер ошибки",
            "properties":  {
                "code":       {
                    "description": "Общее описание ошибки",
                    "type":        "string",
                    "value":       "validation"
                },
                "meta": {
                    "description": "Дополнительные данные об ошибке",
                    "type":        "object",
                    "properties":  {
                        "validation": {
                            "description": "Название полей модели",
                            "type":        "object",
                            "properties":  {
                                "field":     {
                                    "description": "Поле модели",
                                    "type":        "array",
                                    "items":       {
                                        "description": "Ошибка",
                                        "type":        "string",
                                        "values": [
                                            "not_unique_field",
                                            "too_short",
                                            "too_long",
                                            "wrong_length",
                                            "repeat_exactly",
                                            "required",
                                            "not_exist_in_list",
                                            "invalid",
                                            "contains_child",
                                            "contains_items",
                                            "parent_own_child",
                                            "unique",
                                            "not_valid_json",
                                            "invalid_cron_format",
                                            "read_only",
                                            "parent_self_set_current",
                                            "empty"
                                        ]
                                    }
                                },

                                "sub_model": {
                                    "description": "Название вложенной модели",
                                    "type":        "object",
                                    "$ref":       "#/properties/error/properties/meta/properties/validation"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
collapsetrue
Блок кодаexpand
titleПример ошибки при указании неправильной версии
Блок кода
language
text
 {
    "error": {
        "code": "unsupported_version",
        "meta": {
            "supported_versions": ["2", "3"]
        }
    }
}
Необходима авторизация401

Возвращается в любом запросе, где требуется авторизация.

Тело ответа: нет.

Недостаточно прав403

Возвращается в любом запросе, если у текущего пользователя недостаточно  недостаточно прав для выполнения данной операции.

Тело ответа: нет.

Сущность в системе не найдена404

Возвращается, если определенная модель не найдена в системе. Например, не найдена эталонная выгрузка.

Тело ответа: нет

Тело запроса слишком большое413

Возвращается, если передан слишком большой запрос.

Тело ответа: нет.

Превышено количество запросов к серверу429

возвращаетсяВозвращается, если на сервер отправлено слишком много запросов за определенный промежуток времени. Может сопровождаться заголовком Retry-After, указывающим, через какое время можно повторить запрос.

collapsetrue
Блок кодаexpand
titleТело ответа (JSON Scheme):
Блок кода
language
text
{
    "properties": {
        "error": {
            "description": "Контейнер ошибки",
            "properties":  {
                "code": {
                    "description": "Общее описание ошибки",
                    "type":        "string",
                    "value":       "too_many_requests "
                },
                "meta": {
                    "description": "Дополнительные данные об ошибки",
                    "type":        "object",
                    "properties":  {
                        "time": {
                            "description": "HTTP-дата, либо целое число в секундах, через которые можно повторить запрос",
                            "type":        "string"
                        }
                    }
                }
            }
        }
    }
}
Ошибка системы500

 Возвращается, если в системе произошла логическая ошибка, и далее невозможно выполнение запроса.

collapsetrue
Блок кодаexpand
titleТело ответа (JSON Scheme):
Блок кода
language
text
{
    "properties": {
        "error": {
            "description": "Контейнер ошибки",
            "properties":  {
                "code": {
                    "description": "Общее описание ошибки",
                    "type":        "string"
                },
                "meta": {
                    "description": "Дополнительные данные об ошибке",
                    "type":        "object"
                }
            }
        }
    }
}
Сервер временно не доступен503

Информирует, что в данный момент невозможно выполнить запросы, и сервер находится на техническом обслуживании. Приблизительное время окончания технического обслуживания содержится в заголовке Retry-After (значением этого заголовка может быть либо HTTP-дата, либо целое число в секундах).

collapsetrue
Блок кодаexpand
titleТело ответа (JSON Scheme):
Блок кода
language
text
{
    "properties": {
        "error": {
            "description": "Контейнер ошибки",
            "properties":  {
                "code": {
                    "description": "Общее описание ошибки",
                    "type":        "string",
                    "value":       "maintains"
                },
                "meta": {
                    "description": "Дополнительные данные об ошибке",
                    "type":        "object",
                    "properties":  {
                        "time": {
                            "description": "HTTP-дата, либо цело число в секундах, через которые можно повторить запрос",
                            "type":        "string"
                        }
                    }
                }
            }
        }
    }
}
Sv translation
languageen

Description of possible errors:

  • not_unique_field – not a unique value;
  • unique – a unique value;
  • too_short – too short value;
  • too_long – too long value;
  • wrong_length – the value has incorrect length;
  • repeat_exactly – the value does not match the value in a different field;
  • required – the field value is required;
  • not_exist_in_list – the value is not in the list;
  • invalid – invalid value;
  • contains_child – the node has child elements;
  • contains_items – the category node contains entities;
  • parent_own_child – the parent contains child elements;
  • parent_self_set_current – the object tries to set itself its parent;
  • not_valid_json – invalid JSON;
  • invalid_cron_format – incorrect cron format;
  • read_only – the object is readonly;
  • empty – the value cannot be empty.


ErrorReturn codeОписание и формат/тело ответа
Succesful
Successful response200
code
Раскрыть
titleResponse format
:
Блок кода
collapse
language
true
text
{
    "data": "mixed",
    "meta": "mixed"
}
Data/version validation error400
code
Раскрыть
titleError format in case of incorrect version of API (JSON Scheme)
collapse
Блок кода
language
true
text
{
    "properties": {
        "error": {
            "description": "Контейнер ошибки",
            "properties":  {
                "code":       {
                    "description": "Общее описание ошибки",
                    "type":        "string",
                    "value":       "unsupported_version"
                },
                "meta": {
                    "description": "Дополнительные данные об ошибке",
                    "type":        "object",
                    "properties":  {
                        "supported_versions": {
                            "description": "Массив поддерживаемых версий",
                            "type":        "array",
                            "items": {
                                "description": "Поддерживаемая версия",
                                "type": "string"
                            }
                        }
                    }
                }
            }
        }
    }
}
code
Раскрыть
titleResponse format in case of request validation error (JSON Scheme)
collapse
Блок кода
language
true
text
{
    "properties": {
        "error": {
            "description": "Контейнер ошибки",
            "properties":  {
                "code":       {
                    "description": "Общее описание ошибки",
                    "type":        "string",
                    "value":       "validation"
                },
                "meta": {
                    "description": "Дополнительные данные об ошибке",
                    "type":        "object",
                    "properties":  {
                        "validation": {
                            "description": "Название полей модели",
                            "type":        "object",
                            "properties":  {
                                "field":     {
                                    "description": "Поле модели",
                                    "type":        "array",
                                    "items":       {
                                        "description": "Ошибка",
                                        "type":        "string",
                                        "values": [
                                            "not_unique_field",
                                            "too_short",
                                            "too_long",
                                            "wrong_length",
                                            "repeat_exactly",
                                            "required",
                                            "not_exist_in_list",
                                            "invalid",
                                            "contains_child",
                                            "contains_items",
                                            "parent_own_child",
                                            "unique",
                                            "not_valid_json",
                                            "invalid_cron_format",
                                            "read_only",
                                            "parent_self_set_current",
                                            "empty"
                                        ]
                                    }
                                },

                                "sub_model": {
                                    "description": "Название вложенной модели",
                                    "type":        "object",
                                    "$ref":       "#/properties/error/properties/meta/properties/validation"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
code
Раскрыть
titleExample of error when checking uniqueness of a sample unloading name
Блок кода
collapse
language
true
text
 {
    "error": {
        "code": "unsupported_version",
        "meta": {
            "supported_versions": ["2", "3"]
        }
    }
}
Autorization
Authorization is required401

Is returned in all requests which require authorization.

Response body: no

Insufficient permissions403

Is returned for all requests if the current user does not have sufficient permissions to perform a given operation.

Response body: no

Entity is not found404

Is returned if a particular model is not found in the system. For example, a sample unloading is not found.

Response body: no

Request body is too large413

Is returned if a too large request is transferred.

Response body: no

Превышено количество запросов к серверу
The number of requests to the server has been exceeded429

Is returned if too many requests have been sent to the server over a certain period. May include Retry-After heading which specifies in how much time you can repeat the request.

code
Раскрыть
titleResponse body (JSON Scheme)
:
Блок кода
collapse
language
true
text
{
    "properties": {
        "error": {
            "description": "Контейнер ошибки",
            "properties":  {
                "code": {
                    "description": "Общее описание ошибки",
                    "type":        "string",
                    "value":       "too_many_requests "
                },
                "meta": {
                    "description": "Дополнительные данные об ошибки",
                    "type":        "object",
                    "properties":  {
                        "time": {
                            "description": "HTTP-дата, либо целое число в секундах, через которые можно повторить запрос",
                            "type":        "string"
                        }
                    }
                }
            }
        }
    }
}
System error500

Is returned if a logical error has occurred in the system, and the request execution cannot be continued.

code
Раскрыть
titleResponse body (JSON Scheme)
:
Блок кода
collapse
language
true
text
{
    "properties": {
        "error": {
            "description": "Контейнер ошибки",
            "properties":  {
                "code": {
                    "description": "Общее описание ошибки",
                    "type":        "string"
                },
                "meta": {
                    "description": "Дополнительные данные об ошибке",
                    "type":        "object"
                }
            }
        }
    }
}
Server is temporarily unavailable503

Informs that currently is not possible to execute requests and the server is down for maintenance. The Retry-After heading contains estimated time of completion of maintenance (the heading value can be either HTTP-date or an integer in seconds).

code
Раскрыть
titleResponse body (JSON Scheme)
:
Блок кода
collapse
language
true
text
{
    "properties": {
        "error": {
            "description": "Контейнер ошибки",
            "properties":  {
                "code": {
                    "description": "Общее описание ошибки",
                    "type":        "string",
                    "value":       "maintains"
                },
                "meta": {
                    "description": "Дополнительные данные об ошибке",
                    "type":        "object",
                    "properties":  {
                        "time": {
                            "description": "HTTP-дата, либо цело число в секундах, через которые можно повторить запрос",
                            "type":        "string"
                        }
                    }
                }
            }
        }
    }
}