ibl-data-manager (3.59.0-ai-plus)
API for iblai
Request
Retrieve LLM usage costs for a specific user.
This endpoint returns data on the total cost of LLM usage for a specific user within a specified date range. The cost is calculated by summing the costs of all observations associated with traces from the tenant's sessions.
Args: request: The HTTP request containing filter query parameters. org: Organization key identifier. user_id: User key identifier.
Returns: Response: Total LLM usage cost for the specified tenant.
Raises: NotFound: If the specified organization does not exist. BadRequest: If the provided parameters are invalid.
Query Parameters: start_date (str): Start date for filtering (YYYY-MM-DD) - required. end_date (str): End date for filtering (YYYY-MM-DD) - required.
- Mock server
https://docs.ibl.ai/_mock/apis/ibl/api/ai-analytics/orgs/{org}/users/{user_id}/user-cost/
https://base.manager.iblai.app/api/ai-analytics/orgs/{org}/users/{user_id}/user-cost/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.ibl.ai/_mock/apis/ibl/api/ai-analytics/orgs/{org}/users/{user_id}/user-cost/?end_date=2019-08-24T14%3A15%3A22Z&start_date=2019-08-24T14%3A15%3A22Z&username=string' \
-H 'Authorization: YOUR_API_KEY_HERE'
{ "total_cost": 5.75 }
Request
Retrieve aggregated user chat feedback counts.
This endpoint returns data on the number of user chat feedback entries within a specified date range, with options for different time aggregations (hourly, daily, weekly). Results can be filtered by mentor.
Args: request: The HTTP request containing filter query parameters. org: Organization key identifier.
Returns: Response: Time series data of feedback counts.
Raises: NotFound: If the specified organization does not exist. BadRequest: If the provided parameters are invalid.
Query Parameters: start_date (str): Start date for filtering (YYYY-MM-DD) - required. end_date (str): End date for filtering (YYYY-MM-DD) - required. mentor_id (str): Filter by mentor unique ID. aggregation (str): Time aggregation level (hourly, daily, weekly) - default: daily.
- Mock server
https://docs.ibl.ai/_mock/apis/ibl/api/ai-analytics/orgs/{org}/users/{user_id}/user-feedback/
https://base.manager.iblai.app/api/ai-analytics/orgs/{org}/users/{user_id}/user-feedback/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.ibl.ai/_mock/apis/ibl/api/ai-analytics/orgs/{org}/users/{user_id}/user-feedback/?aggregation=daily&end_date=string&mentor_id=string&start_date=string' \
-H 'Authorization: YOUR_API_KEY_HERE'
[ [ { … }, { … }, { … } ] ]
Request
Retrieve comprehensive user metrics.
This endpoint returns data on various user metrics with month-over-month change calculations:
- Registered users: Total users registered on the platform
- New users: Users who joined in the current month
- Unique users: Distinct users who have had sessions
- Veteran users: Users who have been active for at least 6 months
Results can be filtered by mentor.
Args: request: The HTTP request containing filter query parameters. org: Organization key identifier.
Returns: Response: Comprehensive user metrics with month-over-month changes.
Raises: NotFound: If the specified organization does not exist.
Query Parameters: mentor_id (str): Filter metrics by mentor unique ID.
- Mock server
https://docs.ibl.ai/_mock/apis/ibl/api/ai-analytics/orgs/{org}/users/{user_id}/user-metrics/
https://base.manager.iblai.app/api/ai-analytics/orgs/{org}/users/{user_id}/user-metrics/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.ibl.ai/_mock/apis/ibl/api/ai-analytics/orgs/{org}/users/{user_id}/user-metrics/?group_by=day&mentor_id=string' \
-H 'Authorization: YOUR_API_KEY_HERE'
{ "registered_users": { "total": 1250, "change_percentage": 8.75 }, "new_users": { "total": 85, "change_percentage": 12.5 }, "unique_users": { "total": 420, "change_percentage": 5.25 }, "veteran_users": { "total": 335, "change_percentage": 3.8 } }