Users

API Endpoints to access Users

List Roles

  • Endpoint: GET /roles/

  • Description: Retrieves a list of available roles.

  • Response: 200 OK Returns a JSON array containing role objects.

List Teams

  • Endpoint: GET /teams/

  • Description: Retrieves a list of available teams.

  • Response: 200 OK Returns a JSON array containing team objects.

List Users

  • Endpoint: GET /users

  • Description: Provides a list of users along with their associated details. The endpoint supports filtering users by their ID or email address.

  • Query Parameters:

    • id (integer, optional): The unique identifier of the user.

    • email (string, optional): The email address of the user.

  • Response: 200 OK Returns a JSON object representing the user details.

Create User

  • Endpoint: POST /users

  • Description: Creates a new user.

  • Request Body:

    • firstName (string, required): The first name of the user.

    • lastName (string, required): The last name of the user.

    • email (string, required): The email address of the user.

    • phone (string, optional): The phone number of the user.

    • roles (array, required): An array of roles assigned to the user.

  • Response: 201 CREATED Returns a JSON object indicating the status of user creation.

Last updated