⌘K

Overview and authentication

What the API is for, the base URL, the key header, and finding a department's id.

Overview

The Mira API lets your own systems send data to Mira without anyone opening the app. A nightly export from your stock system, a script that pulls figures from a warehouse, a form that collects survey results: each can post a CSV file straight into a department, where it becomes a table people can ask about.

You can also use the API to see which tables a department holds, look at one in detail, and delete one you no longer need.

You want toUse
Add a new table, or replace the data in oneImport data
List a department's tables, fetch one, or delete oneTables
Know the limits and what each error meansLimits and errors

Base URL

Every address on these pages starts with:

https://searchmira.com/api

So the import address, /v1.0/data/import, is https://searchmira.com/api/v1.0/data/import in full.

Authentication

Every request carries your API key in a header called X-API-Key:

X-API-Key: your_api_key_here

There is nothing else to sign in with. The key tells Mira who you are and which organisation you are working in, so you never send an organisation id.

Keys are made in Settings, under API Access. Owners and admins see that page. API keys shows how to make one.

A request with no key, a wrong key, or a key that has been turned off gets a 401 back:

{ "Msg": "Invalid API Key" }

What a key can reach

A key acts as the person who made it, in one organisation. It can reach the departments and tables that person can reach in the app, and nothing more. If their access changes, the key's access changes with it.

Departments and their ids

Mira keeps data in departments, and every request that touches data names one. The API calls a department's id ProjectID. It is the same thing.

To find it, open API Access in Settings. Under Your IDs, pick a department and its Project ID appears beside it. Click it to copy. Pick a department and its tables are listed beneath, each with its own id (the Card ID), which you need to replace or delete a table.

Responses

Responses are JSON, and nearly all of them carry a Msg field. It says OK when things went well, and says what went wrong when they didn't. Limits and errors lists the status codes.