API reference

Overview

Mode is a collaborative analytics platform that lets teams work together to solve problems and make better decisions with data.

Mode’s Application Programming Interface (API) powers its analytics platform. You can use the Mode API to programmatically retrieve information from Mode and interact with its rich array of analytics functions. These include writing queries, building, sharing, or distributing reports, and managing members, workspaces, and data.

See the full documentation for Mode's API here

Generating API tokens

API tokens allow you connect to Mode's API programmatically. An API token is used instead of your email address and account password whenever you programmatically authenticate to Mode with basic authentication.

WARNING: 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.

You can create or destroy API tokens for your Mode user account from your account's settings:

  1. Navigate to your Mode homepage.
  2. Click on your name in the upper left corner and click My Account.
  3. Click on API Tokens on the left side.

To generate a new API token and password, enter a token name and click Create token. You will then see the following:

New API token

The credentials are comprised of two parts:

1) Token: The public component of the credential. Often referred to as the username or access key during authentication.

2) Password: The private component of the credential. Often refereed to as the password or access secret during authentication.

API tokens are tied to your Mode user account, not to a specific Mode Workspace. An API token and password generated for your Mode account will provide access to all resources your user account has access to across all Mode Workspaces to which you belong.

Click Delete next to any current token that you would like to invalidate.

FAQs

Mode 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.
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. The API documentation on how to get all the reports in your workspace is here.

From there you can see the view_count property which will allow you to see the view count for an individual report.

Discovery Database Method

You can also use the Discovery Database to obtain the same information for their reporting. The documentation for the Discovery Database can be found here.

Was this article helpful?

decorative particle

Get our weekly data newsletter

Work-related distractions for every data enthusiast.