Retrieve LMS statistics
Get the number of learning tracks assigned to and completed by each employee in a company.
Request
GET https://getrightwork.dev/api/store_info/get_lms_stats
Send your legacy access token in the Authorization: Token <your-access-token> header.
Query parameters
| Parameter | Type | Description |
|---|---|---|
company_name | String | Name of the company (required) |
Python example
import requests
# Use the access_token returned by the legacy login request.
def call_lms_stats_api(company_name, access_token):
url = "https://getrightwork.dev/api/store_info/get_lms_stats"
headers = {
"Authorization": f"Token {access_token}",
"Content-Type": "application/json"
}
params = {
"company_name": company_name
}
response = requests.get(url, headers=headers, params=params)
if response.status_code == 200:
print("Successfully retrieved LMS stats")
return response.json()
else:
raise Exception(f"Failed to retrieve LMS stats: {response.status_code} - {response.text}")
# Example usage:
company_name = "AcmeCorp"
lms_stats = call_lms_stats_api(company_name, access_token)
print(lms_stats)Response
A successful response will return a JSON object with the following fields for each employee:
| Field | Type | Description |
|---|---|---|
store_id | Integer | ID of the store |
store_name | String | Name of the store |
employee_id | Integer | ID of the employee |
first_name | String | First name of the employee |
last_name | String | Last name of the employee |
tracks_assigned | Integer | Number of learning tracks assigned to the user |
tracks_completed | Integer | Number of learning tracks completed by the user |
