Skip to content

ibl-data-manager (4.84.1-ai-plus)

API for iblai

Download OpenAPI description
Languages
Servers
Mock server
https://docs.ibl.ai/_mock/apis/ibl/
https://base.manager.iblai.app/

ai-account

Operations

ai-analytics

Operations

ai-bot

Operations

ai-finetuning

Operations

ai-index

Operations

ai-marketing

Operations

ai-media

Operations

ai-mentor

Operations

ai-prompt

Operations

analytics

Operations

analytics_financial_details_retrieve

Request

Financial Details Analytics API – paginated cost tables with flexible grouping.

This endpoint returns tabular cost metrics aggregated by the dimension specified via the group_by query parameter. One or more KPI columns can be requested through the comma-separated metrics list while typical filters (date range, provider, platform_key, user, etc.) narrow the dataset. Results are paginated with page / limit.

Required query parameters

  • group_by – provider | llm_model | username | mentor | platform
  • metrics – csv list of KPI names, e.g. total_cost, sessions

Shared optional filters

  • start_date, end_date – ISO yyyy-mm-dd (ignored when all_time=true)
  • platform_key – tenant isolation
  • mentor_unique_id – filter to one mentor
  • username – filter to a learner
  • provider / llm_model – filter to LLM provider / model
  • all_time – true → lifetime totals
  • page (default 1), limit (default 50)

Examples


  1. Cost by provider for the last week
   GET /api/v2/analytics/financial/details?
       group_by=provider&
       metrics=total_cost&
       start_date=2025-01-01&
       end_date=2025-01-07&
       page=1&limit=10
  1. Lifetime cost per user with extra KPIs
    GET /api/v2/analytics/financial/details?
        group_by=username&
        metrics=total_cost,sessions&
        all_time=true&page=1&limit=50
  2. Cost by LLM model with tenant filter
   GET /api/v2/analytics/financial/details?
       group_by=llm_model&
       metrics=total_cost&
       platform_key=web-app&
       start_date=2025-01-01&end_date=2025-01-31

Response structure


{
  "page": 1,
  "limit": 10,
  "total_pages": 1,
  "total_records": 3,
  "rows": [
    {"provider": "openai", "total_cost": "2.50000"},
    {"provider": "anthropic", "total_cost": "1.00000"},
    {"provider": "azure",    "total_cost": "0.50000"}
  ],
  "metrics": [
    {
      "name": "total_cost",
      "unit": "$",
      "description": "Cost for this entity in period"
    }
  ],
  "total_cost": "4.00000"   // optional grand-total when available
}
``
Security
PlatformApiKeyAuthentication
Query
date_filterstringnon-empty
  • today - Today only
  • 7d - Last 7 days
  • 30d - Last 30 days
  • 90d - Last 90 days
  • all_time - All time
  • custom - Custom date range
Default "today"
Enum"today""7d""30d""90d""all_time""custom"
end_datestring(date)
group_bystringnon-emptyrequired

Dimension to group by

  • provider - Group by provider
  • llm_model - Group by LLM model
  • username - Group by username
  • mentor - Group by mentor
  • platform - Group by platform
  • action - Group by actions
Enum"provider""llm_model""username""mentor""platform""action"
limitinteger[ 1 .. 100 ]
Default 20
llm_modelstringnon-empty
mentor_unique_idstring(uuid)
metricsstringnon-empty

Comma-separated list of metrics (e.g. total_cost,sessions, last_active)

Default "total_cost"
pageinteger>= 1
Default 1
platform_keystringnon-empty
providerstringnon-empty
searchstring
start_datestring(date)
usernamestringnon-empty
curl -i -X GET \
  'https://docs.ibl.ai/_mock/apis/ibl/api/analytics/financial/details/?date_filter=today&end_date=2019-08-24&group_by=provider&limit=20&llm_model=string&mentor_unique_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&metrics=total_cost&page=1&platform_key=string&provider=string&search=string&start_date=2019-08-24&username=string' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Bodyapplication/json
pageintegerrequired
limitintegerrequired
total_pagesintegerrequired
total_recordsintegerrequired
rowsany
total_coststring(decimal)^-?\d{0,15}(?:\.\d{0,5})?$
metricsArray of objects(MetricInfo)
Response
application/json
{ "page": 0, "limit": 0, "total_pages": 0, "total_records": 0, "rows": null, "total_cost": "string", "metrics": [ {} ] }

analytics_financial_invoice_retrieve

Request

Flexible Invoice Report API – Billing summary with username and platform filtering.

This endpoint generates invoice reports with flexible filtering options:

  • Platform admins can view their platform's data and filter by username within their platform
  • Super admins can view any combination of username/platform or global summaries

Key Features:

  • Flexible filtering by username and/or platform_key
  • Essential metrics: total cost, sessions, usage period
  • Provider breakdown (OpenAI, Anthropic, etc.)
  • Top mentors/actions by cost
  • Clean, invoice-ready format

Query Parameters:

  • username: Filter by specific username (optional)
  • platform_key: Filter by platform (optional, but required for platform admins)
  • start_date, end_date: billing period (defaults to last 30 days)
  • include_breakdown: show provider/mentor details (default: true)

Permission Logic:

  • Platform admins: Must include platform_key matching their permission scope
  • Super admins: Can use any combination of filters or none (global summary)

Examples:

# Platform admin viewing their platform
GET /api/analytics/financial/invoice?platform_key=web-app

# Platform admin viewing specific user in their platform
GET /api/analytics/financial/invoice?platform_key=web-app&username=john.doe

# Super admin viewing specific user across all platforms
GET /api/analytics/financial/invoice?username=john.doe

# Super admin viewing global summary
GET /api/analytics/financial/invoice

Response Structure:

{
  "entity": {
    "type": "user|platform|global",
    "username": "john.doe",
    "platform_key": "web-app",
    "platform_name": "Web Application",
    "display_name": "John Doe on Web Application"
  },
  "billing_period": {
    "start_date": "2025-01-01",
    "end_date": "2025-01-31",
    "days": 31
  },
  "summary": {
    "total_cost": 245.750,
    "total_sessions": 1250,
    "active_users": 85,
    "cost_per_session": 0.196
  },
  "breakdown": {
    "by_provider": [...],
    "by_mentor": [...],
    "by_action": [...]
  }
}
Security
PlatformApiKeyAuthentication
Query
end_datestring(date)

End date for billing period (defaults to today)

include_breakdownboolean

Whether to include provider and mentor breakdown

Default true
platform_keystring[ 1 .. 255 ] characters

Platform key to filter by (optional, required for platform admins)

start_datestring(date)

Start date for billing period (defaults to 30 days ago)

usernamestring[ 1 .. 255 ] characters

Username to generate invoice for (optional)

curl -i -X GET \
  'https://docs.ibl.ai/_mock/apis/ibl/api/analytics/financial/invoice/?end_date=2019-08-24&include_breakdown=true&platform_key=string&start_date=2019-08-24&username=string' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Bodyapplication/json
entityobject(Entity)required

Entity information for the invoice.

entity.​typestring(EntityTypeEnum)
  • user - user
  • platform - platform
  • global - global
Enum"user""platform""global"
entity.​usernamestring
entity.​platform_keystring
entity.​platform_namestring
entity.​display_namestringrequired
billing_periodobject(BillingPeriod)required

Billing period information.

billing_period.​start_datestring(date)required
billing_period.​end_datestring(date)required
billing_period.​daysintegerrequired
summaryobject(Summary)required

Summary metrics for the invoice.

summary.​total_coststring(decimal)^-?\d{0,9}(?:\.\d{0,3})?$required
summary.​total_sessionsintegerrequired
summary.​active_usersintegerrequired
summary.​cost_per_sessionstring(decimal)^-?\d{0,9}(?:\.\d{0,3})?$required
breakdownobject(Breakdown)

Detailed breakdown of costs.

Response
application/json
{ "entity": { "type": "platform", "platform_key": "web-app", "platform_name": "Web Application", "display_name": "Web Application" }, "billing_period": { "start_date": "2025-01-01", "end_date": "2025-01-31", "days": 31 }, "summary": { "total_cost": "245.750", "total_sessions": 1250, "active_users": 85, "cost_per_session": "0.196" }, "breakdown": { "by_provider": [], "by_mentor": [] } }

