3
0
corteza/api/compose/spec/permissions.json
2019-05-26 08:41:20 +02:00

99 lines
2.0 KiB
JSON

{
"Title": "Permissions",
"Interface": "Permissions",
"Struct": [
{
"imports": [
"github.com/cortezaproject/corteza-server/internal/permissions"
]
}
],
"Parameters": {},
"Protocol": "",
"Authentication": [
"Client ID",
"Session ID"
],
"Path": "/permissions",
"APIs": [
{
"Name": "list",
"Method": "GET",
"Title": "Retrieve defined permissions",
"Path": "/",
"Parameters": {}
},
{
"Name": "effective",
"Method": "GET",
"Title": "Effective rules for current user",
"Path": "/effective",
"Parameters": {
"get": [
{
"name": "resource",
"required": false,
"title": "Show only rules for a specific resource",
"type": "string"
}
]
}
},
{
"Name": "read",
"Method": "GET",
"Title": "Retrieve role permissions",
"Path": "/{roleID}/rules",
"Parameters": {
"path": [
{
"name": "roleID",
"required": true,
"title": "Role ID",
"type": "uint64"
}
]
}
},
{
"Name": "delete",
"Method": "DELETE",
"Title": "Remove all defined role permissions",
"Path": "/{roleID}/rules",
"Parameters": {
"path": [
{
"name": "roleID",
"required": true,
"title": "Role ID",
"type": "uint64"
}
]
}
},
{
"Name": "update",
"Method": "PATCH",
"Title": "Update permission settings",
"Path": "/{roleID}/rules",
"Parameters": {
"path": [
{
"name": "roleID",
"required": true,
"title": "Role ID",
"type": "uint64"
}
],
"post": [
{
"name": "rules",
"required": true,
"title": "List of permission rules to set",
"type": "permissions.RuleSet"
}
]
}
}
]
}