Mode Definitions API
The Definitions API from Mode — 2 operation(s) for definitions.
The Definitions API from Mode — 2 operation(s) for definitions.
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-definitions-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 Definitions 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: Definitions
paths:
/{workspace}/definitions:
x-summary: Definitions
get:
operationId: listDefinitions
summary: List definitions
description: Returns a list of `Definition`s
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'404':
description: No default `Library` found
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Definitions` collection response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Definitions'
parameters:
- name: workspace
in: path
description: '`Workspace` username'
required: true
schema:
type: string
- in: query
name: filter
description: 'Filter `Definition`''s by token. Example: `?filter=by_tokens`'
schema:
type: string
- in: query
name: tokens
description: Comma separated list of `Definition` tokens
schema:
type: string
tags:
- Definitions
post:
operationId: createDefinition
summary: Create a definition
description: Creates a `Definition`
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'404':
description: '`DataSource` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Definition` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Definition'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
parameters:
- name: workspace
in: path
description: '`Workspace` username'
required: true
schema:
type: string
tags:
- Definitions
/{workspace}/definitions/{definition}:
x-summary: Definition
get:
operationId: getDefinition
summary: Get a definition
description: Returns a representation of `Definition`
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'404':
description: '`Definition` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Definition` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Definition'
parameters:
- name: workspace
in: path
description: '`Workspace` username'
required: true
schema:
type: string
- name: definition
in: path
description: '`Definition` token'
required: true
schema:
type: string
tags:
- Definitions
patch:
operationId: updateDefinition
summary: Update a definition
description: Updates a `Definition`
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'404':
description: '`Definition` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Definition` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Definition'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
parameters:
- name: workspace
in: path
description: '`Workspace` username'
required: true
schema:
type: string
- name: definition
in: path
description: '`Definition` token'
required: true
schema:
type: string
tags:
- Definitions
delete:
operationId: deleteDefinition
summary: Delete a definition
description: Deletes a `Definition`
responses:
'401':
description: Unauthorized
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Unauthorized'
'404':
description: '`Definition` not found'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/NotFound'
'200':
description: '`Definition` response'
content:
application/hal+json:
schema:
$ref: '#/components/schemas/Definition'
'400':
description: Bad request
content:
application/hal+json:
schema:
$ref: '#/components/schemas/BadRequest'
parameters:
- name: workspace
in: path
description: '`Workspace` username'
required: true
schema:
type: string
- name: definition
in: path
description: '`Definition` token'
required: true
schema:
type: string
tags:
- Definitions
components:
schemas:
Definitions:
properties:
pagination:
$ref: '#/components/schemas/Pagination'
_links:
$ref: '#/components/schemas/DefinitionsLinks'
_embedded:
$ref: '#/components/schemas/DefinitionsEmbeds'
required:
- _links
DefinitionsLinks:
properties:
next_page:
$ref: '#/components/schemas/Link'
prev_page:
$ref: '#/components/schemas/Link'
self:
$ref: '#/components/schemas/Link'
required:
- self
BadRequest:
required:
- id
- message
properties:
id:
type: string
enum:
- bad_request
message:
type: string
DefinitionEmbeds: {}
DefinitionsEmbeds: {}
Unauthorized:
required:
- id
- message
properties:
id:
type: string
enum:
- unauthorized
message:
type: string
NotFound:
required:
- id
- message
properties:
id:
type: string
enum:
- not_found
message:
type: string
Definition:
properties:
id:
type: string
token:
type: string
name:
type: string
description:
type: string
source:
type: string
data_source_id:
type: string
created_at:
type: string
updated_at:
type: string
last_successful_sync_at:
type: string
github_link:
type: string
last_saved_at:
type: string
_links:
$ref: '#/components/schemas/DefinitionLinks'
_embedded:
$ref: '#/components/schemas/DefinitionEmbeds'
required:
- _links
- id
- token
- name
- description
- source
- data_source_id
- created_at
- updated_at
- last_successful_sync_at
- last_saved_at
DefinitionLinks:
properties:
self:
$ref: '#/components/schemas/Link'
last_run:
$ref: '#/components/schemas/Link'
last_successful_github_sync:
$ref: '#/components/schemas/Link'
web_edit:
$ref: '#/components/schemas/Link'
creator:
$ref: '#/components/schemas/Link'
required:
- self
- last_run
- last_successful_github_sync
- web_edit
Link:
required:
- href
properties:
href:
type: string
templated:
type: boolean
default: false
Pagination:
required:
- first_page
- last_page
- total_pages
- total_count
properties:
first_page:
type: string
last_page:
type: string
total_pages:
type: integer
total_count:
type: integer
securitySchemes:
accessTokenAuth:
type: http
scheme: basic