Перейти к содержимому

Получить данные для MainBoard

GET
/views/overview

Авторизация

bearer
headerAuthorizationBearer <token>

Токен сервисного аккаунта. См. раздел «Аутентификация».

Query-параметры

unit_id?number

Тело ответа

responseapplication/json

Возможные ошибки

401Unauthorized

unauthorized: Необходима авторизация

{  "statusCode": 401,  "error": "unauthorized",  "message": "Необходима авторизация"}
403Forbidden

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

{  "statusCode": 403,  "error": "access_denied",  "message": "Недостаточно прав"}
Пример запроса
curl -X GET 'https://org.inspecto.in/api/views/overview'
Пример ответа
{  "findings": {    "count": 0,    "sum": 0,    "offset": 0,    "items": [      {        "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": {    "count": 0,    "sum": 0,    "offset": 0,    "items": [      {        "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"      }    ]  },  "inspections": {    "count": 0,    "sum": 0,    "offset": 0,    "items": [      {        "status": 1,        "id": 0,        "schedule_id": 0,        "schedule": {          "type": "calendar",          "organization_id": 0,          "id": 0,          "title": "string",          "repeat_rule": "string",          "duration": 0,          "is_active": true,          "allow_late_submit": true,          "start_date": "2019-08-24T14:15:22Z",          "end_date": "2019-08-24T14:15:22Z",          "assignee_user": {            "id": 0,            "email": "string",            "phone": "string",            "first_name": "string",            "last_name": "string",            "patronymic": "string",            "birthday": "2019-08-24T14:15:22Z",            "gender": 0,            "avatar": "string",            "created_at": "2019-08-24T14:15:22Z"          },          "assignee_group": {            "organization_id": 0,            "id": 0,            "code": "string",            "title": "string",            "description": "string",            "created_at": "2019-08-24T14:15:22Z",            "updated_at": "2019-08-24T14:15:22Z"          },          "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          },          "created_at": "2019-08-24T14:15:22Z",          "updated_at": "2019-08-24T14:15:22Z"        },        "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        },        "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          }        },        "assignee_user": {          "id": 0,          "email": "string",          "phone": "string",          "first_name": "string",          "last_name": "string",          "patronymic": "string",          "birthday": "2019-08-24T14:15:22Z",          "gender": 0,          "avatar": "string",          "created_at": "2019-08-24T14:15:22Z"        },        "assignee_group": {          "organization_id": 0,          "id": 0,          "code": "string",          "title": "string",          "description": "string",          "created_at": "2019-08-24T14:15:22Z",          "updated_at": "2019-08-24T14:15:22Z"        },        "start_date": "2019-08-24T14:15:22Z",        "end_date": "2019-08-24T14:15:22Z",        "inspection": {          "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"            }          ]        }      }    ]  }}