Skip to main content

GET /users

Description

Gets data on all users and returns a json object with an array of users objects

The route handles the HTTP GET request made to the /users path.

Payload

No payload is required.

Response

The route returns a json object with an array of objects with users data.

Example:

[
{
"id": 1,
"label": "Jhon",
"avatar": "https://serv.com/images/jhon.png"
},
{
"id": 2,
"label": "Ben",
"avatar": "https://serv.com/images/ben.png"
},
{
"id": 3,
"label": "Alex",
"avatar": "https://serv.com/images/alex.png"
}
]

For another example of the returned object, see cardShape.

The HTTP status code shows whether the request succeeds (response.status == 200) or fails (response.status == 500).


Related articles: