Resource for management of roles
Get list of roles.
The result can be filtered by
id
name
description
id
name
description
name | type | description | default | constraints |
---|---|---|---|---|
page | query | Returned page, if paging is used. Paging starts with 1 |
1 | int |
pageSize | query | Page size for paging. If this is set to -1 no paging is used (all matching items are returned).
Setting this to 0 will return no items. |
-1 | int |
perms | query | Flag to add permission information for the returned items. | false | boolean |
q | query | Query string for filtering | ||
sort | query | Comma separated list of sorted attributes.
Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order |
name |
code | condition |
---|---|
200 | List of roles is returned. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | RoleListResponse (JSON) | list response |
GET /role
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"items" : [ { }, { } ],
"hasMoreItems" : true,
"numItems" : 12345,
"perms" : {
"property1" : [ "updateinheritance", "deleteform" ],
"property2" : [ "setperm", "deleteform" ]
},
"stagingStatus" : {
"property1" : {
"packageName" : "...",
"included" : true
},
"property2" : {
"packageName" : "...",
"included" : true
}
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Create new role
media type | data type | description |
---|---|---|
application/json | RoleModel (JSON) | role |
code | condition |
---|---|
200 | Role {id} was created. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | RoleResponse (JSON) | response containing created role |
PUT /role
Content-Type: application/json
Accept: application/json
{
"id" : 12345,
"name" : {
"property1" : "...",
"property2" : "..."
},
"description" : {
"property1" : "...",
"property2" : "..."
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"role" : {
"id" : 12345,
"name" : {
"property1" : "...",
"property2" : "..."
},
"description" : {
"property1" : "...",
"property2" : "..."
}
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Delete a role
name | type | description |
---|---|---|
id | path | role ID |
code | condition |
---|---|
204 | Role {id} was deleted. |
404 | Role {id} does not exist. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | object (JSON) | empty response |
DELETE /role/{id}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 204 No Content
Content-Type: application/json
...
Get existing role
name | type | description |
---|---|---|
id | path | role ID |
code | condition |
---|---|
200 | Role {id} exists. |
404 | Role {id} does not exist. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | RoleResponse (JSON) | response containing the role |
GET /role/{id}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"role" : {
"id" : 12345,
"name" : {
"property1" : "...",
"property2" : "..."
},
"description" : {
"property1" : "...",
"property2" : "..."
}
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Update a role
name | type | description |
---|---|---|
id | path | role ID |
media type | data type | description |
---|---|---|
application/json | RoleModel (JSON) | updated role data |
code | condition |
---|---|
200 | Role {id} was updated. |
404 | Role {id} does not exist. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | RoleResponse (JSON) | response containing the updated role |
POST /role/{id}
Content-Type: application/json
Accept: application/json
{
"id" : 12345,
"name" : {
"property1" : "...",
"property2" : "..."
},
"description" : {
"property1" : "...",
"property2" : "..."
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"role" : {
"id" : 12345,
"name" : {
"property1" : "...",
"property2" : "..."
},
"description" : {
"property1" : "...",
"property2" : "..."
}
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Get role permissions
name | type | description |
---|---|---|
id | path | role ID |
code | condition |
---|---|
200 | Role {id} exists. |
404 | Role {id} does not exist. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | RolePermResponse (JSON) | role permissions |
GET /role/{id}/perm
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"perm" : {
"page" : {
"viewpage" : true,
"createpage" : true,
"updatepage" : true,
"deletepage" : true,
"publishpage" : true,
"translatepage" : true
},
"pageLanguages" : {
"property1" : {
"viewpage" : true,
"createpage" : true,
"updatepage" : true,
"deletepage" : true,
"publishpage" : true,
"translatepage" : true
},
"property2" : {
"viewpage" : true,
"createpage" : true,
"updatepage" : true,
"deletepage" : true,
"publishpage" : true,
"translatepage" : true
}
},
"file" : {
"viewfile" : true,
"createfile" : true,
"updatefile" : true,
"deletefile" : true
}
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Update role permissions
name | type | description |
---|---|---|
id | path | role ID |
media type | data type | description |
---|---|---|
application/json | RolePermissionsModel (JSON) | permissions |
code | condition |
---|---|
200 | Role {id} permissions were updated. |
404 | Role {id} does not exist. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
media type | data type | description |
---|---|---|
application/json | RolePermResponse (JSON) | updated permissions |
POST /role/{id}/perm
Content-Type: application/json
Accept: application/json
{
"page" : {
"viewpage" : true,
"createpage" : true,
"updatepage" : true,
"deletepage" : true,
"publishpage" : true,
"translatepage" : true
},
"pageLanguages" : {
"property1" : {
"viewpage" : true,
"createpage" : true,
"updatepage" : true,
"deletepage" : true,
"publishpage" : true,
"translatepage" : true
},
"property2" : {
"viewpage" : true,
"createpage" : true,
"updatepage" : true,
"deletepage" : true,
"publishpage" : true,
"translatepage" : true
}
},
"file" : {
"viewfile" : true,
"createfile" : true,
"updatefile" : true,
"deletefile" : true
}
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"perm" : {
"page" : {
"viewpage" : true,
"createpage" : true,
"updatepage" : true,
"deletepage" : true,
"publishpage" : true,
"translatepage" : true
},
"pageLanguages" : {
"property1" : {
"viewpage" : true,
"createpage" : true,
"updatepage" : true,
"deletepage" : true,
"publishpage" : true,
"translatepage" : true
},
"property2" : {
"viewpage" : true,
"createpage" : true,
"updatepage" : true,
"deletepage" : true,
"publishpage" : true,
"translatepage" : true
}
},
"file" : {
"viewfile" : true,
"createfile" : true,
"updatefile" : true,
"deletefile" : true
}
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}