Skip to main content
GET
/
api
/
v1
/
users
Get All Users
curl --request GET \
  --url https://api.example.com/api/v1/users
{
  "200": {},
  "500": {},
  "[]": [
    {
      "id": "<string>",
      "username": "<string>",
      "email": "<string>",
      "firstName": "<string>",
      "lastName": "<string>",
      "role": "<string>",
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "active": true
    }
  ]
}

Endpoint

GET /api/v1/users
Retrieves a list of all registered users in the system.

Request

This endpoint does not require any parameters.

Response

Returns an array of user objects.
[]
array
Array of user objects
id
UUID
Unique identifier for the user.Example: 0f4df2de-fffb-4a24-9891-381ecf4f0f87
username
string
The user’s username.Example: jdoe
email
string
The user’s email address.Example: jdoe@example.com
firstName
string
The user’s first name.Example: John
lastName
string
The user’s last name.Example: Doe
role
string
The user’s role.Example: USER
createdAt
string
ISO 8601 timestamp when the user was created.Example: 2024-01-15T10:30:00
updatedAt
string
ISO 8601 timestamp when the user was last updated.Example: 2024-01-15T10:30:00
active
boolean
Whether the user account is active.Example: true

Status Codes

200
OK
Users retrieved successfully
500
Internal Server Error
An unexpected error occurred

Example Request

curl http://localhost:8080/api/v1/users

Example Response

[
  {
    "id": "0f4df2de-fffb-4a24-9891-381ecf4f0f87",
    "username": "jdoe",
    "email": "jdoe@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "role": "USER",
    "createdAt": "2024-01-15T10:30:00",
    "updatedAt": "2024-01-15T10:30:00",
    "active": true
  }
]

Notes

  • Returns an empty array [] if no users are registered
  • Users are returned in the order they were created
  • Both active and inactive users are included in the response

Build docs developers (and LLMs) love