| API endpoint | Available from |
|---|---|
| ThoughtSpot Cloud 8.10.0.cl |
| ThoughtSpot Cloud 8.10.0.cl |
| ThoughtSpot Cloud 8.10.0.cl |
| ThoughtSpot Cloud 8.10.0.cl |
| ThoughtSpot Cloud 8.10.0.cl |
REST API v1 - Org API endpoints
|
Important
|
The REST API v1 endpoints are deprecated and replaced with the REST API v2 endpoints. Your existing integrations with REST API v1 endpoints will continue to function without disruption until further notice. ThoughtSpot strongly recommends migrating your integrations to the REST API v2 endpoints. |
The Org API endpoints allow creating and managing multiple tenant-specific containers on a ThoughtSpot instance. Each Org object is independent of and isolated from other Org objects to support data protection and privacy.
Required permissions🔗
To create and manage an Org on a multi-tenant ThoughtSpot instance, you must have Cluster administrator privileges. By default, the administrator of the Primary Org (Org 0) is set as a cluster administrator. To perform CRUD operations on Orgs, the cluster administrator must use the All Org scope in API requests.
Supported operations🔗
Create an Org object🔗
To create an Org object on a ThoughtSpot instance programmatically, send a POST request to the /tspublic/v1/org/ API endpoint.
Resource URL🔗
POST /tspublic/v1/org/
Request parameters🔗
| Parameter | Type | Description | ||
|---|---|---|---|---|
| FormData | String. Name of the Org. The Org name string must be unique. Make sure the name string length does not exceed 48 characters.
| ||
| FormData | String. Description of the Org. Make sure the description text does not exceed 124 characters. | ||
| Query | String. The Org scope. Specify |
Example request🔗
curl -X POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
-d 'name=OrgA&description=This%20org%20is%20for%20A' \
'http://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/org/?orgScope=ALL'
https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/org/
Example response🔗
If the Org object is successfully created in ThoughtSpot, the API returns the Org details in the JSON response:
{
"orgId": 1,
"orgName": "OrgA",
"description": "This org is for A",
"allGroupUserId": "ebff8c6b-3a12-4ec8-86ff-ad1362cfab32",
"defaultAdminUserGroupId": "0e6a2056-ccd9-48bf-a4e3-815d97185cd8",
"active": true,
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"deleted": false,
"created": 1658904338487,
"modified": 1658904338487
}
Response codes🔗
| HTTP status code | Description |
|---|---|
200 | Successful operation |
400 | Name string is not unique |
403 | Unauthorized request |
Edit an Org object🔗
To modify an Org object on a ThoughtSpot instance programmatically, send a PUT request to the /tspublic/v1/org/ API endpoint. This API request allows editing Org object properties on a ThoughtSpot instance.
Resource URL🔗
PUT /tspublic/v1/org/
Request parameters🔗
| Parameter | Type | Description | ||
|---|---|---|---|---|
| FormData | Integer. The ID of the Org object that you want to edit. | ||
| FormData | String. Name of the Org.
| ||
| FormData | String. Optional. Description text associated with the Org. | ||
| FormData | String. Optional. The GUIDs of the groups in the Org specified in the API request. | ||
| Query | String. The Org scope. Specify |
Example request🔗
curl -X PUT \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
-d 'id=5&name=OrgB&description=This%20is%20Org%20B' \
'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/org/?orgScope=ALL'
https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/org/?orgScope=ALL
Example response🔗
If the Org object is successfully modified, the API returns the updated information in the JSON response:
{
"orgId": 5,
"orgName": "OrgB",
"description": "This is Org B",
"allGroupUserId": "ebff8c6b-3a12-4ec8-86ff-ad1362cfab32",
"defaultAdminUserGroupId": "0e6a2056-ccd9-48bf-a4e3-815d97185cd8",
"active": true,
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"deleted": false,
"created": 1658904338487,
"modified": 1658904959065
}
Response codes🔗
| HTTP status code | Description |
|---|---|
200 | Successful operation |
400 | Invalid ID or name |
403 | Unauthorized request |
Get an Org object🔗
To get the details of a specific Org object, send a GET request to the /tspublic/v1/org/ API endpoint. You must specify the Org Id or name in the API request to retrieve the Org details.
Resource URL🔗
GET /tspublic/v1/org/
Request parameters🔗
| Query parameter | Description |
|---|---|
| Integer. The ID of the Org object that you want to edit. |
| String. Name of the Org. |
| String. The Org scope. Specify |
Example request🔗
curl -X GET \
--header 'Accept: application/json' \
'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/org/?orgScope=ALL&id=2'
https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/org/??orgScope=ALL&id=2
Example response🔗
If the GET operation is successful, the API returns the Org details in the JSON response:
{
"orgId": 2,
"orgName": "test-org1",
"description": "",
"allGroupUserId": "02de36d9-8d59-43b5-bcad-aa956638a859",
"defaultAdminUserGroupId": "2fb4b690-ea81-4c6a-a9ad-ecdd773783f4",
"active": true,
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"deleted": false,
"created": 1658822918525,
"modified": 1658822918525
}
Response codes🔗
| HTTP status code | Description |
|---|---|
200 | Successful operation |
400 | Invalid parameter |
403 | Unauthorized request |
Get all Org objects🔗
To get the details of all Org objects on a ThoughtSpot instance, send a POST request to the /tspublic/v1/org/search API endpoint. If you do not specify the id or name of the Org object, the API returns details of all Org objects on the ThoughtSpot instance.
Resource URL🔗
POST /tspublic/v1/org/search
Request parameters🔗
| Parameter | Type | Description |
|---|---|---|
| FormData | Integer. The ID of the Org object that you want to edit. |
| FormData | String. Name of the Org. |
| FormData | Boolean. Allows including or excluding inactive Org objects in the API response. |
| Query | String. The Org scope. Specify |
Example request🔗
curl -X POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
-d 'showinactive=true' \
'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/org/search?orgScope=ALL'
https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/org/search?orgScope=ALL
Example response🔗
If the request is successful, the API returns the org details in the JSON response:
[
{
"orgId": 0,
"orgName": "Master",
"description": "Master Org",
"allGroupUserId": "b25ee394-9d13-49e3-9385-cd97f5b253b4",
"defaultAdminUserGroupId": "d0326b56-ef23-4c8a-8327-a30e99bcc72b",
"active": true,
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"deleted": false,
"created": 1658822907382,
"modified": 1658822907382
},
{
"orgId": 1,
"orgName": "Org A",
"description": "This org is for A",
"allGroupUserId": "7aa17f2d-e15a-4f82-9d91-ea1a5809fcab",
"defaultAdminUserGroupId": "59c3b1c4-947a-4c56-a41d-ae4684d87437",
"active": true,
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"deleted": false,
"created": 1658904526488,
"modified": 1658904526488
},
{
"orgId": 2,
"orgName": "OrgB",
"description": "This is Org B",
"allGroupUserId": "ebff8c6b-3a12-4ec8-86ff-ad1362cfab32",
"defaultAdminUserGroupId": "0e6a2056-ccd9-48bf-a4e3-815d97185cd8",
"active": true,
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"deleted": false,
"created": 1658904338487,
"modified": 1658904959065
},
{
"orgId": 3,
"orgName": "test-org2",
"description": "Test org 2",
"allGroupUserId": "ad6ba0c3-1dcd-49cc-b1af-9aebc1d1b385",
"defaultAdminUserGroupId": "dcf67a1d-5b3a-4606-b80b-96a3f0c12027",
"active": true,
"author": "59481331-ee53-42be-a548-bd87be6ddd4a",
"deleted": false,
"created": 1658835691052,
"modified": 1658835691052
}
]
Response codes🔗
| HTTP status code | Description |
|---|---|
200 | Successful operation |
400 | Invalid parameter |
403 | Unauthorized request |
Delete an Org object🔗
To programmatically delete an Org object, send a DELETE request to the /tspublic/v1/org/ API endpoint. You must specify at least the Org Id or name in the API request to delete the Org object.
|
Note
|
|
Resource URL🔗
DELETE /tspublic/v1/org/
Request parameters🔗
| Parameter | Type | Description |
|---|---|---|
| FormData | Integer. The ID of the Org object that you want to edit. |
| FormData | String. Name of the Org. |
| Query | String. The Org scope. Specify |
Example request🔗
curl -X DELETE \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Accept: application/json' \
-d 'id=5' \
'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/org/?orgScope=ALL'
https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/org/?orgScope=ALL
Example response🔗
If the DELETE operation is successful, the API returns the 204 response code.
Response Code 204
Response codes🔗
| HTTP status code | Description |
|---|---|
200 | Successful operation |
400 | Invalid parameter |
403 | Unauthorized request |