How to get the list of tenants using REST API?
Authentication
All REST API endpoints are protected using OAuth 2.0. To access this API, you need to get an access token. Please refer to this document to get the access token.
Authorization
Header Name |
Header Value |
Authorization |
Bearer <access_token> |
- Pass the access token generated from the token endpoint in the Authorization header.
List all the Bold BI and Bold Reports tenants available in the application using the following API endpoint.
Note: By default, this API returns the list of 25 tenants. You can get more records (max 100 records at a time) by using the page and page_size URI parameters. For example, refer to the URLs below.
- /v2.0/tenants?page_size=30 returns the first 30 tenants.
/v2.0/tenants?page=2&page_size=30 returns the 2nd group of 30 tenants.
- You will get a response message with the list of tenants' information as follows.
{
"data": [
{
"id": "a4cc8462-31e8-4839-8b34-ec4d27f21c0c",
"tenant_name": "testing",
"url": "http://localhost:49709/bi/site/testing",
"tenant_type": "Embedded BI",
"created_date": "2023-03-14T11:45:20",
"modified_date": "2023-03-14T11:45:24",
"tenant_status": "Active",
"use_site_identifier": true,
"is_master": false,
"client_secret": "lI0GkhiGuvZa1o0aOrg0VaX8Pw7Dmiv4ezcntWFiua68n7JO+pIPwsQlOugCXd1S"
},
{
"id": "9f5ab5ae-aa0a-402e-b5b7-ae173906f10a",
"tenant_name": "production",
"url": "http://localhost:49709/bi/site/productionsite",
"tenant_type": "Embedded BI",
"created_date": "2023-03-14T11:25:35",
"modified_date": "2023-03-14T11:25:39",
"tenant_status": "Active",
"use_site_identifier": true,
"is_master": false,
"client_secret": "lI0GkhiGuvZa1o0aOrg0VaX8Pw7Dmiv4HfVajvPDy7ZMKSLjH3K8ak1d0gjM01uI"
},
{
"id": "22ceeb3a-4dd8-4748-b2a9-9db2a66bf497",
"tenant_name": "Bold BI Enterprise Dashboards",
"url": "http://localhost:49709/bi/site/site1",
"tenant_type": "Embedded BI",
"created_date": "2023-03-14T11:17:07",
"modified_date": "2023-03-14T11:17:31",
"tenant_status": "Active",
"use_site_identifier": true,
"is_master": true,
"client_secret": "lI0GkhiGuvZa1o0aOrg0VaX8Pw7Dmiv4auZvaPUMhpeysa/QaFQYShsldbt0YED+"
}
],
"total_results": 3,
"links": [
{
"link": "http://localhost:49709/api/v2.0/tenants?page=1&page_size=25",
"rel": "first",
"type": "GET"
},
{
"link": "http://localhost:49709/api/v2.0/tenants?page=1&page_size=25",
"rel": "last",
"type": "GET"
}
],
"status_message": null
}
Error Messages
HTTP Status Code | Description | Error Code | Error Message |
401 | Unauthorized | - | - |
500 | Internal Server Error | - | - |