Summary
Create a role.
Description
Create a role
Route
POST /authorization/roles
Roles
admin
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
role |
object |
yes |
The role to create. |
Copied to Clipboard
{
"role": {
"provenance": "Custom",
"name": "role_1",
"description": "description of role_1",
"allowedMethods": [
{
"name": "methodName",
"provenance": "ApplicationName"
},
{
"name": "methodName",
"provenance": "ApplicationName"
},
{
"name": "methodName",
"provenance": "ApplicationName"
},
{
"name": "methodName",
"provenance": "ApplicationName"
},
{
"name": "methodName",
"provenance": "ApplicationName"
}
],
"allowedViews": [
{
"path": "/manual/task/path",
"provenance": "ApplicationName"
},
{
"path": "/manual/task/path",
"provenance": "ApplicationName"
},
{
"path": "/manual/task/path",
"provenance": "ApplicationName"
}
],
"_meta": {
"created": "2018-08-02T15:56:12.912Z",
"updated": "2018-08-02T15:56:12.912Z"
}
}
}
Copied to Clipboard
{
"type": "object",
"properties": {
"role": {
"title": "role",
"$ref": "roles-schema"
}
},
"required": [
"role"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
result |
object |
Result of role creation process |
Copied to Clipboard
{
"status": "Created",
"message": "A sample success message",
"data": {
"provenance": "Custom",
"name": "role_1",
"description": "description of role_1",
"allowedMethods": [
{
"name": "methodName",
"provenance": "ApplicationName"
},
{
"name": "methodName",
"provenance": "ApplicationName"
},
{
"name": "methodName",
"provenance": "ApplicationName"
},
{
"name": "methodName",
"provenance": "ApplicationName"
}
],
"allowedViews": [
{
"path": "/manual/task/path",
"provenance": "ApplicationName"
},
{
"path": "/manual/task/path",
"provenance": "ApplicationName"
},
{
"path": "/manual/task/path",
"provenance": "ApplicationName"
}
],
"_meta": {
"created": "2018-08-02T15:56:12.912Z",
"updated": "2018-08-02T15:56:12.912Z"
}
}
}