-
Notifications
You must be signed in to change notification settings - Fork 10
REST: System and project roles management
Path: /rest/roles
Type: GET
Example:
Response:
[ "ROLE_GENESIS_ADMIN", "ROLE_GENESIS" ]
Path: /rest/roles/(roleName)
Type: GET
Example:
Response:
{
"name":"ROLE_GENESIS",
"users":[],
"groups":["asdcasdcas","qqqq","rafael","something"]
}
Path: /rest/roles/(roleName)
Type: PUT
Request body
consists form a single JSON map contains the following entries:
Entry name | Type | Mandatory | Description |
---|---|---|---|
users | List of strings | Y | List of usernames |
groups | List of string | Y | List of group names |
Example:
Request:
{
"users": ["ninja"],
"groups": ["some group"]
}
Response:
{
"isSuccess": true,
"result": {
"nonExistentGroups": [
"group"
],
"nonExistentUsers": [
"username"
]
}
}
Path: /rest/projectRoles
Type: GET
Example:
Response:
[
{"name": "ROLE_GENESIS_PROJECT_ADMIN"},{ "name": "ROLE_GENESIS_PROJECT_USER"}
]
Path: /rest/projects/(projectId)/roles/(roleName)
Type: GET
Path parameters:
Parameter | Type | Description |
---|---|---|
projectId | Number | project id the env belong to |
roleName | String | One of valid project roles (returned by /rest/projectRoles) |
Response body
ExtendedRequestResult json object
Example:
Response:
{
"result":{
"users":[],
"groups":["turtles"]
},
"isSuccess":true
}
Path: /rest/projects/(projectId)/roles/(roleName)
Type: PUT
Path parameters:
Parameter | Type | Description |
---|---|---|
projectId | Number | project id the env belong to |
roleName | String | One of valid project roles (returned by /rest/projectRoles) |
Request body
consists form a single JSON map contains the following entries:
Entry name | Type | Mandatory | Description |
---|---|---|---|
users | List of strings | Y | List of usernames |
groups | List of string | Y | List of group names |
Request body
RequestResult json object
Example:
Request:
{"users":["ninja"],"groups":["some group"]}
Response:
{
"isSuccess": true,
"result": {
"nonExistentGroups": [
"group"
],
"nonExistentUsers": [
"username"
]
}
}
Path: /rest/projects/(projectId)/permissions
Type: GET
Path parameters:
Parameter | Type | Description |
---|---|---|
projectId | Number | project id the env belong to |
Example:
Response body:
["ROLE_GENESIS_PROJECT_ADMIN", "ROLE_GENESIS_PROJECT_USER"]