/api/v2/bpm/roles/{role_id}
Метод обновляет информацию о роли по ID.
В основном метод используется для редактирования набора разрешений у определенной роли
Path Parameters
- role_id integer required
ID роли
Example: 6
Header Parameters
- Authorization stringExample: {{token}}
- application/json
Request Body
- name string required
Possible values:
non-empty
and<= 255 characters
Наименование роли пользователя BPMS
- description string
Possible values:
non-empty
and<= 255 characters
Краткое описание роли пользователя BPMS
- permissions int64[] required
Массив разрешениями (допусками к использованию различных эндпоинтов)
Responses
- 200
- 400
- 401
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
- object
{}
{
"status": 1,
"message": "Roles is successfully updated",
"response": {
"id": 6,
"name": "new_name",
"description": "new_desc",
"permissions": [
341236,
341238,
341241
]
},
"preparingsTime": 0.391
}
Bad Request
- application/json
- Schema
- Example (from schema)
- example-0
- example-1
- example-2
Schema
- object
{}
400(404)
{
"status": 0,
"message": "Not found",
"response": {},
"preparingsTime": 0.032
}
400
{
"status": 0,
"message": {
"name": [
"This field may not be blank."
],
"description": [
"This field may not be blank."
]
},
"response": {},
"preparingsTime": 0.209
}
400_2
{
"status": 0,
"message": {
"name": [
"This field may not be null."
],
"permissions": [
"This field may not be null."
]
},
"response": {},
"preparingsTime": 0.126
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
- object
{}
{
"status": 0,
"message": "Authentication credentials were not provided.",
"response": {
"detail": "Authentication credentials were not provided."
},
"preparingsTime": 0.003
}
Loading...