Tenants - Users

Return specified tenant's users, sorted from A-> Z (based on first name of Users)

Tenant's Users

ArgumentDescription
tenant_id
boolean
(required) The unique identifier of the Tenant object to be retrieved
reverse
boolean
(optional) Results order can be reversed by adding the ?reverse=true parameter
GET /1/tenants/{tenant_id}/users
Host: https://api.cogniac.io

Example: List Tenant's Users

curl -X GET https://api.cogniac.io/1/tenants/current/users \
-H "Authorization: Bearer abcdefg.hijklmnop.qrstuvwxyz"
import requests

my_headers = {"Authorization":"Bearer abcdefg.hijklmnop.qrstuvwxyz"}
resp = requests.get("https://api.cogniac.io/1/tenants/current/users",
                    headers=my_headers)
{
  "data": [
    {
       "tenant_id": "qqkbbkqvio08",
       "name": "Jane Smith",
       "user_id": "2ke2daisdflkj",
       "given_name":"Jane",
       "surname":"Smith",
       "username":"[email protected]",
       "created_by": "[email protected]"
    },
 		{
			//Next User Object ...
   	}
	]
}

Remove User From Tenant

This endpoint will remove a user from a tenant, but will not delete a user's account.

To remove a user from a tenant, the following arguments should be passed:

ArgumentDescription
user_id
string
(required) ID of the user to remove from the tenant.
DELETE /1/tenants/{tenant_id}/users?user_id=fladkjhflkdaj
Host: https://api.cogniac.io

Example: Remove a User from a Tenant

curl -X DELETE https://api.cogniac.io/1/tenants/current/users?user_id=0Wd765esrdtyuijkn \
-H "Authorization: Bearer abcdefg.hijklmnop.qrstuvwxyz"
import requests

my_headers = {"Authorization":"Bearer abcdefg.hijklmnop.qrstuvwxyz"}

user_data = {"user_id": "0Wd765esrdtyuijkn"}
resp = requests.delete("https://api.cogniac.io/1/tenants/current/users",
                       data=user_data,
                       headers=my_headers)
empty 204 for success

Tenant User roles

A user can belong to any of the 3 roles below

  • Tenant Admin
  • Tenant User
  • Tenant Viewer
RoleUser managementApp ManagementFeedbackRead/Write access to tenant data
Create new users, delete, change permissions, invite users, change name, description Add new subjects, change app name, description, type, detection thresholds Media, apps, feedback, subjects, gateways, cameras
Tenant AdminYesYesYesYes
Tenant UserNoOnly if App ManagerYesYes
Tenant ViewerNoNoNoRead-only access