getUsers
A Graze API GET request that returns a list of all users in the database.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint getUsers
takes the following request arguments:
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | A valid |
| Integer | No | Maximum number of results to return. Default is 1,000. |
Response
Endpoint getUsers
returns the following response:
Successful requests return an array of JSON objects containing the following:
Name | Type | Description |
---|---|---|
JSON Object | JSON | A JSON list of all users, displaying the user ID, teams, full name and username of each user. |
Examples
The following examples demonstrate typical use of endpoint getUsers
:
Request example
Example cURL request to return a maximum of three users:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getUsers" \ --data-urlencode "limit=3"
Response example
Example response returning a maximum of three users:
[ { "uid": 3, "teams": ["Cloud DevOps"], "fullname": "Administrator", "username": "admin" }, { "uid": 6, "teams": ["Network"], "fullname": "Nagios", "username": "Nagios" }, { "uid": 5, "teams": ["Application Support"], "fullname": "Webhook", "username": "Webhook" } ]