Array of strings. Array of metadata objects to publish. Specify the ID and type of metadata in each array. The supported metadata object types are:
-
LIVEBOARD
for Liveboards -
LOGICAL_TABLES
For Models and Tables -
ANSWER
for Answers
The publishing feature simplifies and automates content distribution from the Primary Org to one or several target Orgs in a multi-tenant instance.
For large-scale deployments requiring the same analytics content, with the underlying Table or Connection properties that vary per Org, use variables to parameterize the object properties. This ensures that the same object can be used across all target Orgs, with variable values dynamically adjusted to each Orgβs specific context.
To publish objects programmatically from the Primary Org to one or several target Orgs in a single API call, use the /api/rest/2.0/security/metadata/publish API endpoint.
Ensure that you have administration permissions with access to all Orgs to publish content to Orgs on your instance.
If you are publishing a Liveboard or Answer and the properties of its underlying data source vary per Org, ensure that the underlying data objects are parameterized to use dynamic values for the target Org context.
The publish API allows publishing objects such as Liveboards, Answers, Tables, and Model from the Primary Org to one or several destination Orgs. The API doesnβt support publishing Connections.
To publish an object to one or several Orgs, send a POST
request to the /api/rest/2.0/security/metadata/publish
API endpoint, with the following parameters in the request body.
In your POST
request body, include the following parameters:
Parameter | Description |
---|---|
| Array of strings. Array of metadata objects to publish. Specify the ID and type of metadata in each array. The supported metadata object types are:
|
| Array of strings. Array of Org names or IDs to which you want to publish the object. |
| Boolean. When set to |
curl -X POST \
--url 'https://{ThoughtSpot-Host}/api/rest/2.0/security/metadata/publish' \
-H 'Content-Type: application/json' \
-H 'Authorization: Authorization: Bearer {AUTH_TOKEN}' \
--data-raw '{
"metadata": [
{
"identifier": "c6ce2676-90be-468a-8d92-c22f1255d9dc",
"type": "LIVEBOARD"
}
],
"org_identifiers": [
"MyOrg1",
"MyOrg2",
"MyOrg3"
]
}'
If the API request is successful, ThoughtSpot returns a 204 response indicating that the object has been successfully published to the Orgs specified in the request.
After publishing an object to target Orgs, the administrators with all Orgs access can verify the published object in target Orgs and check the object TML to ensure that the variables are substituted with correct values.
When published, the object and its dependencies will be visible only to administrators of that specific Org. The administrators can share the objects to other users or user groups in their Org.
The published object will be available to users in read-only mode within the target Orgs. While users can interact with the published object, only the original version in the Primary Org is editable. When the object in the Primary Org is updated, the changes are automatically propagated to the published versions in the target Orgs and will be visible to users upon the next reload.
To remove published objects from the target Orgs, send a POST
request to the /api/rest/2.0/security/metadata/unpublish API endpoint, with the following attributes in the request body.
In your POST
request body, include the following parameters:
Parameter | Description |
---|---|
| Array of strings. Array of the published objects to remove from the Orgs. Specify the ID and type of metadata. The supported metadata object types are:
|
| Array of strings. Specify the Orgs from which you want to remove the published object. |
| Boolean. When set to |
| Boolean. Force deletes the published objects from the Orgs specified in the request. If an Org has new content created from the published object, such as an Answer or Liveboard from a Model published from the Primary Org, the API returns an error unless the Exercise caution when using this option, because it may break the association with objects that reference the published object. |
curl -X POST \
--url 'https://{ThoughtSpot-Host}//api/rest/2.0/security/metadata/unpublish' \
-H 'Content-Type: application/json' \
-H 'Authorization: Authorization: Bearer {AUTH_TOKEN}' \
--data-raw '{
"include_dependencies": true,
"metadata": [
{
"identifier": "Sales_Liveboard",
"type": "LIVEBOARD"
}
],
"org_identifiers": [
"MyOrg1",
"MyOrg2"
]
}'
If the API request is successful, ThoughtSpot returns a 204 response code indicating that the published object is removed from the target Orgs.