`GET /v1/tenants/{env_id}`
GET/v1/tenants/:env_id
The sanctioned on-demand read for a vertical service to obtain tenant identity (env/org slugs, domains, auth domain) - the data fdx-style consumers need to derive issuer/JWKS/callback hostnames, and the initial snapshot for a vertical that boots after lifecycle events were emitted.
Authorization (three gates, all fail-closed):
- Bearer verify + M2M-only (
token_tp == "m2m") - user/delegated tokens use the user-surface org/env APIs instead. - Shield gate on
sentin8:sys:tenants:read(grantable to workloads only viam2m_grants- the scope lives inPLATFORM_SCOPE_VOCABULARY, never in user role seeds). - Scoped discovery: the caller's service identity is derived from
the verified
client_id→sys.vertical_servicesregistry mapping; the response answers ONLY for envs where the caller's own service is enabled (404 otherwise). A vertical can never enumerate tenants that have not turned it on.
DBX: the caller never touches sys.* tables - this is the owner API.
Handle get tenant snapshot.
VDC-4 tenant-snapshot API (design/sentin8-vertical-data-plane-contract.md §VDC.5).
Request
Responses
- 200
- 401
- 403
- 404
Tenant snapshot + the caller's own service enablement
Missing/invalid token
Missing tenants:read scope or non-M2M token
Env unknown or the caller's service is not enabled there (scoped discovery)