Company User List
An overview of the Company User List endpoint.
Endpoint Description
The "Company User List" endpoint provides a detailed list of all users available to access with your bearer token within the R1 Discover system.
HTTP Method
GET /api/v1/company-user-list/{page}/{limit}/{maxDays?}
Headers
Content-Type:
application/json
- Indicates the format of the request and response bodies.Accept:
application/json
- Specifies that the response should be JSON formatted.Authorization:
Bearer {token}
- A valid Bearer token is necessary for authentication.
URL Parameters
page (integer): Specifies the page number of the results to be displayed. Helps in paginating the result set.
limit (integer): Defines the maximum number of user records to return in a single response. Helps in managing data load and improves performance.
maxDays (integer, optional): Filters the users based on the number of days since their last activity. This is useful for identifying inactive users or recently active users.
Data Dictionary
Response Fields
company_id (integer): The identifier for the company. This confirms the company to which the users are associated.
users (array of objects): An array containing detailed information about each user aligned with the company.
User Object Fields
user_id (integer): The unique identifier for the user within the R1 Discover system. This is used internally to reference the user across the R1 Discover system.
email (string): The email address of the user. This is used for user login and communication purposes.
username (string): The username of the user in the R1 Discover system. This may be used for user identification within the platform.
unique_id (string): The shared ID of the user between R1 Discover and an integration partner.
company_username (string, nullable): The unique username tied to a specific company in R1 Discover, if applicable.
status (string): Indicates whether the user is currently "active" or "inactive" within
location_name (string): The name of the location the user is aligned to within R1 Discover.
Request Examples
curl -X GET "https://api.r1learning.com/api/v1/company-user-list/1/50/10" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"
Response Examples
{
"error": 0,
"message": "",
"page": 1,
"limit": 50,
"data": {
"user_list": [
{
"company_id": 1,
"users": [
{
"user_id": 21,
"email": "[email protected]",
"username": "sampleuser",
"unique_id": null,
"company_username": null,
"status": "active",
"location_name": "R1 Learning Loc #1"
},
{
"user_id": 1177,
"email": "[email protected]",
"username": "expertuser",
"unique_id": null,
"company_username": null,
"status": "active",
"location_name": null
}
]
}
]
}
}
Notes
Ensure that the
Authorization
header contains a valid Bearer token; otherwise, a401 Unauthorized
status will be returned.*Paginate responses to manage data effectively, especially when dealing with large datasets.
Last updated