User API
The User APIs enable you to manage user- and group-related operations in the ThoughtSpot system.
You can use the User APIs to manage your users and groups in ThoughtSpot. For example, you may want to view all users and groups in your ThoughtSpot cluster.
Transfer ownership
Use this API to transfer ownership of all objects from one user to another.
You cannot transfer objects to or from the system user or the administrative user. |
Request Parameters
Query Parameter | Data Type | Description |
---|---|---|
|
string |
Username to transfer from. |
|
string |
Username to transfer to. |
Request Example
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'X-Requested-By: ThoughtSpot' 'https://<instance>/callosum/v1/tspublic/v1/user/transfer/ownership?fromUserName=guest&toUserName=guest1'
https://<instance>/callosum/v1/tspublic/v1/user/transfer/ownership?fromUserName=guest&toUserName=guest1
Synchronize principals
Use this API to synchronize ThoughtSpot users and groups with your external database. The payload takes principals containing all users and groups present in the external database and a successful API call returns the object that represents the changes that were made in ThoughtSpot system. This means the following:
-
Objects (users or groups) present in ThoughtSpot, but not present in the external list - will be deleted in ThoughtSpot.
-
Objects present in ThoughtSpot, and present in the external list - will be updated such that the object attributes in ThoughtSpot match those present in the list. This includes group membership.
-
Objects not present in ThoughtSpot, and present in the external list - will be created in ThoughtSpot.
Request Parameters
This API uses multipart/form-data
content type.
Form Parameter | Data Type | Description |
---|---|---|
|
string |
Specifies a list of principal objects. This is ideally a JSON file containing containing all users and groups present in the external database. |
|
boolean |
A flag indicating whether to sync the users and groups to the system, and apply the difference evaluated. Use this parameter to validate a difference before applying changes. |
|
boolean |
A flag indicating whether to remove deleted users/groups. When true, this flag removes any deleted users or groups. |
|
string |
Specifies a password. |
Change password
Use this API to change the password of a user.
Request Parameters
Form Parameter | Data Type | Description |
---|---|---|
|
string |
Name of the user. |
|
string |
The current password of the user. |
|
string |
A new password of the user. |
Request Example
curl -X POST --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' --header 'X-Requested-By: ThoughtSpot' -d 'name=guest¤tpassword=test&password=foobarfoobar' 'https://<instance>/callosum/v1/tspublic/v1/user/updatepassword'
https://<instance>/callosum/v1/tspublic/v1/user/updatepassword
Fetch users and groups
Use this API to get a list of all users, groups, and their inter-dependencies in the form of principal objects. A typical principal object contains the following properties:
Property | Description |
---|---|
|
Name of the principal. This field, in conjunction with whether the object is a user or group, is used to identify a user/group. Consequently, this field is required to be unique (unique for users and groups separately. i.e., you can have user “x” and group “x”). |
|
Display name of the principal. |
|
Description of the principal. |
|
Email address of the user. This field should be populated in case of user only. It is ignored in the case of groups. |
|
Type of the user created in the ThoughtSpot system.
|
|
Password of the user. This field should be populated in case of user only. It is ignored in the case of groups. Password is only required:
In subsequent update, the user password is not updated even if it changes in the source system. |
|
Group names that a principal belongs to. Groups and users can belong to other groups. |
Request Example
curl -X GET --header 'Accept: application/json' 'https://<instance>/callosum/v1/tspublic/v1/user/list'
https://<instance>/callosum/v1/tspublic/v1/user/list
Response Example
[ { "name": "Administrator", "displayName": "Administration Group", "created": 1354006445722, "modified": 1354006445987, "principalTypeEnum": "LOCAL_GROUP", "groupNames": [], "visibility": "DEFAULT" }, { "name": "Analyst", "displayName": "Analyst Group", "created": 1354006445722, "modified": 1354006445987, "principalTypeEnum": "LOCAL_GROUP", "groupNames": [], "visibility": "DEFAULT" }, { "name": "rls-group-3", "displayName": "rls-group-3", "description": "Contains directly rls-group-1, rls-group-2 and belongs direclty to rls-group-5", "created": 1459376495060, "modified": 1459376590681, "principalTypeEnum": "LOCAL_GROUP", "groupNames": ["rls-group-5"], "visibility": "DEFAULT" } ]