- 
                Notifications
    
You must be signed in to change notification settings  - Fork 10
 
REST: Environment access restrictions
        bugzmanov edited this page Aug 14, 2012 
        ·
        2 revisions
      
    System property genesis.system.security.environment.restriction.enabled must be set to true (app restart required).
User must have project admin role (or be a system admin)
Path: /rest/projects/(projectId)/envs/(envId)/access
Type: GET
Response 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:
Response:
  {
    "users": ["ninja"],
    "groups": ["some group"]
  }Path: /rest/projects/(projectId)/envs/(envId)/access
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:
{
    "serviceErrors":{},
    "variablesErrors":{},
    "compoundServiceErrors":[],
    "compoundVariablesErrors":[],
    "isSuccess":true,
    "isNotFound":false
}