Skip to main content

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

auth_token

String

Yes

A valid auth_token returned from the authenticate request. Alternatively, basic authenticate headers can be used in place of this parameter. See the authenticate endpoint for more information and usage examples.

limit

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"
    }
  ]