Hit the Try it button to try this API now in our playground. It’s the best way to check the full request and response in one place, customize your parameters, and generate ready-to-use code snippets.
Examples
API Request
TypeScript
Python (Sync)
curl --request GET \
--url 'https://api.usecortex.ai/tenant/stats?tenant_id=tenant_1234&sub_tenant_id=sub_tenant_4567' \
--header 'Authorization: Bearer YOUR_API_KEY'
Retrieve statistics for a specific tenant or sub-tenant to get insights into organizational data including object count, vector dimensions, and tenant information.
Query Parameters
- tenant_id: Required string - Primary organizational identifier (e.g., enterprise client, company) for multi-tenant data isolation
- sub_tenant_id: Optional string - Secondary organizational identifier (e.g., department, team, project) within a tenant for hierarchical data organization; defaults to tenant_id if not provided
Multi-Tenant Context
This API leverages Cortex’s hierarchical tenant system where:
- Tenant Level: Stats for an entire organization (e.g., “acme_corp”)
- Sub-Tenant Level: Stats for specific departments or teams within an organization (e.g., “engineering” within “acme_corp”)
- Data Isolation: All statistics are completely isolated per tenant/sub-tenant combination
Response Details
- object_count: Number of objects/embeddings stored for the tenant
- vector_dimension: Dimension size of the embedding vectors for this tenant
- tenant_id: The name/identifier of the tenant
Use Cases
This API is useful for:
- Monitoring: Track the number of embeddings stored for a tenant or department
- Validation: Verify vector dimensions before uploading new embeddings to ensure compatibility
- Analytics: Generate usage reports and statistics for billing, compliance, or optimization
- Capacity Planning: Understand storage requirements and usage patterns across organizations
- Multi-Tenant Management: Monitor data distribution across enterprise clients and their departments
- Department Insights: Compare usage patterns between different teams within the same organization
Example Scenarios
- Enterprise Dashboard:
tenant_id="acme_corp" to see total company usage
- Department Analytics:
tenant_id="acme_corp", sub_tenant_id="engineering" for team-specific stats
- Client Reporting: Generate individual reports for each enterprise client in your B2B platform
Error Responses
All endpoints return consistent error responses following the standard format. For detailed error information, see our Error Responses documentation.message
string
default:Tenant stats retrieved successfully