analytics_learners_retrieve

Request

Unified API endpoint for learner analytics.

This endpoint provides either:

  1. Cross-platform summary (when only username is provided)
  2. Platform-specific detailed data (when username + platform_key are provided)

Query params:

  • username (required): Username of the learner
  • platform_key (optional): Platform key for platform-specific data
  • page (optional): Page number (default: 1)
  • limit (optional): Records per page (default: 20, max: 100)

Returns:

  • If platform_key provided: Detailed platform metrics
  • If no platform_key: Cross-platform summary with pagination
Security
PlatformApiKeyAuthentication
Query
date_filterstringnon-empty
  • today - Today only
  • 7d - Last 7 days
  • 30d - Last 30 days
  • 90d - Last 90 days
  • all_time - All time
  • custom - Custom date range
Default "today"
Enum"today""7d""30d""90d""all_time""custom"
end_datestring(date)
granularitystringnon-empty
  • day - day
  • hour - hour
  • week - week
  • month - month
Default "hour"
Enum"day""hour""week""month"
limitinteger[ 1 .. 100 ]

Number of records per page (default: 20, max: 100)

Default 20
mentor_unique_idstring(uuid)
overtimeboolean

Include overtime metrics for the user in the platform (default: false)

Default false
pageinteger>= 1

Page number (default: 1)

Default 1
platform_keystringnon-empty

Optional platform key - if provided, returns platform-specific detailed data

start_datestring(date)
usernamestringnon-empty

Username of the learner to get analytics for. Defaults to self if not provided.

curl -i -X GET \
  'https://docs.ibl.ai/_mock/apis/ibl/api/analytics/learners/?date_filter=today&end_date=2019-08-24&granularity=day&limit=20&mentor_unique_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&overtime=false&page=1&platform_key=string&start_date=2019-08-24&username=string' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Bodyapplication/json
userobject(UserInfo)required

Serializer for user information.

user.​user_idintegerrequired
user.​usernamestring or nullrequired
user.​emailstring or null(email)required
user.​namestringrequired
user.​is_activeboolean
Default true
user.​last_activestring(date-time)
user.​date_joinedstring(date-time)
summaryobject(LearnerSummary)required

Serializer for learner summary data across all platforms.

summary.​total_time_spent_secondsintegerrequired

Total time spent across all platforms

resultsArray of objects(LearnerAnalyticsResult)required
results[].​platform_idintegerrequired
results[].​platform_namestringrequired
results[].​platform_keystring or nullrequired
results[].​summaryobject(PlatformSummary)

Serializer for platform summary data (cross-platform view).

results[].​metricsobject(PlatformMetrics)

Serializer for detailed platform metrics (platform-specific view).

results[].​activityobject(ActivityInfo)

Serializer for activity information.

results[].​last_updatedstring(date-time)
results[].​user_idinteger
paginationobject(Pagination)required
pagination.​totalItemsintegerrequired

Total records

pagination.​currentPageintegerrequired

Current Page

pagination.​perPageintegerrequired

Size of data returned per page

pagination.​totalPagesintegerrequired

Amount of pages

overtimeArray of objects(OvertimeDataPoint)

Time spent over time data (when overtime=true)

generated_atstring(date-time)required
Response
application/json
{ "user": { "user_id": 0, "username": "string", "email": "user@example.com", "name": "string", "is_active": true, "last_active": "2019-08-24T14:15:22Z", "date_joined": "2019-08-24T14:15:22Z" }, "summary": { "total_time_spent_seconds": 0 }, "results": [ {} ], "pagination": { "totalItems": 0, "currentPage": 0, "perPage": 0, "totalPages": 0 }, "overtime": [ {} ], "generated_at": "2019-08-24T14:15:22Z" }

career

Operations

catalog

Operations

core

Operations

credentials

Operations

custom-domains

Operations

features

Operations

media

Operations

notifications

Operations

scim

Operations

commerce

Operations

recommendations

Operations

reports

Operations

skills

Operations