Mode Reports API
The Reports API from Mode — 27 operation(s) for reports.
The Reports API from Mode — 27 operation(s) for reports.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/mode-reports-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
version: 0.0.1
title: Mode Account Reports API
description: 'Mode provides a REST API for many common operations, such as:
* Listing spaces and reports
* Running reports
* Downloading query results
## Authentication
For most Mode API calls, the client must supply an API token and secret for
HTTP basic authentication.
If authentication is required for a given resource, unauthenticated requests
will result in a `401 Unauthorized` response.
[Create and Manage API Tokens](https://modeanalytics.com/settings/access_tokens)
'
termsOfService: https://mode.com/tos/
contact:
name: Mode API Team
email: support@modeanalytics.com
license:
name: MIT
servers:
- url: https://modeanalytics.com/api
security:
- accessTokenAuth: []
tags:
- name: Reports
paths:
/{account}/reports/{report}/queries/{query}/charts:
x-summary: Charts
get:
operationId: listChartsInQuery
summary: List Charts for a Query
description: Returns all `Chart`s for a `Query`
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'404':
description: '`Report` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Chart` collection response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/QueryCharts'
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: query
in: path
description: '`Query` token'
required: true
schema:
type: string
tags:
- Reports
/{account}/reports/{report}/queries/{query}/charts/{chart}:
x-summary: Chart
get:
operationId: getChart
summary: Get a chart
description: Returns a representation of a single `Chart`
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'404':
description: '`Chart` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Chart` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Chart'
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: query
in: path
description: '`Query` token'
required: true
schema:
type: string
- name: chart
in: path
description: '`Chart` token'
required: true
schema:
type: string
tags:
- Reports
/{account}/reports/{report}/queries:
x-summary: Queries
get:
operationId: listQueriesInReport
summary: List queries
description: Returns all `Queries` in a `Report`
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'404':
description: '`Report` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Query` collection response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/ReportQueries'
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
tags:
- Reports
post:
operationId: createQueryInReport
summary: Create a query
description: Creates a `Query` in a `Report`
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
'404':
description: '`Report` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Query` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Query'
tags:
- Reports
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateQueryRequestBody'
/{account}/reports/{report}/queries/{query}:
x-summary: Query
get:
operationId: getQueryInReport
summary: Get a query
description: Returns a `Query` in a `Report`
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'404':
description: '`Report` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Query` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Query'
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: query
in: path
description: '`Query` token'
required: true
schema:
type: string
tags:
- Reports
patch:
operationId: updateQueryInReport
summary: Update a query
description: Updates a `Query` in a `Report`
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: query
in: path
description: '`Query` token'
required: true
schema:
type: string
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
'404':
description: '`Report` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Query` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Query'
tags:
- Reports
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateQueryRequestBody'
delete:
operationId: deleteQueryInReport
summary: Delete a query
description: Deletes a `Query` in a `Report`
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'404':
description: '`Report` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Query` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Query'
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: query
in: path
description: '`Query` token'
required: true
schema:
type: string
tags:
- Reports
/{account}/reports/{report}/runs/{run}/query_runs:
x-summary: Query Runs
get:
operationId: listQueryRunsForReportRun
summary: List query runs
description: Returns all `QueryRun`s for a single `ReportRun`
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: run
in: path
description: '`ReportRun` token'
required: true
schema:
type: string
responses:
'404':
description: '`ReportRun` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'200':
description: '`QueryRun` collection response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/QueryRuns'
tags:
- Reports
/{account}/reports/{report}/runs/{run}/query_runs/{query_run}:
x-summary: Query Runs
get:
operationId: getQueryRunForReportRun
summary: Get a query run
description: Returns a `QueryRun` for a single `ReportRun`
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: run
in: path
description: '`ReportRun` token'
required: true
schema:
type: string
- name: query_run
in: path
description: '`Query Run` token'
required: true
schema:
type: string
responses:
'404':
description: '`ReportRun` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'200':
description: '`Query Run`response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/QueryRun'
tags:
- Reports
/{account}/reports/{report}/runs/{run}/query_runs/{query_run}/results/content(.csv, .json):
x-summary: Export
get:
operationId: getQueryRunContent
summary: Get query results
description: Gets the content of a query run in the requested format (csv or json)
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: run
in: path
description: '`ReportRun` token'
required: true
schema:
type: string
- name: query_run
in: path
description: '`Query Run` token'
required: true
schema:
type: string
responses:
'404':
description: '`ReportRun` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'200':
description: '`Query Run` result content in the requested format'
tags:
- Reports
/{account}/reports/{report}/filters:
x-summary: Report Filters
get:
operationId: listReportFilters
summary: List report filters
description: Returns all `ReportFilter`s for a single `Report`
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
responses:
'404':
description: '`Report` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
'200':
description: '`ReportFilter` collection response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/ReportFilters'
tags:
- Reports
post:
operationId: createReportFilter
summary: Create a report filter
description: Creates a `ReportFilter`
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
responses:
'404':
description: '`Report` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
'200':
description: '`ReportFilter` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/ReportFilter'
tags:
- Reports
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrUpdateReportFilterRequestBody'
description: '`ReportFilter` attributes'
required: true
/{account}/reports/{report}/filters/{filter}:
x-summary: Report Filter
get:
operationId: getReportFilter
summary: Get a report filter
description: Gets a `ReportFilter`
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: filter
in: path
description: '`ReportFilter` token'
required: true
schema:
type: string
responses:
'404':
description: '`ReportFilter` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
'200':
description: '`ReportFilter` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/ReportFilter'
tags:
- Reports
patch:
operationId: updateReportFilter
summary: Update a report filter
description: Updates a `ReportFilter`
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: filter
in: path
description: '`ReportFilter` token'
required: true
schema:
type: string
responses:
'404':
description: '`ReportFilter` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
'200':
description: '`ReportFilter` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/ReportFilter'
tags:
- Reports
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrUpdateReportFilterRequestBody'
description: '`ReportFilter` attributes'
required: true
delete:
operationId: deleteReportFilter
summary: Delete a report filter
description: Deletes a `ReportFilter`
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: filter
in: path
description: '`ReportFilter` token'
required: true
schema:
type: string
responses:
'404':
description: '`ReportFilter` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
'200':
description: '`ReportFilter` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/ReportFilter'
tags:
- Reports
/{account}/reports/{report}/exports/runs/{run}/pdf/download:
x-summary: Export
get:
operationId: getReportRunExport
summary: Get PDF of a report run
description: Gets exported pdf of the report run
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: run
in: path
description: '`ReportRun` token'
required: true
schema:
type: string
responses:
'404':
description: '`ReportRun` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'200':
description: The data stream containing the exported pdf file
tags:
- Reports
/{account}/reports/{report}/runs/{run}/duplicates/{duplicate}:
x-summary: Report Runs
get:
operationId: getReportRunDuplicate
summary: Get report run duplication status
description: Returns a representation of a single `ReportRunDuplicate`
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: run
in: path
description: '`ReportRun` token'
required: true
schema:
type: string
- name: duplicate
in: path
description: '`ReportRunDuplicate` token'
required: true
schema:
type: string
responses:
'404':
description: '`ReportRunDuplicate` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'200':
description: '`ReportRunDuplicate` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/ReportRunDuplicate'
tags:
- Reports
/{account}/reports/{report}/runs/{run}/duplicates:
x-summary: Report Runs
post:
operationId: duplicateReportRun
summary: Duplicate a report run
description: Returns a representation of the enqueued `ReportRunDuplicate`
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
- name: run
in: path
description: '`ReportRun` token'
required: true
schema:
type: string
- in: query
name: collection_id
required: false
description: 'The token of a collection. Example: collection_id=875a93v22b93'
schema:
type: string
responses:
'404':
description: '`ReportRun` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
'200':
description: '`ReportRunDuplicate` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/ReportRunDuplicate'
tags:
- Reports
/{account}/reports/{report}:
x-summary: Report
patch:
operationId: updateReport
summary: Update a report
description: Updates a single `report` with the provided attributes
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'404':
description: '`Report` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Report` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Report'
tags:
- Reports
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateReportRequestBody'
get:
operationId: getReport
summary: Get a report
description: Returns a representation of a single `Report`
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'404':
description: '`Report` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Report` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Report'
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
tags:
- Reports
delete:
operationId: deleteReport
summary: Delete a report
description: Deletes a single `Report`
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
'404':
description: '`Report` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: Empty body
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
tags:
- Reports
/{account}/reports/{report}/archive:
x-summary: Report
patch:
operationId: archiveReport
summary: Archive a report
description: Archives a single `Report`
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
'404':
description: '`Report` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Report` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Report'
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
tags:
- Reports
/{account}/reports/{report}/unarchive:
x-summary: Report
patch:
operationId: unarchiveReport
summary: Unarchive a report
description: Unarchives a single `Report`
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
'404':
description: '`Report` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Report` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Report'
parameters:
- name: account
in: path
description: '`Account` (`Workspace` or `User`) username'
required: true
schema:
type: string
- name: report
in: path
description: '`Report` token'
required: true
schema:
type: string
tags:
- Reports
/{account}/reports/purge:
x-summary: Report
post:
operationId: purgeAllReports
summary: Purge all report results
description: Removes all report results for an organization
parameters:
- name: time
in: query
description: All records older than the date ("YYYY-MM-DD") which should be purged.
required: true
schema:
type: date
- name: end_time
in: query
description: Purge records up to and including the end date ("YYYY-MM-DD"). Purging a large number of reports can result in error, so use the `end_time` to break up the purging into smaller requests.
required: false
schema:
type: date
- name: in_progress
in: query
description: Includes reports t
# --- truncated at 32 KB (93 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/mode/refs/heads/main/openapi/mode-reports-api-openapi.yml