Org API

Org API

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🔗

API endpointAvailable from

POST /tspublic/v1/org/
Creates an Org object.

ThoughtSpot Cloud 8.10.0.cl
ThoughtSpot Software Not available

GET /tspublic/v1/org/
Gets an Org object.

ThoughtSpot Cloud 8.10.0.cl
ThoughtSpot Software Not available

PUT /tspublic/v1/org/
Edits the specified Org object.

ThoughtSpot Cloud 8.10.0.cl
ThoughtSpot Software Not available

POST /tspublic/v1/org/search
Gets all Org objects.

ThoughtSpot Cloud 8.10.0.cl
ThoughtSpot Software Not available

DELETE /tspublic/v1/org/
Deletes an Org object.

ThoughtSpot Cloud 8.10.0.cl
ThoughtSpot Software Not available

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🔗

ParameterTypeDescription

name

FormData

String. Name of the Org. The Org name string must be unique. Make sure the name string length does not exceed 48 characters.

Note

On ThoughtSpot instances running 9.8.0.cl or later release versions, the name string supports only [a-z], [A-Z], [0-9], and [-]. Space and other special characters are not supported.

description

FormData

String. Description of the Org. Make sure the description text does not exceed 124 characters.

orgScope

Query

String. The Org scope. Specify ALL to set the Org scope to all Orgs.

Example request🔗

cURL
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'
Request URL
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 codeDescription

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🔗

ParameterTypeDescription

id

FormData

Integer. The ID of the Org object that you want to edit.
Optional when the name is provided.

name

FormData

String. Name of the Org.
Optional when the id is provided. When both the id and name are provided, then the id is considered and the name against that id is updated.

Note

On ThoughtSpot instances running 9.8.0.cl or later release versions, the name string supports only [a-z], [A-Z], [0-9], and [-]. Space and other special characters are not supported.

description

FormData

String. Optional. Description text associated with the Org.

groupids

FormData

String. Optional. The GUIDs of the groups in the Org specified in the API request.

orgScope

Query

String. The Org scope. Specify ALL to set the Org scope to all Orgs.

Example request🔗

cURL
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'
Request URL
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 codeDescription

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 parameterDescription

id

Integer. The ID of the Org object that you want to edit.

name

String. Name of the Org.

orgScope

String. The Org scope. Specify ALL to set the Org scope to all Orgs.

Example request🔗

cURL
curl -X GET \
--header 'Accept: application/json' \
'https://{ThoughtSpot-Host}/callosum/v1/tspublic/v1/org/?orgScope=ALL&id=2'
Request URL
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 codeDescription

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🔗

ParameterTypeDescription

id

FormData

Integer. The ID of the Org object that you want to edit.

name

FormData

String. Name of the Org.

showinactive

FormData

Boolean. Allows including or excluding inactive Org objects in the API response.

orgScope

Query

String. The Org scope. Specify ALL to set the Org scope to all Orgs.

Example request🔗

cURL
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'
Request URL
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 codeDescription

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
  • ThoughtSpot does not allow deleting primary Org (Org 0).

  • When deleted, the Org and its objects will become inaccessible immediately. However, the objects will remain in the internal ThoughtSpot System for seven days from the deletion date.

  • If you want to restore a deleted Org, contact support within seven days.

  • To clean up objects from the Org before deletion or seven days from the deletion date, contact ThoughtSpot Support.

  • If you want to reuse a deleted Org name or other associated object names right after deletion, contact ThoughtSpot Support. They can help you set the data retention period, allowing you to use those names immediately. Note that the complete removal of the deleted Org and associated objects occurs during a scheduled background process, which takes place only after the configured data retention period has passed.

Resource URL🔗

DELETE /tspublic/v1/org/

Request parameters🔗

ParameterTypeDescription

id

FormData

Integer. The ID of the Org object that you want to edit.

name

FormData

String. Name of the Org.

orgScope

Query

String. The Org scope. Specify ALL to set the Org scope to all Orgs.

Example request🔗

cURL
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'
Request URL
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 codeDescription

200

Successful operation

400

Invalid parameter

403

Unauthorized request