Get all users in a business

This endpoint retrieves the list of all users linked to a business.

GET /api/v1/businesses/{businessId}/users

If the businessId included in the request is correct, the response will contain an array with the information of all users linked to the business.

Response example

[
    {
        "username": "user1",
        "email": "user1@orquest.com",
        "employeeId": "EMP-001",
        "roles": ["Manager"],
        "nodes": [
            "2102",
            "2101",
            "00000"
        ],
        "lastLogin": "2025-03-20T08:45:00Z",
        "creation": "2023-01-15",
        "createdBy": "user2"
    },
    {
        "username": "user3",
        "email": "user3@orquest.com",
        "roles": [],
        "nodes": [],
        "createdBy": "SYSTEM"
    }
]
Details
  • username. Name of the user.

  • email. Email address linked to the user.

  • employeeId. External identifier of the employee linked to the user, if applicable.

  • roles. List of roles defined for the user, if applicable.

  • nodes. List of external identifiers of the nodes in which the user has visibility. If the external identifier of a node has not been defined in the business, it will not appear in the response.

  • lastLogin. Date and time of the user’s last login in yyyy-MM-ddTHH:mm:ss.SSSZ format.

  • creation. Date on which the user was created in yyyy-MM-dd format.

  • createdBy. Username of the user who created the account.

Considerations

The response will contain the corresponding information for each user: if the user is not linked to an employee or has never logged into the system, those fields will not appear in the response.

If a user belongs to multiple businesses, they will appear in the query for all businesses they are linked to, as long as the user making the request has visibility over them.

The response will only include the roles the user has defined in the business of the request. If a role does not exist in that business, an empty array [] will be returned.

Similarly, only the nodes over which the user has visibility within the business of the request will appear.

Pagination

The response to this request is paginated, so after the first call, a cursor to the next page (next) will appear in the response headers, indicating the URL of the next request. To retrieve the next page of data, a request must be made to that URL with the cursor:

GET /api/v1/businesses/{businessId}/users?cursor=******

This process must be repeated until the response no longer contains the next header, which indicates that pagination has ended and there is no more data to retrieve.

If the cursor is incorrect or has expired, the request will return a 400 Bad Request error.

Only the nodes over which the user has visibility in the business of the request and the roles defined within that business will be returned.