Skip to main content
GET
/
users
curl --location 'https://api.maytravel.com/users' \
  --header 'Content-Type: application/json'
[
  {
    "id": 1,
    "username": "johndoe",
    "email": "johndoe@example.com",
    "password": "hashed_password",
    "role": "user"
  },
  {
    "id": 2,
    "username": "janedoe",
    "email": "janedoe@example.com",
    "password": "hashed_password",
    "role": "admin"
  }
]

Request

This endpoint does not require any parameters.
curl --location 'https://api.maytravel.com/users' \
  --header 'Content-Type: application/json'

Response

Returns an array of user objects.
id
integer
Unique identifier for the user
username
string
The user’s username
email
string
The user’s email address
password
string
The user’s hashed password
role
string
The user’s role in the system
[
  {
    "id": 1,
    "username": "johndoe",
    "email": "johndoe@example.com",
    "password": "hashed_password",
    "role": "user"
  },
  {
    "id": 2,
    "username": "janedoe",
    "email": "janedoe@example.com",
    "password": "hashed_password",
    "role": "admin"
  }
]

Error Responses

error
string
Error message describing what went wrong

Status Codes

  • 200 - Success: Returns array of users
  • 500 - Server Error: Internal server error occurred

Build docs developers (and LLMs) love