Get Organization Usage
organizations.get_usage(strorganization_id, OrganizationGetUsageParams**kwargs) -> UsageAndPlan
GET/api/v1/organizations/{organization_id}/usage
Get Organization Usage
import os
from llama_cloud_admin import LlamaCloudAdmin
client = LlamaCloudAdmin(
api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted
)
usage_and_plan = client.organizations.get_usage(
organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(usage_and_plan.plan){
"plan": {
"limits": {
"allow_pay_as_you_go": true,
"max_concurrent_index_jobs": 0,
"max_concurrent_parse_jobs_other": 0,
"max_concurrent_parse_jobs_premium": 0,
"max_data_sinks": 0,
"max_data_sources": 0,
"max_embedding_models": 0,
"max_extraction_agents": 0,
"max_extraction_jobs": 0,
"max_extraction_runs": 0,
"max_files_per_index": 0,
"max_indexes": 0,
"max_monthly_invoice_total_usd": 0,
"max_organizations": 0,
"max_pages_per_index": 0,
"max_projects": 0,
"max_published_agents": 0,
"max_report_agent_sessions": 0,
"max_users": 0,
"mfa_enabled": true,
"sso_enabled": true,
"subscription_cost_usd": 0,
"max_directories": 0,
"max_directory_files_per_directory": 0,
"max_directory_ingest_files": 0,
"max_directory_sync_plan_actions": 0,
"spending_soft_alerts_usd_cents": [
0
]
},
"name": "enterprise",
"plan_frequency": "ANNUAL",
"id": "id",
"current_billing_period": {
"end_date": "2019-12-27T18:11:19.117Z",
"start_date": "2019-12-27T18:11:19.117Z"
},
"ending_before": "2019-12-27T18:11:19.117Z",
"failure_count": 0,
"is_payment_failed": true,
"recurring_credits": [
{
"credit_amount": 0,
"credit_type": {
"id": "id",
"name": "name"
},
"name": "name",
"priority": 0,
"product_id": "product_id",
"rollover_fraction": 0,
"periods_duration": 0
}
],
"starting_on": "2019-12-27T18:11:19.117Z"
},
"usage": {
"active_alerts": [
"configured_spend_limit_exceeded"
],
"active_free_credits_usage": [
{
"expires_at": "2019-12-27T18:11:19.117Z",
"grant_name": "grant_name",
"remaining_balance": 0,
"starting_balance": 0
}
],
"current_invoice_total_usd_cents": 0,
"total_extraction_agents": 0,
"total_indexed_pages": 0,
"total_indexes": 0,
"total_users": 0
}
}Returns Examples
{
"plan": {
"limits": {
"allow_pay_as_you_go": true,
"max_concurrent_index_jobs": 0,
"max_concurrent_parse_jobs_other": 0,
"max_concurrent_parse_jobs_premium": 0,
"max_data_sinks": 0,
"max_data_sources": 0,
"max_embedding_models": 0,
"max_extraction_agents": 0,
"max_extraction_jobs": 0,
"max_extraction_runs": 0,
"max_files_per_index": 0,
"max_indexes": 0,
"max_monthly_invoice_total_usd": 0,
"max_organizations": 0,
"max_pages_per_index": 0,
"max_projects": 0,
"max_published_agents": 0,
"max_report_agent_sessions": 0,
"max_users": 0,
"mfa_enabled": true,
"sso_enabled": true,
"subscription_cost_usd": 0,
"max_directories": 0,
"max_directory_files_per_directory": 0,
"max_directory_ingest_files": 0,
"max_directory_sync_plan_actions": 0,
"spending_soft_alerts_usd_cents": [
0
]
},
"name": "enterprise",
"plan_frequency": "ANNUAL",
"id": "id",
"current_billing_period": {
"end_date": "2019-12-27T18:11:19.117Z",
"start_date": "2019-12-27T18:11:19.117Z"
},
"ending_before": "2019-12-27T18:11:19.117Z",
"failure_count": 0,
"is_payment_failed": true,
"recurring_credits": [
{
"credit_amount": 0,
"credit_type": {
"id": "id",
"name": "name"
},
"name": "name",
"priority": 0,
"product_id": "product_id",
"rollover_fraction": 0,
"periods_duration": 0
}
],
"starting_on": "2019-12-27T18:11:19.117Z"
},
"usage": {
"active_alerts": [
"configured_spend_limit_exceeded"
],
"active_free_credits_usage": [
{
"expires_at": "2019-12-27T18:11:19.117Z",
"grant_name": "grant_name",
"remaining_balance": 0,
"starting_balance": 0
}
],
"current_invoice_total_usd_cents": 0,
"total_extraction_agents": 0,
"total_indexed_pages": 0,
"total_indexes": 0,
"total_users": 0
}
}