{ "swagger": "2.0", "info": { "title": "Public API Облачной Платформы", "version": "1.0" }, "tags": [ { "name": "OrganizationUnitService" }, { "name": "ProjectService" } ], "host": "organization.api.cloud.ru", "basePath": "/", "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/v1/organization-unit": { "get": { "summary": "Получение списка каталогов, удовлетворяющих фильтру.", "operationId": "OrganizationUnitService_ListOrganizationUnits", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1ListOrganizationUnitsResponse" } }, "400": { "description": "Некорректный запрос", "schema": {} }, "401": { "description": "Необходима авторизация", "schema": {} }, "403": { "description": "Доступ запрещен", "schema": {} }, "404": { "description": "Ресурс не найден", "schema": {} }, "500": { "description": "Внутренняя ошибка сервера", "schema": {} } }, "parameters": [ { "name": "customer_ids", "description": "Фильтр поиска по идентификаторам клиентов.", "in": "query", "required": false, "type": "array", "items": { "type": "string" }, "collectionFormat": "multi" }, { "name": "page_filter.limit", "description": "Количество сущностей на странице.", "in": "query", "required": false, "type": "integer", "format": "int64" }, { "name": "page_filter.page", "description": "Номер страницы.\nНумерация начинается с 1.", "in": "query", "required": false, "type": "integer", "format": "int64" }, { "name": "organization_unit_ids", "description": "Фильтр поиска по идентификаторам каталогов.", "in": "query", "required": false, "type": "array", "items": { "type": "string" }, "collectionFormat": "multi" } ], "tags": [ "OrganizationUnitService" ] }, "post": { "summary": "Создание каталога.", "operationId": "OrganizationUnitService_CreateOrganizationUnit", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1OrganizationUnit" } }, "400": { "description": "Некорректный запрос", "schema": {} }, "401": { "description": "Необходима авторизация", "schema": {} }, "403": { "description": "Доступ запрещен", "schema": {} }, "404": { "description": "Ресурс не найден", "schema": {} }, "500": { "description": "Внутренняя ошибка сервера", "schema": {} } }, "parameters": [ { "name": "body", "description": "Запрос на создание каталога.", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1CreateOrganizationUnitRequest" } } ], "tags": [ "OrganizationUnitService" ] } }, "/v1/organization-unit/{id}": { "get": { "summary": "Получение каталога по id.", "operationId": "OrganizationUnitService_GetOrganizationUnit", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1OrganizationUnit" } }, "400": { "description": "Некорректный запрос", "schema": {} }, "401": { "description": "Необходима авторизация", "schema": {} }, "403": { "description": "Доступ запрещен", "schema": {} }, "404": { "description": "Ресурс не найден", "schema": {} }, "500": { "description": "Внутренняя ошибка сервера", "schema": {} } }, "parameters": [ { "name": "id", "description": "Идентификатор каталога.", "in": "path", "required": true, "type": "string" } ], "tags": [ "OrganizationUnitService" ] }, "delete": { "summary": "Удаление каталога по id.", "operationId": "OrganizationUnitService_DeleteOrganizationUnit", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1DeleteOrganizationUnitResponse" } }, "400": { "description": "Некорректный запрос", "schema": {} }, "401": { "description": "Необходима авторизация", "schema": {} }, "403": { "description": "Доступ запрещен", "schema": {} }, "404": { "description": "Ресурс не найден", "schema": {} }, "500": { "description": "Внутренняя ошибка сервера", "schema": {} } }, "parameters": [ { "name": "id", "description": "Идентификатор каталога.", "in": "path", "required": true, "type": "string" } ], "tags": [ "OrganizationUnitService" ] }, "patch": { "summary": "Обновление каталога по id.", "description": "Обновляет каталог по id.\nНезаполненные поля не обновляются.", "operationId": "OrganizationUnitService_PatchOrganizationUnit", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1OrganizationUnit" } }, "400": { "description": "Некорректный запрос", "schema": {} }, "401": { "description": "Необходима авторизация", "schema": {} }, "403": { "description": "Доступ запрещен", "schema": {} }, "404": { "description": "Ресурс не найден", "schema": {} }, "500": { "description": "Внутренняя ошибка сервера", "schema": {} } }, "parameters": [ { "name": "id", "description": "Идентификатор каталога.", "in": "path", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Название каталога." }, "description": { "type": "string", "description": "Описание каталога." } }, "description": "Запрос на обновление каталога по id." } } ], "tags": [ "OrganizationUnitService" ] } }, "/v1/projects": { "get": { "summary": "Получение списка проектов, удовлетворяющих фильтру.", "operationId": "ProjectService_ListProjects", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1ListProjectsResponse" } }, "400": { "description": "Некорректный запрос", "schema": {} }, "401": { "description": "Необходима авторизация", "schema": {} }, "403": { "description": "Доступ запрещен", "schema": {} }, "404": { "description": "Ресурс не найден", "schema": {} }, "500": { "description": "Внутренняя ошибка сервера", "schema": {} } }, "parameters": [ { "name": "status", "description": "Фильтр по статусу проекта.\n\n - PROJECT_STATUS_UNSPECIFIED: Неизвестный статус проекта.\n - PROJECT_STATUS_ENABLED: Проект активен.\n - PROJECT_STATUS_DISABLED: Проект неактивен.", "in": "query", "required": false, "type": "string", "enum": [ "PROJECT_STATUS_UNSPECIFIED", "PROJECT_STATUS_ENABLED", "PROJECT_STATUS_DISABLED" ], "default": "PROJECT_STATUS_UNSPECIFIED" }, { "name": "page_filter.limit", "description": "Количество сущностей на странице.", "in": "query", "required": false, "type": "integer", "format": "int64" }, { "name": "page_filter.page", "description": "Номер страницы.\nНумерация начинается с 1.", "in": "query", "required": false, "type": "integer", "format": "int64" }, { "name": "project_ids", "description": "Фильтр по id проекта.", "in": "query", "required": false, "type": "array", "items": { "type": "string" }, "collectionFormat": "multi" }, { "name": "customer_ids", "description": "Фильтр по id клиента.", "in": "query", "required": false, "type": "array", "items": { "type": "string" }, "collectionFormat": "multi" }, { "name": "organization_unit_ids", "description": "Фильтр по id каталога.", "in": "query", "required": false, "type": "array", "items": { "type": "string" }, "collectionFormat": "multi" } ], "tags": [ "ProjectService" ] }, "post": { "summary": "Создание проекта.", "operationId": "ProjectService_CreateProject", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1Project" } }, "400": { "description": "Некорректный запрос", "schema": {} }, "401": { "description": "Необходима авторизация", "schema": {} }, "403": { "description": "Доступ запрещен", "schema": {} }, "404": { "description": "Ресурс не найден", "schema": {} }, "500": { "description": "Внутренняя ошибка сервера", "schema": {} } }, "parameters": [ { "name": "body", "description": "Запрос на создание проекта.", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v1CreateProjectRequest" } } ], "tags": [ "ProjectService" ] } }, "/v1/projects/{id}": { "get": { "summary": "Получение проекта по id.", "operationId": "ProjectService_GetProject", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1Project" } }, "400": { "description": "Некорректный запрос", "schema": {} }, "401": { "description": "Необходима авторизация", "schema": {} }, "403": { "description": "Доступ запрещен", "schema": {} }, "404": { "description": "Ресурс не найден", "schema": {} }, "500": { "description": "Внутренняя ошибка сервера", "schema": {} } }, "parameters": [ { "name": "id", "description": "Идентификатор проекта.", "in": "path", "required": true, "type": "string" } ], "tags": [ "ProjectService" ] }, "delete": { "summary": "Удаление проекта по id.", "operationId": "ProjectService_DeleteProject", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1DeleteProjectResponse" } }, "400": { "description": "Некорректный запрос", "schema": {} }, "401": { "description": "Необходима авторизация", "schema": {} }, "403": { "description": "Доступ запрещен", "schema": {} }, "404": { "description": "Ресурс не найден", "schema": {} }, "500": { "description": "Внутренняя ошибка сервера", "schema": {} } }, "parameters": [ { "name": "id", "description": "Идентификатор проекта.", "in": "path", "required": true, "type": "string" } ], "tags": [ "ProjectService" ] }, "patch": { "summary": "Обновление проекта по id.", "operationId": "ProjectService_PatchProject", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/v1Project" } }, "400": { "description": "Некорректный запрос", "schema": {} }, "401": { "description": "Необходима авторизация", "schema": {} }, "403": { "description": "Доступ запрещен", "schema": {} }, "404": { "description": "Ресурс не найден", "schema": {} }, "500": { "description": "Внутренняя ошибка сервера", "schema": {} } }, "parameters": [ { "name": "id", "description": "Идентификатор проекта.", "in": "path", "required": true, "type": "string" }, { "name": "body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Название проекта." }, "description": { "type": "string", "description": "Описание проекта." } }, "description": "Запрос на обновление проекта по id." } } ], "tags": [ "ProjectService" ] } } }, "definitions": { "v1CreateOrganizationUnitRequest": { "type": "object", "properties": { "customer_id": { "type": "string", "description": "Идентификатор клиента." }, "name": { "type": "string", "description": "Название каталога." }, "description": { "type": "string", "description": "Описание каталога." } }, "description": "Запрос на создание каталога." }, "v1CreateProjectRequest": { "type": "object", "properties": { "name": { "type": "string", "description": "Название проекта." }, "description": { "type": "string", "description": "Описание проекта." }, "organization_unit_id": { "type": "string", "description": "Идентификатор каталога." } }, "description": "Запрос на создание проекта." }, "v1DeleteOrganizationUnitResponse": { "type": "object", "description": "Ответ на запрос удаления каталога." }, "v1DeleteProjectResponse": { "type": "object", "description": "Ответ на запрос удаления проекта по id." }, "v1ListOrganizationUnitsResponse": { "type": "object", "properties": { "organization_units": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/v1OrganizationUnit" }, "description": "Список каталогов." } }, "description": "Ответ на запрос получения списка каталогов." }, "v1ListProjectsResponse": { "type": "object", "properties": { "projects": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/v1Project" }, "description": "Список проектов." } }, "description": "Ответ на запрос получения списка проектов, удовлетворяющих фильтру." }, "v1OrganizationUnit": { "type": "object", "properties": { "id": { "type": "string", "title": "Идентификатор каталога" }, "customer_id": { "type": "string", "description": "Идентификатор клиента." }, "name": { "type": "string", "description": "Название каталога." }, "description": { "type": "string", "description": "Описание каталога." }, "created_at": { "type": "string", "format": "date-time", "description": "Дата создания каталога." }, "updated_at": { "type": "string", "format": "date-time", "description": "Дата последнего обновления каталога." }, "created_by": { "type": "string", "description": "Идентификатор пользователя, создавшего каталог." }, "updated_by": { "type": "string", "description": "Идентификатор последнего пользователя, обновившего каталог." } }, "description": "Объект каталога." }, "v1PageFilter": { "type": "object", "properties": { "limit": { "type": "integer", "format": "int64", "description": "Количество сущностей на странице." }, "page": { "type": "integer", "format": "int64", "description": "Номер страницы.\nНумерация начинается с 1." } }, "description": "Фильтр для постраничного вывода сущностей.", "title": "PageFilter" }, "v1Project": { "type": "object", "properties": { "id": { "type": "string", "description": "Идентификатор проекта." }, "name": { "type": "string", "description": "Название проекта." }, "description": { "type": "string", "description": "Описание проекта." }, "organization_unit_id": { "type": "string", "description": "Идентификатор каталога." }, "customer_id": { "type": "string", "description": "Идентификатор клиента." }, "status": { "$ref": "#/definitions/v1ProjectStatus", "description": "Статус проекта." }, "created_at": { "type": "string", "format": "date-time", "description": "Дата создания проекта." }, "updated_at": { "type": "string", "format": "date-time", "description": "Дата обновления проекта." } }, "title": "Объект проекта" }, "v1ProjectStatus": { "type": "string", "enum": [ "PROJECT_STATUS_UNSPECIFIED", "PROJECT_STATUS_ENABLED", "PROJECT_STATUS_DISABLED" ], "default": "PROJECT_STATUS_UNSPECIFIED", "description": "Статус проекта.\n\n - PROJECT_STATUS_UNSPECIFIED: Неизвестный статус проекта.\n - PROJECT_STATUS_ENABLED: Проект активен.\n - PROJECT_STATUS_DISABLED: Проект неактивен." } }, "securityDefinitions": { "Bearer": { "type": "apiKey", "name": "Authorization", "in": "header" } } }