생성¶
POST /api/v1/role/add
개요¶
역할 생성
Body 요청 매개변수¶
| 매개변수명 | 유형 | 필수 | 설명 |
|---|---|---|---|
| name | string | 예 | 역할 이름 예시: 역할 1번 null 허용: 아니요 최대 길이: 256 |
| desc | string | 역할 설명 정보 예시: CUSTOM null 허용: 아니요 빈 문자열 허용: 예 최대 길이: 3000 |
|
| keys | array | 예 | 선택한 권한 목록 예시: [] null 허용: 아니요 |
매개변수 추가 설명¶
요청 예시¶
curl 'https://openapi.guance.com/api/v1/role/add' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'DF-API-KEY: <DF-API-KEY>' \
--data-raw '{"name":"Custom Management","desc":"test","keys":["workspace.readMember","label.labelCfgManage","log.externalIndexManage"]}' \
--compressed
응답¶
{
"code": 200,
"content": {
"createAt": 1722827399,
"creator": "wsak_xxxx32",
"declaration": {
"asd": "aa,bb,cc,1,True",
"asdasd": "dawdawd",
"business": "aaa",
"fawf": "afawf",
"organization": "64fe7b4062f74d0007b46676"
},
"deleteAt": -1,
"desc": "test",
"id": null,
"isSystem": 0,
"name": "Custom Management",
"status": 0,
"updateAt": 1722827399,
"updator": "wsak_xxxx32",
"uuid": "role_xxxx32",
"workspaceUUID": "wksp_xxxx32"
},
"errorCode": "",
"message": "",
"success": true,
"traceId": "9008386843384026938"
}