ibl-data-manager (3.59.0-ai-plus)
API for iblai
Request
Retrieve daily user engagement metrics with mentors.
This endpoint returns data on the number of unique users who interact with mentors each day within a specified date range.
Args: request: The HTTP request containing filter query parameters. org: Organization key identifier.
Returns: Response: Daily time series of unique user 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.
- Mock server
https://docs.ibl.ai/_mock/apis/ibl/api/ai-analytics/orgs/{org}/users/{user_id}/usage-summary/
https://base.manager.iblai.app/api/ai-analytics/orgs/{org}/users/{user_id}/usage-summary/
- 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}/usage-summary/?end_date=string&group_by=day&start_date=string' \
-H 'Authorization: YOUR_API_KEY_HERE'
[ [ { … }, { … }, { … } ] ]
Request
Retrieve user cohort trends over time.
This endpoint returns data on the distribution of new versus veteran users over time, with options for different time aggregations and filtering by mentor. New users are those who registered within the specified date range, while veteran users are those who registered before the date range but were active during it.
Args: request: The HTTP request containing filter query parameters. org: Organization key identifier.
Returns: Response: Time series of new and veteran user 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. aggregation (str): Time aggregation level (hourly, daily, weekly) - default: daily. mentor_id (str): Filter by mentor unique ID.
- Mock server
https://docs.ibl.ai/_mock/apis/ibl/api/ai-analytics/orgs/{org}/users/{user_id}/user-cohorts-over-time/
https://base.manager.iblai.app/api/ai-analytics/orgs/{org}/users/{user_id}/user-cohorts-over-time/
- 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-cohorts-over-time/?aggregation=daily&end_date=string&mentor_id=string&start_date=string' \
-H 'Authorization: YOUR_API_KEY_HERE'
{ "periods": [ "2023-06-01T00:00:00Z", "2023-06-02T00:00:00Z", "2023-06-03T00:00:00Z" ], "new_users": [ 8, 12, 5 ], "veteran_users": [ 42, 38, 45 ] }
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 }