作成¶
POST /api/v1/role/add
概要¶
ロールを作成します。
Body リクエストパラメーター¶
| パラメーター名 | 型 | 必須 | 説明 |
|---|---|---|---|
| name | string | Y | ロール名 例: ロール1号 空を許可: False 最大長: 256 |
| desc | string | ロールの説明 例: CUSTOM 空を許可: False 空文字列を許可: True 最大長: 3000 |
|
| keys | array | Y | 選択した権限リスト 例: [] 空を許可: False |
パラメーター補足説明¶
リクエスト例¶
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"
}