User Admin
GET
Users retrieved successfully
Invalid search term
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"
}
]
}
]
User retrieved successfully
Invalid user ID
User not found
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
Indicates if deleted users should be included
false
Global search term
search term
Field to sort by
createdAt
Order to sort by
ASC
Possible values: Users retrieved successfully
Invalid search parameters
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"
}
]
}
]
}
Photo uploaded successfully
formatted_file_name.jpg
Invalid file
POST /users/upload-photo HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"photo": "binary"
}
formatted_file_name.jpg
PATCH
[1,2,3]
Users archived successfully
{"message":"Users archived successfully","description":"The users have been archived successfully."}
One or more users not found
Access denied
Internal server error
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."
}
[1,2,3]
Users restored successfully
{"message":"Users restored successfully","description":"The users have been restored successfully."}
One or more users not found
Access denied
Internal server error
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."
}
Tour completion status toggled successfully
{"message":"Tour completion status toggled successfully","description":"The tour completion status has been toggled successfully."}
User not found
Internal server error
PATCH /users/tour HTTP/1.1
Host:
Accept: */*
{
"message": "Tour completion status toggled successfully",
"description": "The tour completion status has been toggled successfully."
}
PUT
1
[1,2,3]
User updated successfully
{"message":"User updated successfully","description":"The user has been updated successfully."}
Invalid user data
User not found
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."
}
John
Doe
john.doe@example.com
photo.jpg
123-456-7890
true
Profile updated successfully
{"message":"Profile updated successfully","description":"The profile has been updated successfully."}
User not found
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
[1,2,3]
Users deleted successfully
{"message":"Users deleted successfully","description":"The users have been deleted successfully."}
One or more users not found
Access denied
Internal server error
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."
}
Photo deleted successfully
{"message":"Photo deleted successfully","description":"The photo has been deleted successfully."}
Photo not found
Internal server error
DELETE /users/delete-photo/{fileName} HTTP/1.1
Host:
Accept: */*
{
"message": "Photo deleted successfully",
"description": "The photo has been deleted successfully."
}
Last updated