API reference
API tokens
API tokens allow you to connect to Analyst Studio’s API programmatically. Use an API token instead of your email address and account password whenever you programmatically authenticate to Analyst Studio with basic authentication.
To call the API, you must first create an API access token. Currently, Analyst Studio supports two types of access tokens — Workspace API tokens and personal API tokens. As of June 2023, you can only create Workspace API tokens, as this is the more secure and therefore recommended way to provide API access. Any personal tokens that were created prior to June 2023 can continue to be used to authenticate with the API; however, we will be fully deprecating personal API tokens in August 2024.
The Workspace API tokens are meant to be used for programmatic management, such as archiving inactive Reports or deleting schedules for stale Reports across your Workspace. These tokens mimic admin access to the Workspace and only admins will be able to create and manage them.
Creating an API Access token
Remember to store your API token and password securely. Do not expose the password on public sites, in client-side code, or in public code repositories. |
Workspace tokens
Only admins are able to create Workspace tokens. You can create as many API access tokens as you need. To create one, navigate to your
. Click the “gear” icon and select Create new API token. You will be prompted to add a display name and save the token.The credentials are comprised of two parts:
-
Token: The public component of the credential. Often referred to as the username or access key during authentication.
-
Secret: The private component of the credential. Often referred to as the password or access secret during authentication. This is only shown once when creating the token and must be saved somewhere secure before closing the modal.
Limitations:
-
Workspace API tokens cannot be used for creating new invites.
-
Granular permissions are not currently supported with the Workspace API tokens; they allow admin access to the Workspace for now.
For more information on generating and managing Workspace API tokens, see here.
Personal tokens
You can continue to use personal API tokens with the API. However, you will not be able to generate new personal tokens. Personal token use will be deprecated in August 2024. |
When using personal API tokens, access to resources in the API directly matches your level of permissions in the Analyst Studio Workspace you’re calling. Before returning a response, Analyst Studio validates every API call against your permissions in that Workspace.
FAQs
Q: Analyst Studio API rate limiting
As of today, our API rate limiting is approximately 40 requests every 10 seconds, or 4 requests per second per username. We currently publish two headers:
-
X-RateLimit-Limit, which shows the total number of requests allowed for that class of resources.
-
X-RateLimit-Remaining, which shows how many requests until you’ll be throttled.
Q: How to check which Reports are scheduled and viewed
API method
You can loop through every single Report in the workspace (the ones in public/private Collections, but not other members' personal Collections), and check each individual Report to see whether it’s scheduled.
Discovery Database method
You can also use the Discovery Database to obtain the same information from their reporting.