Get users for a specified environment
Purpose - Retrieve users for the environment specified. This query returns all users that have been granted roles (default and custom roles) in an environment.
URL - https://<frontdoor-url>/api/v2/environmentusers/environment/{envId}
Method - GET
JSON parameters:
| Parameter | Description | Required? | Type | Default |
|---|---|---|---|---|
envID |
The universally unique identifier (UUID) of the environment to read.Use
.For
instruction on getting the environment UUID, see Get user environment information. |
Yes | String | |
start |
The index at which to get the next page of results. The default is 0. | Optional | String | 0 |
pageSize |
The number of users to return. | Optional | String | 100 |
roles |
A comma-separated list of role and custom role names.If a user has at least one of the roles
specified in the environment, they will be returned in PageResult. |
Optional | String | |
searchString |
A query string with which to filter environment users by login, full name, or email.Searching by full name and email are limited to the visibility of contact information to the logged-in user. | Optional | String | |
sortBy |
The comma-separated list of sort parameters.Acceptable values are login, customer_name, and environment_name.Denote descending sort with a '-' before the sort parameter. Defaults to login. | Optional | String | login |
Headers - Pass apptio-opentoken header received as a response from the
authentication call.
Required permissions - A logged-in user must have permissions to read that environment. A user can read the environment if they have any role granting them access to that environment. If the user doesn't belong to the authentication domain in that environment, they will not be able to see contact information of users even if they have access to the environment. A full name and email are considered contact information.
Sample request -
curl -X GET n'https://frontdoor.apptio.com/api/v2/environmentusers/environment/d8829rd7-0g5e-5478-b1561-52d955dd5dac9?start=0&pageSize=100&sortBy=login&export=false&hideInactives=false' -H 'Accept: application/json' -H 'apptio-opentoken: 40ffaaa19c936e201b5152573850a3c0016645d4da62d282fea9ccb9177dd070946df38bebd3c4b4ae1e3cd725f05b72'
Return codes:
| HTTP Status Code | Reason |
|---|---|
| 200 | Requested environment users |
| 400 | Invalid data submitted |
| 403 | You don't have the required permissions to perform this operation |
| 404 | Environment not found |