Tenants - Create
- 22 Dec 2023
- 1 Minute to read
- Print
- DarkLight
Tenants - Create
- Updated on 22 Dec 2023
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
By default, each new user to the Cogniac system has a single tenant created for them. Users have the option to create additional tenants if they wish.
Create a Tenant
To create a tenant, an authorized user should pass the following fields to the /1/tenants
endpoint.
Name | Example | Description |
---|---|---|
name | "Cogniac Demo" | (required) Brief name, usually including your company name |
description | "Example Cogniac Tenant" | (optional) More descriptive note about your Tenant/focus |
POST /1/tenants
Host: https://api.cogniac.io
Example: Create a Tenant
import requests
import json
from pprint import pprint
url_prefix = 'https://api.cogniac.io'
api_version = "1"
token = '' # add your token here
headers = {'Authorization': f'Bearer {token}',
'Content-Type': 'application/json'}
user_data = {
"name": "Cogniac Demo",
"description": "Example Cogniac Tenant"
}
url = f'{url_prefix}/{api_version}/tenants'
res = requests.post(url, json=user_data, headers=headers)
if res.status_code == 200:
response_data = json.loads(res.content)
pprint(response_data)
else:
print(f"Error: {res.status_code}, {res.text},{res.headers}")
For instructions on obtaining an authorization token, see Authentication.
{
"tenant_id":"63QhzFLc9tg4",
"name":"Cogniac Demo",
"description":"Example Cogniac Tenant",
"created_at":1455044755,
"modified_at":1455044755,
"created_by":"test@cogniac.co"
}
Supported AWS Regions
Cogniac currently supports only us-west-1. Please reach out at support@cogniac.ai if you require hosting in a different region.
Was this article helpful?