Создать несоответствие
POST
bearerheader
AuthorizationBearer <token>Токен сервисного аккаунта. См. раздел «Аутентификация».
application/jsonbody
status_id?numberОбязателен для обычного несоответствия; игнорируется для кросс-юнитового (executor_unit_ids)
executor_unit_ids?array<number>ID юнитов-исполнителей (смежников). Если задано — несоответствие становится кросс-юнитовым с фиксированным жизненным циклом, а status_id не используется
TODO: Заменить на типизированный объект
client_request_id?stringСтабильный идентификатор запроса, сгенерированный клиентом, для идемпотентного создания несоответствия (offline PWA повторы)
Длинадо 128 символов
unit_id*numbercategory_id*numbertitle*stringДлинаот 3 до 100 символов
priority*numberЗначения
012567910due_date*string | nullФормат
date-timeinspection_id?numberТело ответа
responseapplication/json
id*numberorganization_id*numbercode*stringtitle*stringlifecycle_status*number | nullЗначения
123456priority*numberЗначения
012567910created_at*stringФормат
date-timeupdated_at*stringФормат
date-timedue_date*string | nullФормат
date-timeresolved_at*string | nullФормат
date-timedata*objectВозможные ошибки
401Unauthorized
unauthorized: Необходима авторизация
{ "statusCode": 401, "error": "unauthorized", "message": "Необходима авторизация"}403Forbidden
access_denied: Недостаточно прав
{ "statusCode": 403, "error": "access_denied", "message": "Недостаточно прав"}404Not Found
finding_not_found: Несоответствие не найдено
{ "statusCode": 404, "error": "finding_not_found", "message": "Несоответствие не найдено"}451Unavailable For Legal Reasons
Система в режиме readonly. Не удалось проверить лицензию
{ "statusCode": 451, "error": "backend_license_failed", "message": "Система в режиме readonly. Не удалось проверить лицензию"}curl -X POST 'https://org.inspecto.in/api/findings' \ -H 'Content-Type: application/json' \ -d '{ "data": {}, "unit_id": 0, "category_id": 0, "title": "string", "description": { "version": 0, "blocks": [ {} ] }, "priority": 0, "due_date": "2019-08-24T14:15:22Z"}'Пример ответа
{ "id": 0, "organization_id": 0, "code": "string", "title": "string", "unit": { "id": 0, "organization_id": 0, "parent_unit_id": 0, "code": "string", "title": "string", "description": "string", "avatar": "string", "background": "string", "projects_enabled": true, "features": { "projects": true, "cross_unit_tasks": true, "cross_unit_findings": true } }, "issuer_user": { "id": 0, "first_name": "string", "last_name": "string", "patronymic": "string", "avatar": "string" }, "assignees": [ { "type": "user", "id": 1, "first_name": "John", "last_name": "Doe", "patronymic": "Ivanovich", "email": "john@example.com", "title": "Developers", "avatar": "string" } ], "status": { "id": 0, "title": "string", "category": 1, "order_id": 0, "data": {}, "has_user_access": true, "has_group_access": true }, "category": { "id": 0, "title": "string" }, "lifecycle_status": 1, "executor_units": [ { "id": 0, "organization_id": 0, "parent_unit_id": 0, "code": "string", "title": "string", "description": "string", "avatar": "string", "background": "string", "projects_enabled": true, "features": { "projects": true, "cross_unit_tasks": true, "cross_unit_findings": true } } ], "priority": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "due_date": "2019-08-24T14:15:22Z", "resolved_at": "2019-08-24T14:15:22Z", "description": { "version": 0, "blocks": [ {} ] }, "data": {}, "inspections": [ { "id": 0, "organization_id": 0, "code": "string", "title": "string", "unit": { "id": 0, "organization_id": 0, "parent_unit_id": 0, "code": "string", "title": "string", "description": "string", "avatar": "string", "background": "string", "projects_enabled": true, "features": { "projects": true, "cross_unit_tasks": true, "cross_unit_findings": true } }, "template": { "id": 0, "organization_id": 0, "unit": { "id": 0, "organization_id": 0, "parent_unit_id": 0, "code": "string", "title": "string", "description": "string", "avatar": "string", "background": "string", "projects_enabled": true, "features": { "projects": true, "cross_unit_tasks": true, "cross_unit_findings": true } }, "code": "string", "title": "string", "avatar": "string", "description": "string", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "status": 1, "is_bookmarked": true, "template_folder_id": 0 }, "user": { "id": 0, "first_name": "string", "last_name": "string", "patronymic": "string", "avatar": "string" }, "score": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "status": 1, "tasks": [ { "id": 0, "organization_id": 0, "code": "string", "title": "string", "order_id": 0, "unit": { "id": 0, "organization_id": 0, "parent_unit_id": 0, "code": "string", "title": "string", "description": "string", "avatar": "string", "background": "string", "projects_enabled": true, "features": { "projects": true, "cross_unit_tasks": true, "cross_unit_findings": true } }, "issuer_user": { "id": 0, "first_name": "string", "last_name": "string", "patronymic": "string", "avatar": "string" }, "assignees": [ { "type": "user", "id": 1, "first_name": "John", "last_name": "Doe", "patronymic": "Ivanovich", "email": "john@example.com", "title": "Developers", "avatar": "string" } ], "status": { "id": 0, "title": "string", "category": 1, "order_id": 0, "data": {}, "has_user_access": true, "has_group_access": true }, "lifecycle_status": 1, "executor_units": [ { "id": 0, "organization_id": 0, "parent_unit_id": 0, "code": "string", "title": "string", "description": "string", "avatar": "string", "background": "string", "projects_enabled": true, "features": { "projects": true, "cross_unit_tasks": true, "cross_unit_findings": true } } ], "priority": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "due_date": "2019-08-24T14:15:22Z", "resolved_at": "2019-08-24T14:15:22Z" } ], "findings": [ { "id": 0, "organization_id": 0, "code": "string", "title": "string", "unit": { "id": 0, "organization_id": 0, "parent_unit_id": 0, "code": "string", "title": "string", "description": "string", "avatar": "string", "background": "string", "projects_enabled": true, "features": { "projects": true, "cross_unit_tasks": true, "cross_unit_findings": true } }, "issuer_user": { "id": 0, "first_name": "string", "last_name": "string", "patronymic": "string", "avatar": "string" }, "assignees": [ { "type": "user", "id": 1, "first_name": "John", "last_name": "Doe", "patronymic": "Ivanovich", "email": "john@example.com", "title": "Developers", "avatar": "string" } ], "status": { "id": 0, "title": "string", "category": 1, "order_id": 0, "data": {}, "has_user_access": true, "has_group_access": true }, "category": { "id": 0, "title": "string" }, "lifecycle_status": 1, "executor_units": [ { "id": 0, "organization_id": 0, "parent_unit_id": 0, "code": "string", "title": "string", "description": "string", "avatar": "string", "background": "string", "projects_enabled": true, "features": { "projects": true, "cross_unit_tasks": true, "cross_unit_findings": true } } ], "priority": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "due_date": "2019-08-24T14:15:22Z", "resolved_at": "2019-08-24T14:15:22Z" } ] } ], "tasks": [ { "id": 0, "organization_id": 0, "code": "string", "title": "string", "order_id": 0, "unit": { "id": 0, "organization_id": 0, "parent_unit_id": 0, "code": "string", "title": "string", "description": "string", "avatar": "string", "background": "string", "projects_enabled": true, "features": { "projects": true, "cross_unit_tasks": true, "cross_unit_findings": true } }, "issuer_user": { "id": 0, "first_name": "string", "last_name": "string", "patronymic": "string", "avatar": "string" }, "assignees": [ { "type": "user", "id": 1, "first_name": "John", "last_name": "Doe", "patronymic": "Ivanovich", "email": "john@example.com", "title": "Developers", "avatar": "string" } ], "status": { "id": 0, "title": "string", "category": 1, "order_id": 0, "data": {}, "has_user_access": true, "has_group_access": true }, "lifecycle_status": 1, "executor_units": [ { "id": 0, "organization_id": 0, "parent_unit_id": 0, "code": "string", "title": "string", "description": "string", "avatar": "string", "background": "string", "projects_enabled": true, "features": { "projects": true, "cross_unit_tasks": true, "cross_unit_findings": true } } ], "priority": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "due_date": "2019-08-24T14:15:22Z", "resolved_at": "2019-08-24T14:15:22Z" } ]}