Users - Tenants
This endpoint returns a list of all tenants the user has access to.
For more information on the Tenant object, see Tenants.
GET /1/users/{user_id}/tenants
Host: https://api.cogniac.io
Example: Retrieve a User's Tenants
curl -X GET https://api.cogniac.io/1/users/current/tenants \
-H "Authorization: Bearer abcdefg.hijklmnop.qrstuvwxyz"
import requests
my_headers = {"Authorization": "Bearer abcdefg.hijklmnop.qrstuvwxyz"}
res = requests.get("https://api.cogniac.io/1/users/current/tenants",
headers=my_headers)
{
"tenants": [
{
"tenant_id": "pixdsp63lqc7",
"type": "orgtenant",
"name": "My Private Tenant"
},
{
"tenant_id": "l9xdsp63rsc2",
"type": "orgtenant",
"name": "My Organization Tenant"
}
]
}
Updated over 6 years ago