Get Tenant
GET
/api/v1/tenants/{tenantID}
const url = 'https://api.spartanauth.com/api/v1/tenants/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.spartanauth.com/api/v1/tenants/exampleReturns catalog metadata for one tenant. Optional ping checks whether the tenant database is reachable. Optional includeStats opens that tenant DB read-only for user/security counts. Only an admin of the platform default sector may call this.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” tenantID
required
string
Query Parameters
Section titled “Query Parameters ” ping
boolean
includeStats
boolean
Responses
Section titled “ Responses ”A successful response.
Media type application/json
object
tenant
object
tenantID
string
slug
string
kid
string
isPlatform
boolean
rootSectorID
string
sectorCount
integer format: int32
subSectorCount
integer format: int32
sectors
Array<object>
object
sectorID
string
slug
string
name
string
isDefault
boolean
reachable
boolean
reachError
string
stats
object
userCount
integer format: int32
pendingInviteCount
integer format: int32
adminCount
integer format: int32
apiTokenCount
integer format: int32
mfaRequired
boolean
selfSignupAllowed
boolean
webauthnConfigured
boolean
Example generated
{ "tenant": { "tenantID": "example", "slug": "example", "kid": "example", "isPlatform": true, "rootSectorID": "example", "sectorCount": 1, "subSectorCount": 1 }, "sectors": [ { "sectorID": "example", "slug": "example", "name": "example", "isDefault": true } ], "reachable": true, "reachError": "example", "stats": { "userCount": 1, "pendingInviteCount": 1, "adminCount": 1, "apiTokenCount": 1, "mfaRequired": true, "selfSignupAllowed": true, "webauthnConfigured": true }}default
Section titled “default ”An unexpected error response.
Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}