Users API
GET /dotnet/api/users
Retrieves a list of all users.
Responses:
200 OK
: Array of User objects.500 Internal Server Error
: Error details.
GET /dotnet/api/users/{id}
Retrieves a specific user by their ID.
Parameters:
- id: integer (path) - The unique identifier of the user.
Responses:
200 OK
: User object.404 Not Found
: User with the specified ID was not found.500 Internal Server Error
: Error details.
POST /dotnet/api/users
Creates a new user.
Request Body:
- UserCreateDto: object - Data for the new user. Requires properties like 'username', 'email', 'password'.
Responses:
201 Created
: The newly created User object.400 Bad Request
: Invalid input data.500 Internal Server Error
: Error details.
PUT /dotnet/api/users/{id}
Updates an existing user by their ID.
Parameters:
- id: integer (path) - The unique identifier of the user to update.
Request Body:
- UserUpdateDto: object - Updated user data.
Responses:
200 OK
: The updated User object.400 Bad Request
: Invalid input data.404 Not Found
: User with the specified ID was not found.500 Internal Server Error
: Error details.
DELETE /dotnet/api/users/{id}
Deletes a user by their ID.
Parameters:
- id: integer (path) - The unique identifier of the user to delete.
Responses:
204 No Content
: User successfully deleted.404 Not Found
: User with the specified ID was not found.500 Internal Server Error
: Error details.