Tenant APIs
The Tenant Setup page allows users to
- manage tenants
- manage tenants’ modules
- manage tenants’ users and roles
List of APIs
API | Purpose |
---|---|
GET tenant/{tenant_id} | Returns the tenant specified by tenant_id. |
GET tenant/activeTenants | Returns an array of active tenants. |
New in version 3.11.0. |
Returns an array of all tenant groups. |
GET tenant/allTenants | Returns an array of all tenants. |
GET tenant/availableCategory/{type} |
Deprecated since version 2.0.0: superseded by POST role/availableCategory Returns an array of available categories for report/template (type=0) or dashboard (type=1). |
GET tenant/basicInfos | Returns all active tenants with basic info. |
GET tenant/namesOnly | Returns all active tenants with names only. |
GET tenant/tenantGroupsHierarchy New in version 3.11.0. |
Returns an array of all tenant groups and tenants. |
POST tenant | Saves a tenant. |
POST tenant/accessLimits | Lazy load access limit for each tenant. |
POST tenant/active/{tenant_id} | Sets active for the tenant specified by tenant_id. |
POST tenant/deactive/{tenant_id} | Sets inactive for the tenant specified by tenant_id. |
POST tenant/intergration/saveTenant |
Adds or updates external tenant. Note To be renamed to “integration” |
POST tenant/scheduleLimits | Lazy load schedule limit for each tenant. |
DELETE tenant/{tenant_id} | Deletes the tenant specified by tenant_id. |
GET tenant/{tenant_id}
Returns the tenant specified by tenant_id.
Request
No payload
Response
A Tenants object
Samples
GET/api/tenant/e4c784eb-3e41-4849-925c-a9094b73dfb7HTTP/1.1Sample Response :{"tenantID":"acme","name":"ACME Corporation","description":null,"active":true,"modules":"maUqbVKEX7hSyzaUp2nEAdVdmBVmue6S2e72m8XBl/OHx7ysEcRYz7YEjYqMhOnL0jpxXGB7saUIPgZ+58bWkH+ZBadLbo4SqixBr9Dtv+uIrVWFs1JJDdudOyn+nSr+sjPDAbD/BzjU3NGFV9mjBA==","tenantGroups":[],"tenantModules":["Alerting","Report Templates","Report Designer","Form","Scheduling","Charting","Dashboard","Exporting","Maps"],"permission":{"systemAdmin":false,"fullReportAndDashboardAccess":false,"systemConfiguration":{"scheduledInstances":{"value":true,"tenantAccess":1},"tenantAccess":1},"dataSetup":{"dataModel":{"value":true,"customView":{"create":true,"edit":true,"delete":true,"tenantAccess":1},"tenantAccess":1},"advancedSettings":{"category":true,"others":true,"tenantAccess":1},"tenantAccess":1},"userSetup":{"userRoleAssociation":{"value":true,"tenantAccess":1},"actions":{"create":true,"edit":true,"del":true,"configureSecurityOptions":true,"tenantAccess":1},"tenantAccess":1},"roleSetup":{"actions":{"create":true,"edit":true,"del":true,"tenantAccess":1},"dataModelAccess":{"value":true,"tenantAccess":1},"permissions":{"value":true,"tenantAccess":1},"grantRoleWithFullReportAndDashboardAccess":{"value":true,"tenantAccess":1},"tenantAccess":1},"reports":{"canCreateNewReport":{"value":true,"tenantAccess":1},"dataSources":{"simpleDataSources":false,"advancedDataSources":true,"tenantAccess":1},"reportPartTypes":{"chart":true,"form":true,"gauge":true,"map":true,"tenantAccess":1},"reportCategoriesSubcategories":{"canCreateNewCategory":{"value":true,"tenantAccess":1},"categoryAccessibility":{"categories":[],"tenantAccess":1}},"filterProperties":{"filterLogic":true,"crossFiltering":true,"tenantAccess":1},"fieldProperties":{"customURL":true,"embeddedJavaScript":true,"subreport":true,"tenantAccess":1},"actions":{"schedule":true,"email":true,"viewReportHistory":true,"del":true,"registerForAlerts":true,"print":true,"unarchiveReportVersions":true,"overwriteExistingReport":true,"subscribe":true,"exporting":true,"configureAccessRights":true,"tenantAccess":1},"tenantAccess":1},"tenantSetup":{"actions":{"create":false,"edit":false,"del":false,"tenantAccess":1},"permissions":{"value":false,"tenantAccess":1},"tenantAccess":1},"dashboards":{"canCreateNewDashboard":{"value":true,"tenantAccess":1},"dashboardCategoriesSubcategories":{"canCreateNewCategory":{"value":true,"tenantAccess":1},"categoryAccessibility":{"categories":[],"tenantAccess":1}},"actions":{"schedule":true,"email":true,"del":true,"subscribe":true,"print":true,"overwriteExistingDashboard":true,"configureAccessRights":true,"tenantAccess":1},"tenantAccess":1},"access":{"accessLimits":{"value":[{"users":[],"tenantUniqueName":null,"permission":null,"visibleQuerySources":null,"name":"Manager","tenantId":null,"active":false,"notAllowSharing":false,"id":"d256d058-aeb7-468f-9f95-962d65979707","state":0,"deleted":false,"inserted":true,"version":null,"created":null,"createdBy":"$RootAdmin$","modified":null,"modifiedBy":null}],"tenantAccess":1},"accessDefaults":{"value":[],"tenantAccess":1},"tenantAccess":1},"scheduling":{"schedulingLimits":{"value":[{"users":[],"tenantUniqueName":null,"permission":null,"visibleQuerySources":null,"name":"Manager","tenantId":null,"active":false,"notAllowSharing":false,"id":"d256d058-aeb7-468f-9f95-962d65979707","state":0,"deleted":false,"inserted":true,"version":null,"created":null,"createdBy":"$RootAdmin$","modified":null,"modifiedBy":null}],"tenantAccess":1},"schedulingScope":{"systemUsers":true,"externalUsers":true,"tenantAccess":1},"tenantAccess":1},"emailing":{"deliveryMethod":{"link":true,"embeddedHTML":true,"attachment":true,"tenantAccess":1},"attachmentType":{"word":true,"excel":true,"pdf":true,"csv":true,"xml":true,"json":true,"tenantAccess":1},"tenantAccess":1},"exporting":{"exportingFormat":{"word":true,"excel":true,"pdf":true,"csv":true,"xml":true,"json":true,"queryExecution":true,"tenantAccess":1},"tenantAccess":1},"systemwide":{"canSeeSystemMessages":{"value":true,"tenantAccess":1},"tenantAccess":1}},"id":"b5b3a5cc-9e55-424c-ae85-ba92ec3b934e","state":0,"deleted":false,"inserted":true,"version":6,"created":"2017-09-08T07:11:10.857","createdBy":"$RootAdmin$","modified":"2017-09-14T02:30:28.627","modifiedBy":"$RootAdmin$"}
GET tenant/activeTenants
Returns an array of active tenants.
Request
No payload
Response
An array of Tenants objects
Samples
GET/api/tenant/activeTenantsHTTP/1.1Sample response:
[{"tenantID":"acme","name":"ACME Corporation","description":null,"active":true,"modules":null,"permissionData":null,"tenantModules":[],"permission":null,"id":"1658c545-2ee4-4952-98f8-7d4e8b6c4e04","state":0,"deleted":false,"inserted":true,"version":null,"created":null,"createdBy":null,"modified":null,"modifiedBy":null}]
GET tenant/allTenantGroups
Returns an array of all tenant groups.
Request
No payload
Response
An array of TenantGroup objects
Samples
GET/api/tenant/allTenantGroupsHTTP/1.1Sample response:
[{"created":"2020-10-09T13:42:46.0130000+05:00","createdBy":"System Admin","deleted":false,"id":"70ef6c18-adbc-4567-a7b1-556216a8447e","inserted":true,"modified":"2020-10-09T13:42:46.0130000+05:00","modifiedBy":"System Admin","name":"TenantGroup1","state":0,"version":1}]
GET tenant/allTenants
Returns an array of all tenants.
Request
No payload
Response
An array of Tenants objects
Samples
GET/api/tenant/allTenantsHTTP/1.1Sample response:
[{"id":"e4c784eb-3e41-4849-925c-a9094b73dfb7","tenantID":"acme","name":"ACME Corporation","description":null,"active":true,"deleted":false,"modules":"Report Template/ Component; Scheduling","tenantModules":["Report Template/ Component","Scheduling"],"permissionData":null,"permission":null,"state":0,"inserted":true,"version":2,"created""2017-06-15T09:03:04.7770000+07:00","createdBy":"System2 Admin2","modified":"2017-09-05T07:59:14.6970000+07:00","modifiedBy":"System2 Admin2"},{"id":"811e2d3b-c656-46fa-b70e-7fe95bc6529f","tenantID":"doe","name":"John Doe","description":null,"active":true,"deleted":false,"modules":"Report Template/ Component; Scheduling","modified":"2016-05-22T03:26:32.0000000+07:00","tenantModules":["Report Template/ Component","Scheduling"],"permissionData":null,"permission":null,"state":0,"inserted":true,"version":2,"created""2017-06-23T08:07:50.5700000+07:00","createdBy":"$RootAdmin$","modified":"2017-08-16T09:15:59.5400000+07:00","modifiedBy":"$RootAdmin$"}]
GET tenant/availableCategory/{type}
Deprecated since version 2.0.0: superseded by POST role/availableCategory
Returns an array of available categories for report/template (type=0) or dashboard (type=1).
Request
No payload
Response
An array of Category objects
Samples
GET/api/tenant/availableCategory/0HTTP/1.1Sample response:
[{"name":"0 july 19","type":0,"parentId":null,"tenantId":null,"isGlobal":false,"createdById":"9d2f1d51-0e3d-44db-bfc7-da94a7581bfe","canDelete":false,"editable":false,"savable":false,"subCategories":[],"checked":false,"reports":[],"dashboards":null,"numOfChilds":0,"numOfCheckedChilds":0,"indeterminate":false,"status":2,"fullPath":null,"computeNameSettings":null,"isCheck":false,"id":"e6b0d0e1-85f0-4708-bd3e-6ca074de94c8","state":0,"deleted":false,"inserted":true,"version":null,"created":null,"createdBy":null,"modified":null,"modifiedBy":null},{"name":"12062017","type":0,"parentId":null,"tenantId":null,"isGlobal":false,"createdById":"9d2f1d51-0e3d-44db-bfc7-da94a7581bfe","canDelete":false,"editable":false,"savable":false,"subCategories":[],"checked":false,"reports":[],"dashboards":null,"numOfChilds":0,"numOfCheckedChilds":0,"indeterminate":false,"status":2,"fullPath":null,"computeNameSettings":null,"isCheck":false,"id":"f0e8668a-ff01-4d94-8f59-3dab8bf373ff","state":0,"deleted":false,"inserted":true,"version":null,"created":null,"createdBy":null,"modified":null,"modifiedBy":null}]
GET tenant/basicInfos
Returns all active tenants with basic info.
Returns only the current tenant with basic info if logged in user is a tenant user.
Request
No payload
Response
An array of the following objects:
Field Description Note id
string (GUID)The id of the tenant tenantId
stringThe user-selected id of the tenant name
stringThe name of the tenant active
booleanWhether the tenant is active description
stringThe description of the tenant tenantModules
array of stringsAn array of selected module names for the tenant
Samples
GET/api/tenant/basicInfosHTTP/1.1Sample response:
[{"id":"28788c9b-4e0d-464e-b588-ea5bee676bd3","tenantID":"acme","name":"Acme Yo","active":true,"description":null,"tenantModules":["Alerting","Report Templates","Report Designer","Form","Scheduling","Charting","Dashboard","Exporting","Maps"]},{"id":"6d775a01-f6c4-48f2-8678-4f8aa081db49","tenantID":"System","name":"System","active":true,"description":null,"tenantModules":["Alerting","Report Templates","Report Designer","Form","Scheduling","Charting","Exporting","Dashboard","Maps"]}]
GET tenant/namesOnly
Returns all active tenants with names only.
Returns only the current tenant with name only if logged in user is a tenant user.
Request
No payload
Response
An array of the following objects:
Field Description Note id
string (GUID)The id of the tenant tenantId
stringThe user-selected id of the tenant name
stringThe name of the tenant
Samples
GET/api/tenant/namesOnlyHTTP/1.1Sample response:
[{"id":"28788c9b-4e0d-464e-b588-ea5bee676bd3","tenantID":"acme","name":"Acme Yo"},{"id":"6d775a01-f6c4-48f2-8678-4f8aa081db49","tenantID":"System","name":"System"}]
GET tenant/tenantGroupsHierarchy
Returns an array of all tenant groups and tenants.
Request
No payload
Response
An array of TenantGroupHierarchicalData objects
Samples
GET/api/tenant/tenantGroupsHierarchyHTTP/1.1Sample response:
[{"tenantGroupId":"095e50a7-11cf-47cf-a8a0-06125cc3f30b","tenantGroupName":"TenantGroup1","tenantId":"723f9b74-2cd7-4eff-8813-00dc86feea16","tenantName":"Tenant1"},{"tenantGroupId":"00000000-0000-0000-0000-000000000000","tenantGroupName":"","tenantId":"ac8137b2-8d8c-47ca-97a3-357c12c0751d","tenantName":"Tenant2"}]
POST tenant
Creates or updates a tenant.
Request
Payload: a Tenants object
Note:
- The permission property can be null when creating a new tenant, but when updating this property is required
- The version number must increment when updating a tenant
Response
Field Description Note success
booleanShould be true tenant
objectThe saved Tenants object
Samples
POST/api/tenantHTTP/1.1Simple Request payload:
{"tenantID":"doe","name":"DOE","tenantGroups":[],"tenantModules":["Report Template/ Component","Scheduling"]}Request payload with full permission (see Permission object) :{"tenantID":"stark","name":"Stark Industries","description":"Fictional Company","active":true,"tenantGroups":[],"tenantModules":["Alerting","Form","Dashboard","Report Templates","Scheduling","Exporting","Report Designer","Charting","Maps"],"permission":{"fullReportAndDashboardAccess":false,"systemConfiguration":{"scheduledInstances":{"value":true,"tenantAccess":1},"tenantAccess":1},"tenantSetup":{"actions":{"create":false,"edit":false,"del":false,"tenantAccess":1},"permissions":{"value":false,"tenantAccess":1},"tenantAccess":1},"dataSetup":{"dataModel":{"value":true,"tenantAccess":1},"advancedSettings":{"category":true,"others":true,"tenantAccess":1},"tenantAccess":1},"userSetup":{"userRoleAssociation":{"value":true,"tenantAccess":1},"actions":{"create":true,"edit":true,"del":true,"configureSecurityOptions":true,"tenantAccess":1},"tenantAccess":1},"roleSetup":{"actions":{"create":true,"edit":true,"del":true,"tenantAccess":1},"dataModelAccess":{"value":true,"tenantAccess":1},"permissions":{"value":true,"tenantAccess":1},"grantRoleWithFullReportAndDashboardAccess":{"value":true,"tenantAccess":1},"tenantAccess":1},"reports":{"canCreateNewReport":{"value":true,"tenantAccess":1},"dataSources":{"simpleDataSources":false,"advancedDataSources":false,"tenantAccess":1},"reportPartTypes":{"chart":true,"form":true,"gauge":true,"map":true,"tenantAccess":1},"reportCategoriesSubcategories":{"canCreateNewCategory":{"value":true,"tenantAccess":1},"categoryAccessibility":{"categories":[],"tenantAccess":1}},"filterProperties":{"filterLogic":true,"tenantAccess":1},"fieldProperties":{"customURL":true,"embeddedJavaScript":true,"subreport":true,"tenantAccess":1},"actions":{"schedule":true,"email":true,"viewReportHistory":true,"del":true,"registerForAlerts":true,"print":true,"unarchiveReportVersions":true,"overwriteExistingReport":true,"subscribe":true,"exporting":true,"configureAccessRights":true,"tenantAccess":1},"tenantAccess":1},"dashboards":{"canCreateNewDashboard":{"value":true,"tenantAccess":1},"dashboardCategoriesSubcategories":{"canCreateNewCategory":{"value":true,"tenantAccess":1},"categoryAccessibility":{"categories":[],"tenantAccess":1}},"actions":{"schedule":true,"email":true,"del":true,"subscribe":true,"print":true,"overwriteExistingDashboard":true,"configureAccessRights":true,"tenantAccess":1},"tenantAccess":1},"access":{"accessLimits":{"value":[],"tenantAccess":1},"accessDefaults":{"value":[{"assignedType":1,"accessors":[],"tempId":"4","id":null,"reportAccessRightId":"13698ebf-3e8e-43e1-9e2b-ad3f17d7d004","dashboardAccessRightId":"13698ebf-3e8e-43e1-9e2b-ad3f17d7d008"}],"tenantAccess":1},"tenantAccess":1},"scheduling":{"schedulingLimits":{"value":[],"tenantAccess":1},"schedulingScope":{"systemUsers":true,"externalUsers":true,"tenantAccess":1},"tenantAccess":1},"emailing":{"deliveryMethod":{"link":true,"embeddedHTML":true,"attachment":true,"tenantAccess":1},"attachmentType":{"word":true,"excel":true,"pdf":true,"csv":true,"xml":true,"json":true,"tenantAccess":1},"tenantAccess":1},"exporting":{"exportingFormat":{"word":true,"excel":true,"pdf":true,"csv":true,"xml":true,"json":true,"queryExecution":true,"tenantAccess":1},"tenantAccess":1},"systemwide":{"canSeeSystemMessages":{"value":true,"tenantAccess":1},"tenantAccess":1}},"version":2}
POST tenant/accessLimits
Lazy load access Limit data for each role.
Request
A RolePagedRequest objects
Response
A RoleVirtualNode objects
Samples
POSTapi/tenant/accessLimitsHTTP/1.1Request payload:
{"roleId":"db8693f7-3d5a-41d7-a888-8a1dfaad31b4","tenantId":null,"skipItems":1,"pageSize":6,"parentIds":["5329b0cc-37a1-49c7-9271-a870a480db5c"],"criteria":[{"key":"name","value":"Anna"}]}Sample response:
{"isLastPage":false,"name":null,"childNodes":[],"numOfChilds":8,"checked":false,"indeterminate":true,"numOfCheckedChilds":2,"totalItems":223,"level":1,"id":"00000000-0000-0000-0000-000000000000","parentId":null}
POST tenant/active/{tenant_id}
Sets active for the tenant specified by tenant_id.
Request
No payload
Response
An OperationResult object with success field true if the update is successful
Samples
POST/api/tenant/active/e2bae114-11d6-4c29-ab2b-2c3d3f6ba751HTTP/1.1Sample response:
{"success":true,"messages":null,"data":null}
POST tenant/deactive/{tenant_id}
Sets inactive for the tenant specified by tenant_id.
Request
No payload
Response
An OperationResult object with success field true if the update is successful
Samples
POST/api/tenant/deactive/e2bae114-11d6-4c29-ab2b-2c3d3f6ba751HTTP/1.1Sample response:
{"success":true,"messages":null,"data":null}
POST tenant/intergration/saveTenant
Adds or updates external tenant.
Request
Payload: a Tenants object
Note:
- The permission property can be null when creating a new tenant, but when updating this property is required
- The version number must increment when updating a tenant
Response
Should be true
Samples
POST/api/tenant/intergration/saveTenantHTTP/1.1Simple Request payload:
{"tenantID":"Tenant1","name":"Tenant1","description":"abc","active":true,"modules":null,"tenantModules":[],"permission":null,"id":"c1703d12-6f50-454a-82bc-16efc00bbedd","state":0,"deleted":false,"inserted":true,"version":1,"created":"2017-09-11T09:14:39.7","createdBy":"$RootAdmin$","modified":"2017-09-11T09:14:39.7","modifiedBy":"$RootAdmin$"}Response:
true
POST tenant/scheduleLimits
Lazy load schedule limit data for each role.
Request
A RolePagedRequest objects
Response
A RoleVirtualNode objects
Samples
POSTapi/tenant/scheduleLimitsHTTP/1.1Request payload:
{"roleId":"db8693f7-3d5a-41d7-a888-8a1dfaad31b4","tenantId":null,"skipItems":1,"pageSize":6,"parentIds":["5329b0cc-37a1-49c7-9271-a870a480db5c"],"criteria":[{"key":"name","value":"Anna"}]}Sample response:
{"isLastPage":false,"name":null,"childNodes":[],"numOfChilds":8,"checked":false,"indeterminate":true,"numOfCheckedChilds":2,"totalItems":223,"level":1,"id":"00000000-0000-0000-0000-000000000000","parentId":null}
DELETE tenant/{tenant_id}
Deletes the tenant specified by tenant_id.
Request
No payload
Response
An OperationResult object with success field true if the deletion is successful
Samples
DELETE/api/tenant/811e2d3b-c656-46fa-b70e-7fe95bc6529fHTTP/1.1Sample response:
{"success":true,"messages":null,"data":null}