Skip to main content

GET /users

Description

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

This endpoint processes HTTP GET requests sent to the /users URL.

Payload

No payload needs to be sent.

Response

The response includes a JSON 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: