GET
/
tenant
/
stats
cURL
curl --request GET \
  --url https://api.usecortex.ai/tenant/stats \
  --header 'Authorization: Bearer <token>' \
  --header 'accept: <accept>'
{
  "object_count": 9,
  "vector_dimension": 6,
  "tenant_name": "Unlsbghv245109_zwv"
}
Retrieve statistics for a specific tenant. This endpoint provides insights into the tenant’s data including object count, vector dimensions, and tenant information.

Query Parameters

  • tenant_id: Required string - The tenant identifier
  • sub_tenant_id: Optional string - Sub-tenant identifier, if not provided defaults to empty string

Response Details

  • object_count: Number of objects/embeddings stored for the tenant
  • vector_dimension: Dimension size of the embedding vectors for this tenant
  • tenant_name: The name/identifier of the tenant

Sample Request

curl --location 'https://api.usecortex.ai/tenant/stats?tenant_id={TENANT_ID}&sub_tenant_id={SUB_TENANT_ID}' \
  --header 'Authorization: Bearer {API_KEY}' \
  --header 'accept: application/json'

Sample Response

{
  "object_count": 9,
  "vector_dimension": 6,
  "tenant_name": "Unlsbghv245109_zwv"
}

Use Cases

This endpoint is useful for:
  • Monitoring: Track the number of embeddings stored for a tenant
  • Validation: Verify vector dimensions before uploading new embeddings
  • Analytics: Generate usage reports and statistics
  • Capacity Planning: Understand storage requirements and usage patterns

Error Responses

  • 400 Bad Request: Missing or invalid tenant_id parameter
  • 401 Unauthorized: Invalid or missing API key
  • 404 Not Found: Tenant not found or no data available
  • 500 Internal Server Error: Server processing error

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer token (your API key)

accept
string
default:application/json
required

Response content type

Query Parameters

tenant_id
string
required

The tenant identifier

sub_tenant_id
string

Sub-tenant identifier, optional

Response

200
application/json

Tenant statistics retrieved successfully

The response is of type object.