API token
We provide an API token management system in the admin console where admins can create and manage API tokens. These tokens can then be integrated into any external application to initiate a subscription job, refresh a semantic data input model, or both. This way, any authorized user can start a subscription job or refresh the semantic model with a simple click of a button from an external application without logging in to the admin console or the report.
Let us now see the process of creating an API token.
Create API Token
To create a new API token, click Create API Token in the API token screen.
In the next screen, you can enter the details of the token.
Token name: Enter a name for the token.
Expiry: Set the token's validity to 30/60/90 days, or you can set any custom date within a year.
Description: Enter an optional description of the token.
Permission: You can set either or both of the following permissions: execute a new subscription, and refresh a semantic data input model.
After entering the details, click Generate.
A new token will be generated. Ensure it is copied, as it becomes irretrievable after closing the window.
Now with this token, we can initiate a scheduled subscription and refresh the semantic data input model externally from any application.
Trigger subscriptions from external applications
By integrating the created API token into the required application, you can create an API that triggers the required subscription job. Let us now demonstrate this with the help of the Postman application.
You can choose the required subscription from the subscription list or create a new one. Let us run the subscription shown below using the API token.
We will now trigger the subscription job using Postman.
The report is delivered to the intended recipients as scheduled.
Refresh semantic data input source using API
You can also generate API tokens to sync the semantic data input model included in your report to make the latest data available.
In the API token management screen, check the ‘Refresh Semantic Data Input’ option and generate the token.
This token can create an API that refreshes the semantic data input source used in your report. The following sample report has a single-select data input column and uses a semantic data input model. Instead of a scheduled refresh, the semantic model is set to be refreshed manually by the user when required.
We will now trigger the synchronization of the semantic data input model, as demonstrated below using Postman.
The data is refreshed, which can be verified from the updated report.
Last updated