{
"name": "string",
"description": "string",
"permissionScope": 100,
"type": 0,
"hideAppForMembers": true,
"globalPermissions": {
"addRecord": true,
"share": true,
"import": true,
"export": true,
"discuss": true,
"systemPrint": true,
"attachmentDownload": true,
"log": true
},
"worksheetPermissions": [
{
"id": "string",
"recordPermissionInViews": [
{
"viewId": "string",
"read": true,
"edit": true,
"delete": true
}
],
"recordDataScope": {
"read": 0,
"edit": 0,
"delete": 0
},
"worksheetActions": {
"shareView": true,
"import": true,
"export": true,
"discuss": true,
"batchOperation": true
},
"recordActions": {
"add": true,
"share": true,
"discuss": true,
"systemPrint": true,
"attachmentDownload": true,
"log": true
},
"paymentActions": {
"pay": "string"
},
"fieldPermissions": [
{
"id": "string",
"add": true,
"read": true,
"edit": true,
"decrypt": true
}
]
}
],
"pagePermissions": [
{
"id": "string",
"enable": true
}
]
}
curl --location --request POST 'https://api.mingdao.com/v3/app/roles' \
--header 'HAP-Appkey: {{appkey}}' \
--header 'HAP-Sign: {{sign}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"description": "string",
"permissionScope": 100,
"type": 0,
"hideAppForMembers": true,
"globalPermissions": {
"addRecord": true,
"share": true,
"import": true,
"export": true,
"discuss": true,
"systemPrint": true,
"attachmentDownload": true,
"log": true
},
"worksheetPermissions": [
{
"id": "string",
"recordPermissionInViews": [
{
"viewId": "string",
"read": true,
"edit": true,
"delete": true
}
],
"recordDataScope": {
"read": 0,
"edit": 0,
"delete": 0
},
"worksheetActions": {
"shareView": true,
"import": true,
"export": true,
"discuss": true,
"batchOperation": true
},
"recordActions": {
"add": true,
"share": true,
"discuss": true,
"systemPrint": true,
"attachmentDownload": true,
"log": true
},
"paymentActions": {
"pay": "string"
},
"fieldPermissions": [
{
"id": "string",
"add": true,
"read": true,
"edit": true,
"decrypt": true
}
]
}
],
"pagePermissions": [
{
"id": "string",
"enable": true
}
]
}'
{
"data": {
"id": "6825715d-92cc-4e15-83ce-8e39d1a667bc",
"name": "New role 40",
"roleType": 0,
"desc": "",
"users": [],
"departments": [],
"departmentTrees": [],
"projectOrganizes": [],
"jobs": []
},
"success": true
}