Users API (v1)
AppArmor User information can be accessible to consume via a REST API.
Authenticating with the API
All API requests to the Users api must be authenticated with the appropriate Users API key.
The following HTTP Headers are required in order to authenticate.
HTTP Header | Value |
---|---|
Authorization | apikey [APIKEY] |
Return Data Type
All endpoints to the Users API returns a paged JSON response, with the following information
Element | Type | Description |
---|---|---|
pageNumber | int | The current page of the returned data |
pageSize | int | The amount of entries per page |
numberOfPages | int | The amount of pages |
previousPage | string | HTTPS link to the next page of data |
nextPage | string | HTTPS link to the previous page of data |
total | int | The total number of data entries |
data | Object | The returned data |
/api/v1.0/users/list
Return Type: application/json
Returns a paged list of users with the default AppArmor user fields information. No custom user fields are included in the endpoint.
Curl Command
curl -H "Authroization: apikey [APIKEY]"
https://[CLIENT].apparmor.com/api/v1.0/users/list
Query String parameters
Parameter | Required | Default | Type | Description |
---|---|---|---|---|
pagenumber | N | 1 | int | The current page number of the paged data. |
pagesize | N | 10 | int | The number of results present per page. Minimum: 10 Maximum: 1000 |
fields | N |
| String | The fields that will be included in the response. Only one option for now, fields=devices which will include the associated devices with the user information |
filter | N |
| String | A filter applied to a specific user field. Multiple filters are allowed. Allowed filters:
|
Example URL
https://[CLIENT].apparmor.com/api/v1.0/users/list?pagenumber=2&pagesize=100&fields=devices&filter[name]=test&filter[email]=@apparmor.com
Returns
An AppArmor User is defined as follows
Element | Type | Description |
---|---|---|
userid | string | An identifer for the user |
string | The user's email address | |
name | string | The user's full name |
firstname | string | The user's first name |
lastname | string | The user's last name |
phone | string | The user’s phone number |
ssoid | string | The user’s Single Sign On Identifier |
devices | Array of Devices | The users associated Devices |
/api/v1.0/users/devices
Return Type: application/json
Returns a paged list of users with the default AppArmor Device fields information.
Curl Command
curl -H "Authroization: apikey [APIKEY]"
https://[CLIENT].apparmor.com/api/v1.0/users/devices
Query String parameters
Parameter | Required | Default | Type | Description |
---|---|---|---|---|
pagenumber | N | 1 | int | The current page number of the paged data. |
pagesize | N | 10 | int | The number of results present per page. Minimum: 10 Maximum: 1000 |
filter | N |
| String | A filter applied to a specific user field. Multiple filters are allowed. Allowed filters:
|
Example URL
Returns
Element | Type | Description |
---|---|---|
userid | string | An identifer for the user whom is associated with this device |
token | string | The push token of the device |
deviceid | string | The unique identifier for the device |
manufacturer | string | The manufacturer of the device |
model | string | The model of the device |
os | string | The user’s Single Sign On Identifier |
location | DeviceLocation | The last know location information of the device (if available) |