User Admin
GET
Responses
200
Users retrieved successfully
application/json
400
Invalid search term
application/json
get
GET /users/search HTTP/1.1
Host:
Accept: */*
[
{
"id": 1,
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe",
"status": "active",
"roles": [
{
"id": 1,
"name": "Admin"
}
]
}
]
Path parameters
idstringRequired
Responses
200
User retrieved successfully
application/json
400
Invalid user ID
application/json
404
User not found
application/json
get
GET /users/{id} HTTP/1.1
Host:
Accept: */*
{
"id": 1,
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe",
"status": "active",
"roles": [
{
"id": 1,
"name": "Admin"
}
]
}
POST
Body
isDeletedbooleanRequiredExample:
Indicates if deleted users should be included
false
globalSearchstring | nullableRequiredExample:
Global search term
search term
sortFieldstring | nullableRequiredExample:
Field to sort by
createdAt
sortOrderstring · enum | nullableRequiredExample:
Order to sort by
ASC
Possible values: Responses
200
Users retrieved successfully
application/json
400
Invalid search parameters
application/json
post
POST /users HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 135
{
"isDeleted": false,
"globalSearch": "search term",
"status": [
"Active"
],
"roles": [
"Admin",
"User"
],
"sortField": "createdAt",
"sortOrder": "ASC"
}
{
"count": 10,
"users": [
{
"id": 1,
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe",
"status": "active",
"roles": [
{
"id": 1,
"name": "Admin"
}
]
}
]
}
Body
photostring · binaryOptional
Responses
200
Photo uploaded successfully
application/json
ResponsestringExample:
formatted_file_name.jpg
400
Invalid file
application/json
post
POST /users/upload-photo HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"photo": "binary"
}
formatted_file_name.jpg
PATCH
Body
idsnumber[]RequiredExample:
[1,2,3]
Responses
200
Users archived successfully
application/json
ResponseanyExample:
{"message":"Users archived successfully","description":"The users have been archived successfully."}
400
One or more users not found
application/json
403
Access denied
application/json
500
Internal server error
application/json
patch
PATCH /users/archive HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"ids": [
1,
2,
3
]
}
{
"message": "Users archived successfully",
"description": "The users have been archived successfully."
}
Body
idsnumber[]RequiredExample:
[1,2,3]
Responses
200
Users restored successfully
application/json
ResponseanyExample:
{"message":"Users restored successfully","description":"The users have been restored successfully."}
400
One or more users not found
application/json
403
Access denied
application/json
500
Internal server error
application/json
patch
PATCH /users/restore HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"ids": [
1,
2,
3
]
}
{
"message": "Users restored successfully",
"description": "The users have been restored successfully."
}
Responses
200
Tour completion status toggled successfully
application/json
ResponseanyExample:
{"message":"Tour completion status toggled successfully","description":"The tour completion status has been toggled successfully."}
404
User not found
application/json
500
Internal server error
application/json
patch
PATCH /users/tour HTTP/1.1
Host:
Accept: */*
{
"message": "Tour completion status toggled successfully",
"description": "The tour completion status has been toggled successfully."
}
PUT
Body
idnumberOptionalExample:
1
roleIdsnumber[] | nullableOptionalExample:
[1,2,3]
Responses
200
User updated successfully
application/json
ResponseanyExample:
{"message":"User updated successfully","description":"The user has been updated successfully."}
400
Invalid user data
application/json
404
User not found
application/json
put
PUT /users/update-user HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 26
{
"id": 1,
"roleIds": [
1,
2,
3
]
}
{
"message": "User updated successfully",
"description": "The user has been updated successfully."
}
Body
firstNamestring | nullableRequiredExample:
John
lastNamestring | nullableRequiredExample:
Doe
emailstring | nullableRequiredExample:
john.doe@example.com
photostring | nullableRequiredExample:
photo.jpg
phoneNumberstring | nullableRequiredExample:
123-456-7890
impersonationAllowedboolean | nullableRequiredExample:
true
Responses
200
Profile updated successfully
application/json
ResponseanyExample:
{"message":"Profile updated successfully","description":"The profile has been updated successfully."}
400
User not found
application/json
put
PUT /users/update-profile HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 145
{
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"photo": "photo.jpg",
"phoneNumber": "123-456-7890",
"impersonationAllowed": true
}
{
"message": "Profile updated successfully",
"description": "The profile has been updated successfully."
}
DELETE
Body
idsnumber[]RequiredExample:
[1,2,3]
Responses
200
Users deleted successfully
application/json
ResponseanyExample:
{"message":"Users deleted successfully","description":"The users have been deleted successfully."}
400
One or more users not found
application/json
403
Access denied
application/json
500
Internal server error
application/json
delete
DELETE /users HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"ids": [
1,
2,
3
]
}
{
"message": "Users deleted successfully",
"description": "The users have been deleted successfully."
}
Path parameters
fileNamestringRequired
Responses
200
Photo deleted successfully
application/json
ResponseanyExample:
{"message":"Photo deleted successfully","description":"The photo has been deleted successfully."}
404
Photo not found
application/json
500
Internal server error
application/json
delete
DELETE /users/delete-photo/{fileName} HTTP/1.1
Host:
Accept: */*
{
"message": "Photo deleted successfully",
"description": "The photo has been deleted successfully."
}
Last updated