Контроль доступа
Контроль доступа: правила, проверки, матрицы.
curl -X GET "https://loading/api/v1/security/access-rules"[
{
"id": "string",
"permissions": [
"read"
],
"resourceId": "string",
"resourceType": "registry",
"subjectId": "string",
"subjectType": "user",
"teamId": "string",
"property1": null,
"property2": null
}
]Создать правило доступа
В: header
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/access-rules" \ -H "Content-Type: application/json" \ -d '{ "permissions": [ "read" ], "resourceId": "string", "resourceType": "registry", "subjectId": "string", "subjectType": "user" }'{
"id": "string",
"permissions": [
"read"
],
"resourceId": "string",
"resourceType": "registry",
"subjectId": "string",
"subjectType": "user",
"teamId": "string",
"property1": null,
"property2": null
}Проверка доступа текущего пользователя
В: header
Параметры запроса
Тип ресурса, на который выдаётся доступ
"registry" | "task" | "calendar" | "automation" | "interface" | "document" | "approval" | "signature"Идентификатор ресурса
Проверяемое отношение, например can_view или can_edit
1 <= lengthТело ответа
application/json
curl -X GET "https://loading/api/v1/security/access-rules/check?resourceType=registry&resourceId=string&relation=string"{
"allowed": true,
"reason": "string",
"property1": null,
"property2": null
}Правила для конкретного ресурса
В: header
Параметры пути
Тип ресурса, на который выдаётся доступ
"registry" | "task" | "calendar" | "automation" | "interface" | "document" | "approval" | "signature"Идентификатор ресурса
Тело ответа
application/json
curl -X GET "https://loading/api/v1/security/access-rules/resource/registry/string"[
{
"id": "string",
"permissions": [
"read"
],
"resourceId": "string",
"resourceType": "registry",
"subjectId": "string",
"subjectType": "user",
"teamId": "string",
"property1": null,
"property2": null
}
]Обновить правило доступа
В: header
Параметры пути
Идентификатор правила
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X PATCH "https://loading/api/v1/security/access-rules/string" \ -H "Content-Type: application/json" \ -d '{ "permissions": [ "read" ] }'{
"id": "string",
"permissions": [
"read"
],
"resourceId": "string",
"resourceType": "registry",
"subjectId": "string",
"subjectType": "user",
"teamId": "string",
"property1": null,
"property2": null
}Удалить правило доступа
В: header
Параметры пути
Идентификатор правила
Тело ответа
curl -X DELETE "https://loading/api/v1/security/access-rules/string"Пакетная проверка доступа к модулям
В: header
Тело запроса
application/json
TypeScript-определения
Используйте тип request body в TypeScript.
Тело ответа
application/json
curl -X POST "https://loading/api/v1/security/access/check-modules" \ -H "Content-Type: application/json" \ -d '{ "modules": [ "string" ] }'{
"property1": true,
"property2": true
}