Get Tenant Stats
import requests
url = "https://api.hydradb.com/tenants/monitor"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hydradb.com/tenants/monitor', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.hydradb.com/tenants/monitor \
--header 'Authorization: Bearer <token>'{
"tenant_id": "tenant_1234",
"normal_collection": {
"row_count": 1,
"dimensions": 1
},
"memory_collection": {
"row_count": 1,
"dimensions": 1
},
"message": "Successfully retrieved tenant collection statistics"
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}Tenants
Monitor Tenant
Get usage statistics for a tenant – object counts.
GET
/
tenants
/
monitor
Get Tenant Stats
import requests
url = "https://api.hydradb.com/tenants/monitor"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hydradb.com/tenants/monitor', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.hydradb.com/tenants/monitor \
--header 'Authorization: Bearer <token>'{
"tenant_id": "tenant_1234",
"normal_collection": {
"row_count": 1,
"dimensions": 1
},
"memory_collection": {
"row_count": 1,
"dimensions": 1
},
"message": "Successfully retrieved tenant collection statistics"
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}{
"detail": {
"success": true,
"message": "Error occurred",
"error_code": "<string>"
}
}When to use it
- Verify ingestion – confirm data landed after upload (expect
row_countto grow) - Capacity planning – track storage growth over time
- Billing reconciliation – generate usage reports
Endpoint
- Auth: Bearer token
- Idempotency: Read-only
- Async: No
Example
curl 'https://api.hydradb.com/tenants/monitor?tenant_id=my_first_tenant' \
-H "Authorization: Bearer <your_api_key>"
const stats = await client.tenant.monitor({
tenant_id: "my_first_tenant"
});
stats = client.tenant.monitor(tenant_id="my_first_tenant")
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
tenant_id | string | Yes | The tenant to inspect. |
Response
{
"tenant_id": "my_first_tenant",
"normal_collection": {
"row_count": 1243
},
"memory_collection": {
"row_count": 87
},
"message": "Successfully retrieved tenant collection statistics"
}
| Field | Description |
|---|---|
tenant_id | The tenant that was queried. |
normal_collection.row_count | Number of chunks in the knowledge collection. |
memory_collection.row_count | Number of chunks in the memory collection. |
Related endpoints
- Before this: Check infra status – confirm the tenant is provisioned
- Related: List data – browse stored content
Errors
Common codes:400 INVALID_PARAMETERS, 404 TENANT_NOT_FOUND. See Error Responses for the full list.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Unique identifier for the tenant/organization
Example:
"tenant_1234"
Response
Successful Response
Tenant identifier
Example:
"tenant_1234"
Statistics for the normal (context) collection
Show child attributes
Show child attributes
Statistics for the memory collection
Show child attributes
Show child attributes
Summary message
Was this page helpful?
