Skip to content

The Realms API lets you discover the multi-tenant realms (identified by 24-hexadecimal strings) that your resources belong to. Use these endpoints to audit which realms your projects, containers, servers, and auth tokens are associated with.

This page covers the List Realms endpoint, which returns a deduplicated list of realm identifiers found across your resources. Requires the resources.realms permission.

GET /api/v1/realms/

Returns all unique realm_id values found in your projects, containers, servers (via pool memberships), and auth tokens. The response is a deduplicated list of 24-hexadecimal realm identifiers that your resources belong to.

Pass include_usage=true to also receive a per-realm count of projects, containers, servers, and auth tokens.

NameInTypeRequiredDescription
include_usagequerybooleanNoInclude resource counts per realm_id (projects, containers, servers, auth_tokens). Adds a usage object to the response data. Default: false

This endpoint accepts no request body.

Terminal window
curl -X GET "https://api.hoody.com/api/v1/realms/?include_usage=true" \
-H "Authorization: Bearer <token>"

200 — Success

{
"statusCode": 200,
"message": "Realm IDs retrieved successfully",
"data": {
"realm_ids": [
"507f1f77bcf86cd799439011",
"507f1f77bcf86cd799439012"
],
"total": 2,
"usage": {
"507f1f77bcf86cd799439011": {
"projects": 2,
"containers": 15,
"servers": 1,
"auth_tokens": 1
},
"507f1f77bcf86cd799439012": {
"projects": 1,
"containers": 8,
"servers": 0,
"auth_tokens": 0
}
}
}
}

The usage object is only present when include_usage=true is passed in the query string.

401 — Unauthorized

{
"statusCode": 401,
"error": "UNAUTHORIZED",
"message": "Authentication required"
}
Error CodeTitleDescriptionResolution
UNAUTHORIZEDAuthentication requiredNo valid authentication credentials providedProvide valid JWT token or auth token in Authorization header

403 — Permission Denied

{
"statusCode": 403,
"error": "PERMISSION_DENIED",
"message": "This token does not have permission: resources.realms"
}
Error CodeTitleDescriptionResolution
PERMISSION_DENIEDPermission deniedAuth token does not have resources.realms permissionRecreate token with full_access template or explicitly add resources.realms: true to token permissions