Skip to main content

GET /users

Description

Retrieves data for all users and returns a JSON object containing an array of user objects.

This route processes an HTTP GET request sent to the /users endpoint.

Payload

No payload is necessary.

Response

The response includes a JSON object with an array of user data objects.

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 indicates whether the request was successful (response.status == 200) or encountered an error (response.status == 500).


Related articles: