Get all users

Returns an array of user objects that contains all users that have registered with the service.

Jump to examples

Endpoint

{server_url}/users

Parameters

None

Request headers

Header Value Required
Accept application/json No

Request body

None

Response body

[
    {
        "lastName": "Smith",
        "firstName": "Ferdinand",
        "email": "f.smith@example.com",
        "id": 1
    },
    {
        "lastName": "Jones",
        "firstName": "Jill",
        "email": "j.jones@example.com",
        "id": 2
    }
]

Examples

GET example request

curl -G -H "Accept: application/json" \
    --url "http://localhost:3000/users"

GET example response

[
    {
        "lastName": "Smith",
        "firstName": "Ferdinand",
        "email": "f.smith@example.com",
        "id": 1
    },
    {
        "lastName": "Jones",
        "firstName": "Jill",
        "email": "j.jones@example.com",
        "id": 2
    }
]

Response status

HTTP status value Description
200 Success: Requested data returned successfully
ECONNREFUSED Service is offline. Start, or restart the service and try again.