Skip to content
AIR-CoreDevelopersOpen AIR-Core
On this page

AIR-Core API v2.0.0

REST API of AIR-Core (version 2), the data and artificial intelligence platform of AIR Institute.

What changed from API v1. The same operations under /api/v2/, with the same tokens, permissions, limits and errors, except the alerts: they are now part of the automations (/api/v2/workspace/{workspaceId}/automations), which list, create, change, delete, test and read the history of the simple notices and the flows of a workspace together. In API v1, which is deprecated and keeps working, the operations of the alerts answer 410 Gone with the code ALERTS_REMOVED, the operation that replaces each one (replacement) and a link to this documentation. The MCP tools changed the same way: list_automations, create_automation and get_automation_history.

Authentication. Create an authorization token in the Account section (API and AI applications) and send it in the x-auth-token header. The token is shown only once, when it is created: AIR-Core keeps only its hash, and the lists show its name, dates and last 4 characters. Resetting the password revokes every token, and changing it can revoke them too. Endpoints that act on workspaces also take the organization in the x-organization header.

Asynchronous work. Uploading data and training models start a task: the response carries its task_id, and GET /api/v2/workspace/{workspaceId}/task/{taskId} reports its status and result.

Automations. A simple notice warns the notice list of the workspace (and a chat or a system through a webhook) when new rows of a source meet a condition, or when a source gets no data for some hours. A flow can also predict with a model, retrain it, write rows to another source and act on a schedule. When an automation is created, AIR-Core saves it as a simple notice when it is exactly one and as a flow otherwise, and says which and why.

Explainability and model cards. models/{modelId}/explanation, explanation/prediction and card return SHAP explanations and a model card when the explainability module is enabled; explanation/rules, explanation/prototypes, explanation/counterfactuals, explanation/compare, explanation/effects and explanation/fairness return the rules of a model, representative cases, what would have to change for another prediction, where two models disagree, the effect of each input and a bias audit by a sensitive field.

Assistants and agents. The same operations are exposed to AI assistants through the MCP server of the deployment (Streamable HTTP at /mcp, OAuth 2.1), with the permissions of the user who connects it. An OAuth authorization granted for the directory tool set (/mcp/directory, which cannot edit or delete data) is bound to it: the API answers its tokens only the operations of those tools, and 403 with the code DIRECTORY_SCOPE to the rest.

Limits. A deployment may limit the requests per second of each address; the API answers 429 when the limit is exceeded.

Base URL: https://app.air-core.io

authentication

Authentication API (OAuth 2.0)

POST /api/oauth/login

Obtains an authentication token given a bearer token. You can obtain a bearer token when the user gives authorization to your application to access their account.

Request body application/json

FieldTypeDescription
client_idstring

Client ID of your application.

client_secretstring

Client secret of your application.

bearerstring

Bearer token.

expirationstring: never | year | month | week | day

Expiration options. Define the duration of the token.

Responses

  • 200 Normal response
  • 404 Application or bearer token not found.
Example
curl -X POST "https://app.air-core.io/api/oauth/login" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "Content-Type: application/json" -d @body.json

POST /api/oauth/revoke

Revokes an authentication token.

Request body application/json

FieldTypeDescription
client_idstring

Client ID of your application.

client_secretstring

Client secret of your application.

auth_tokenstring

Autehntication token

Responses

  • 200 Normal response
  • 404 Application or token not found.
Example
curl -X POST "https://app.air-core.io/api/oauth/revoke" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "Content-Type: application/json" -d @body.json

account

Account API. Profile and personal information.

GET /api/v2/who

Gets the session basic information

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response
  • 401 Invalid authorization
Example
curl -X GET "https://app.air-core.io/api/v2/who" \
  -H "x-auth-token: $AIRCORE_TOKEN"

GET /api/v2/profile

Gets the user's public profile

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response
  • 401 Invalid authorization
Example
curl -X GET "https://app.air-core.io/api/v2/profile" \
  -H "x-auth-token: $AIRCORE_TOKEN"

POST /api/v2/profile

Modifies user's profile

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
full_namestring

Full name (max 200 characters).

biostring

Bio. (max 300 characters)

urlstring

User's personal website (max 200 characters)

countrystring

Country (max 200 characters)

Responses

  • 200 Normal response
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Acess denied. The authorization token lacks from the required permissions.
Example
curl -X POST "https://app.air-core.io/api/v2/profile" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "Content-Type: application/json" -d @body.json

workspaces

Workspaces API. Workspaces allow you to group your resources (sources, models, visualizations, dashboards) and manage their permissions.

GET /api/v2/workspaces

Obtains the list of workspaces

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

x-organization requiredheaderstring

Select Organization

Responses

  • 200 Normal response
  • 401 Invalid authorization
  • 403 Access denied.
Example
curl -X GET "https://app.air-core.io/api/v2/workspaces" \
  -H "x-auth-token: $AIRCORE_TOKEN"

POST /api/v2/workspaces

Creates a new workspace

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

x-organization requiredheaderstring

Select Organization

Request body application/json

FieldTypeDescription
namestring

Workspace name (max 80 characters)

descriptionstring

Workspace description (max 300 characters)

folderstring

Folder (sidebar group) of the workspace (max 80 characters). Optional; empty means no folder. Never taken from the description.

Responses

  • 200 Normal response
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
Example
curl -X POST "https://app.air-core.io/api/v2/workspaces" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspaces/import

Creates a new workspace (mport from ZIP)

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

x-organization requiredheaderstring

Select Organization

Request body multipart/form-data

FieldTypeDescription
namestring

Workspace name (max 80 characters)

descriptionstring

Workspace description (max 300 characters)

folderstring

Folder (sidebar group) of the workspace (max 80 characters). Optional; empty means no folder. Never taken from the description.

filestring (binary)

ZIP file to upload

Responses

  • 200 Normal response
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
Example
curl -X POST "https://app.air-core.io/api/v2/workspaces/import" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}

Gets the information of a workspace

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response
  • 401 Invalid authorization
  • 403 Access denied to the resource
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}

Modifies workspace metadata. The signing key is preserved; rotation uses POST /api/ws/secret/rotate with an authorized session and CSRF token.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Workspace name (max 80 characters)

descriptionstring

Workspace description (max 300 characters)

folderstring

Folder (sidebar group) of the workspace (max 80 characters). Optional; empty means no folder. Never taken from the description.

disableIndividualAlertsboolean

True if individual email notifications are disabled

Responses

  • 200 Normal response
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

DELETE /api/v2/workspace/{workspaceId}

Deletes a workspace

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/iframe

Creates iframe token for the workspace. Requires a secret to be set.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
typestring: dashboard | visualization

Iframe type

idstring

ID of the dashboard or the visualization

filtersarray<object>

List of filters to enforce

Responses

  • 200 Normal response.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/iframe" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/export

Exports a workspace to a ZIP file

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/export" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/clone

Clones a workspace. With source_mapping, the visualizations and dashboards of the copy read from other sources of the workspace.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Workspace name (max 80 characters)

source_mappingobject

Optional. Sources to replace in the copy: ID of a source read by the visualizations and dashboards of the workspace -> ID of another source of the same workspace. Columns are matched by name (exact, then ignoring case) and every column index of the visualizations, dashboard filters and filter widgets is translated.

forceboolean

Only with source_mapping. Clone even if some visualizations or filters use columns that the new source does not have: those columns are removed from them. Without it, the request is refused with 409 and the report.

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
  • 409 The source mapping would remove columns from some visualizations or filters. Send force=true to clone anyway.
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/clone" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/search/synonyms

The synonyms of the search across the data: the groups the organization added (groups) and those AIR-Core brings (defaults). For the administrators of the organization, also the state of its index (index: documents, objects waiting to be indexed again). Needs a token that reads workspaces.

Parameters

NameInTypeDescription
x-organizationheaderstring

The organization (the first one of the person without it)

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The synonyms
  • 401 Invalid authorization
  • 403 Access denied or NO_ORGANIZATION
  • 503 SEARCH_DISABLED: the search is switched off on this platform (search.enabled false)
Example
curl -X GET "https://app.air-core.io/api/v2/search/synonyms" \
  -H "x-auth-token: $AIRCORE_TOKEN"

PUT /api/v2/search/synonyms

Replaces the synonyms of the organization (its administrators): groups, a list of groups of 2 to 12 different words of at most 40 characters (at most 200 groups), or text, one group per line with the words separated by commas. They are used when searching, at once (nothing is indexed again). Needs a token that writes workspaces.

Parameters

NameInTypeDescription
x-organizationheaderstring

The organization (the first one of the person without it)

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
groupsarray<array<string>>
textstring

Responses

  • 200 The synonyms as they are left
  • 400 INVALID_SYNONYMS, SYNONYM_TOO_LONG, SYNONYM_GROUP_TOO_SMALL, SYNONYM_GROUP_TOO_LARGE or TOO_MANY_SYNONYMS
  • 401 Invalid authorization
  • 403 ACCESS_DENIED (only the administrators of the organization) or NO_ORGANIZATION
  • 503 SEARCH_DISABLED: the search is switched off on this platform (search.enabled false)
Example
curl -X PUT "https://app.air-core.io/api/v2/search/synonyms" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/templates

The templates by sector («Plantillas por sector»): each one takes a workspace from empty to a complete result in a few minutes. From example data bundled with the platform (synthetic or openly licensed, without personal data) a template creates a data source, trains a model on it, makes a dashboard and sets a simple notice, each one explained. Of each template: what it creates, where its data comes from and under which licence, about how long it takes and own_data: the columns a source of your own needs to do the same with your data. Nothing of any workspace is in the answer, and no generative AI is involved.

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Authentication token (reads workspaces)

langquerystring: en | es | cat | de | fr | ja | zh

Language of the texts (default: the one of the request)

Responses

  • 200 The templates
  • 401 Invalid authorization
  • 403 Access denied
Example
curl -X GET "https://app.air-core.io/api/v2/templates" \
  -H "x-auth-token: $AIRCORE_TOKEN"

POST /api/v2/workspace/{workspaceId}/templates/{templateId}/apply

Applies a template by sector in a workspace. It starts ONE task that does four steps, one after the other, each with the service that already does it: imports the example source, trains the model (with the quality guarantee of any model), creates the dashboard proposed for that source and its model, and creates a simple notice on new data. What is created counts against the limits of the plan as usual. What was created stays when a later step cannot be done (for example, the plan allows no more dashboards): the task ends well and its summary says which steps were done and why the others were not; the task fails only when the example source could not be imported. Poll GET /api/v2/workspace/{workspaceId}/task/{taskId}: template carries the summary while the task runs and after it. Requires the permissions to create sources, models, visualizations and dashboards, to run tasks and to edit the workspace (alerts).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

templateId requiredpathstring

Identifier of the template (see GET /api/v2/templates)

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
langstring: en | es | cat | de | fr | ja | zh

Language of the names and descriptions of what is created (default: the one of the request)

Responses

  • 200 The task that applies the template
  • 401 Invalid authorization
  • 403 Access denied (ACCESS_DENIED: a permission to create one of the things is missing), or LIMIT (data sources of the workspace, size, task time or parallel tasks of the plan)
  • 404 Workspace not found, or TEMPLATE_NOT_FOUND
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/templates/<templateId>/apply" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

tasks

Tasks API. Tasks are asynchronous and are created when you request AIR-Core a batch task. For example uploading a data source or training a model.

GET /api/v2/workspace/{workspaceId}/tasks

Obtains the list of tasks

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

pagequeryinteger (int32)

Requested page (starts with 0)

limitqueryinteger (int32)

Max number of items per page (max 500)

Responses

  • 200 Normal response. Paginated result.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/tasks" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/task/{taskId}

Obtains task information

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

taskId requiredpathstring

Identifier of the task

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response. Paginated result.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/task/<taskId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

DELETE /api/v2/workspace/{workspaceId}/task/{taskId}

Force stops a running task.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

taskId requiredpathstring

Identifier of the task

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response. Paginated result.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>/task/<taskId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/task/{taskId}/file

Downloads the ZIP file made by an export task (of a workspace or a dashboard). It needs the data export permission in the workspace. The file is kept for 24 hours after the export ends.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

taskId requiredpathstring

Identifier of the export task

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 The ZIP file.
  • 401 Invalid authorization
  • 403 Access denied (the token lacks permissions, or the user cannot export data from the workspace)
  • 404 The task is not a finished export, or its file is no longer available (FILE_EXPIRED)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/task/<taskId>/file" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

sources

Sources API. Sources allow you to store your data.

GET /api/v2/workspace/{workspaceId}/sources

Obtains the list of data sources

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

pagequeryinteger (int32)

Requested page (starts with 0)

limitqueryinteger (int32)

Max number of items per page (max 500)

field_typequerystring: date | numeric | nominal | logic | text

Optional: only the sources with at least one field of this type (date lists the sources a forecast can use). The answer then also has field_type and total_sources, the number of sources of the workspace.

Responses

  • 200 Normal response. Paginated result.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/sources" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/sources

Creates a new data source

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Source name. Max 120 characters.

descriptionstring

Source description. Max 300 characters.

encryptedboolean

True to encrypt the data source

shuffledboolean

True to shuffle instances

featuresarray<object>

List of features to create

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/sources" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/clone

Clones Source

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the source

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Source name (Max 120 characters)

Responses

  • 200 Success
  • 400 Bad request
  • 401 Unauthorized
  • 403 Access denied
  • 404 Not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/clone" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/sources/derived

Creates a derived source

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Source name. Max 120 characters.

descriptionstring

Source description. Max 300 characters.

derived_typestring: filter | extend | join | merge | aggregate | join_multi | recipe | text_analysis

Derived type. filter = Filters a source. extend = Melts a source. join = Join 2 sources. merge = merges 2 sources. aggregate = Performs instances aggregations. join_multi = Joins a main source with 1 to 5 more (main, lookups and columns): the lookups are loaded in memory up to the cap of the plan (JOIN_TOO_BIG above it), a repeated key of a lookup uses its first row, and each run keeps a report (GET .../source/{sourceId}/join-report). recipe = a prepared source: the steps over the origin, recomputed each time the origin updates (see GET .../source/{sourceId}/recipe). text_analysis = «Analizar textos»: the columns of the origin plus a classical analysis of one of its columns of texts (origin, column, tasks, language, keywords_top, date_column, topics, classifiers, names), applied again when the origin updates when the plan includes it (see GET .../source/{sourceId}/text-analysis); refused with TEXT_ANALYSIS_LIMIT or TEXT_ANALYSIS_PLAN by the caps of the plan and TEXT_ENGINE_OUTDATED when the AI module cannot analyse texts

originstring

ID of the origin source.

origin_bstring

ID of the second origin source. For join and merge.

queryQueryTree

Tree used to describe a query. Used in order to query instances of data sources.

featuresstring

List of features indexes, split by commas. For filter, this selects the list of features to keep in the derived source. For extend, this selects the features to melt.

stepsarray<RecipeStep>

recipe: the steps, checked against the columns of the origin (400 with the code of the first one that cannot be used)

columnstring

text_analysis: NAME of the column of texts (text or nominal)

tasksarray<string: language | sentiment | keywords | entities | topics>

text_analysis: what to compute (default language, sentiment, keywords); entities on the plans that include them

languagestring

text_analysis: auto (default: identified in each text) or es, en, ca, de, fr, it, pt, ja, zh

keywords_topinteger

text_analysis: keywords per text (default 5)

date_columnstring

text_analysis: NAME of a column of dates: sentiment (and topics, on the plans with topics over time) by period

topicsobject

text_analysis with the task topics: {k: 0 (automatic) or 2 to the maximum of the plan, method?: nmf or lda, model?: an existing topics model of the workspace}

classifiersarray<object>

text_analysis: text classifiers of the workspace to apply ({model, column, kind: emotions or labels}); own classifiers on the plans that include them

namesobject

text_analysis: names of the new columns by output (language, sentiment, score, keywords, entities, people, topic, topic_weight); a name taken by the origin gets « 2»

field_anumber (int32)

Match feature for join in first origin source. For merge, this sets the source name filed if the first source is already a merge source. For aggregate, this is the field to group by, set to -1 for no grouping.

field_bnumber (int32)

Match feature for join in the second origin source.

encryptedboolean

True to encrypt the data source

shuffledboolean

True to shuffle instances

mainstring

join_multi: identifier of the main source (one output row per row of it, or fewer with inner lookups)

lookupsarray<JoinMultiLookup>

join_multi: the sources joined to the main one, in order

columnsarray<JoinMultiColumn>

join_multi: the columns of the new source, in order (default: every column of the main source and of each lookup without its key columns)

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/sources/derived" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/sources/external

Creates an external source

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Source name. Max 120 characters.

descriptionstring

Source description. Max 300 characters.

urlstring

External connection URL

featuresarray<object>

List of features to create

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/sources/external" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/sources/real_time

Creates a real time source

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Source name. Max 120 characters.

descriptionstring

Source description. Max 300 characters.

max_agenumber (int64)

Max age of registers in milliseconds. Set to 0 or negative for unlimited age. It can never be longer than the maximum age of the plan of the organization: a longer age (or 0) is shortened to it.

featuresarray<object>

List of features to create

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/sources/real_time" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/sources/other

Creates other type of source. Including database sources or MQTT sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Source name. Max 120 characters.

descriptionstring

Source description. Max 300 characters.

typestring: file/any | url/any | s3 | ckan | database/mongo | database/mysql | database/influx | mqtt
encryptedboolean

True to encrypt the data source

shuffledboolean

True to shuffle instances

indexedboolean

True to index the fields

dyn_enabledboolean

Set to true to enable auto update

dyn_delaynumber (int64)

Auto update delay (milliseconds). Min is 5 minutes.

dyn_replaceboolean

Set to true to replace the entire data set with each update. False to append the data.

dyn_pkstring

Name of the primary key field. In order to check for duplicates when appending.

dyn_update_modeboolean

Set to true to update existing rows (by primary key). Set to false to skip duplicate rows. If you set dyn_replace to true. This option does not have any effect.

filestring

File (multipart/form-data) for file/any (required)

file_namestring

Name of the uploaded file

separatorstring

Separator character for csv files

quotesstring

Quotes character for csv files

csv_headerboolean

Set to false if the csv files does not have a header.

json_fieldsarray<string>

List of fileds to get, in order, for json files or mongo databases.

json_prefixstring

Prefix to tell the engine where the data is in the JSON file. Use dots to split levels.

json_modestring: single | default

Set to single in case there is a single instance in the JSON

date_formatstring

Date format in the CSV of JSON file. By default is the ISO format. This uses the Moment.js formats.

urlstring

URL for url/any and ckan source types. In case of S3. This is the URI of the object inside the bucket. For mongo and influx, this is the connection URL.

parserstring: auto | csv | json | jsonl | parquet | xlsx | ods | sqlite

File format: 'auto' (or empty) detects it from its content, content type and name; or one of csv, json, jsonl (JSON Lines), parquet, xlsx (Excel, also XLS), ods, sqlite. Share links of Google Sheets, Google Drive, OneDrive, SharePoint and Dropbox are downloaded as the file they point to.

sheetstring

Sheet of a spreadsheet (xlsx, ods, Google Sheets) to read, by the name on its tab. Empty: the first one.

http_headersstring

Custom headers to send

rejectUnauthorizedboolean

Set to false to ignore invalid certificates: of the HTTPS server (url/any), or of a Microsoft SQL Server (database/mysql with db = ms, for a self-signed certificate). Default true.

sdp_enabledboolean

Set to true to enable stored data parameter in the Query. Any instances of ${SDP} will be replaced.

sdp_namestring

Name of the field to use for SDP

sdp_dirstring: desc | asc

Sorting direction to calc the SDP

databasestring

Name of the database or the S3 bucket.

userstring

User / Access key ID

passwordstring

Password / Secret key

tablestring

Name of the table / collection

querystring

Database Query. For mongo, this is a JSON.

sortstring

For MongoDB. Sorting

projectstring

MongoDB project.

limitnumber (int32)

Limit of results

dbstring: mysql | pg | oracle | ms

Database type (for relational)

hoststring

Database host. For Microsoft SQL Server (db = ms) it can also be server\INSTANCE (a named instance, found through the SQL Server Browser), server,port or tcp:server,port.

portnumber (int32)

Port number

topicsstring

For MQTT, list of topics split by commas.

fields_expectedarray<object>

List of expected fields for MQTT

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/sources/other" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/source/{sourceId}

Obtains information about a source

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

catalogquerystring: true | false

true: adds catalog, the catalogue of the source as GET .../catalog gives it (only to a member who can read the sources). Without it the answer is the same as always.

Responses

  • 200 Normal response.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}

Sets the name and description of the source

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Source name (max 120 characters)

descriptionstring

Source description (max 300 characters)

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

DELETE /api/v2/workspace/{workspaceId}/source/{sourceId}

Deletes the data source

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/dependents

Dependency map of a source: what is built from it, to check before editing or deleting it.

  • derived: its derived sources as a tree (how: filter, join, merge, extend (melt), aggregate, or model for the predictions of a model applied to it), followed down to 6 levels; deeper counts the sources one level beyond.
  • models, visualizations and alerts (the simple notices): those built on the source or on one of its derived sources (direct is false for the latter, and source says which).
  • dashboards: those that show one of those visualizations, a widget of one of those models, or use the source or a derived source in a monitor, a filter or a variable input (via).

Each kind lists up to 50 items, direct ones first; more counts the rest and partial marks a count cut by a safety limit. Groups the user of the token cannot read in the workspace (read_sources, read_models, read_views, read_dashboards) keep their count, with hidden: true and no items. A public source does not make its map public: the token is always required.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/dependents" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/connection

Gets external source connection URL

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/connection" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/connection

Sets the Connection for a external source

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
urlstring

External connection URL

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/connection" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/real_time

Gets real time connection details and configuration

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/real_time" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/real_time

Updates real time configuration

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
max_agenumber (int64)

Max age of registers in milliseconds. Set to 0 or negative for unlimited. It can never be longer than the maximum age of the plan of the organization: a longer age (or 0) is shortened to it.

regenerate_passwordboolean

Set to true to regenerate the MQTT password. Use if it was compromised.

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/real_time" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/real_time_push

Inserts an instance in real time. Alternative to MQTT for slower inserts.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
dataarray<string>

Array of data fields. This does not include the timestamp or the computed fields

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/real_time_push" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/real_time_clear

Clears instances of a real time source to fit into limits.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
from_timenumber (int64)

Timestamp (Unix millis). Start of the clear range

to_timenumber (int64)

Timestamp (Unix millis). End of the clear range

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/real_time_clear" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/autoupdate

Gets source auto update configuration

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/autoupdate" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/autoupdate

Sets the auto update configuration

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
dyn_enabledboolean

Set to true to enable auto update

dyn_delaynumber (int64)

Auto update delay (milliseconds). Min is 5 minutes.

dyn_replaceboolean

Set to true to replace the entire data set with each update. False to append the data.

dyn_pkstring

Name of the primary key field. In order to check for duplicates when appending.

dyn_update_modeboolean

Set to true to update existing rows (by primary key). Set to false to skip duplicate rows. If you set dyn_replace to true. This option does not have any effect.

separatorstring

Separator character for csv files

quotesstring

Quotes character for csv files

csv_headerboolean

Set to false if the csv files does not have a header.

json_fieldsarray<string>

List of fileds to get, in order, for json files or mongo databases.

json_prefixstring

Prefix to tell the engine where the data is in the JSON file. Use dots to split levels.

json_modestring: single | default

Set to single in case there is a single instance in the JSON

date_formatstring

Date format in the CSV of JSON file. By default is the ISO format. This uses the Moment.js formats.

urlstring

URL for url/any and ckan source types. In case of S3. This is the URI of the object inside the bucket. For mongo and influx, this is the connection URL.

parserstring: auto | csv | json | jsonl | parquet | xlsx | ods | sqlite

File format: 'auto' (or empty) detects it from its content, content type and name; or one of csv, json, jsonl (JSON Lines), parquet, xlsx (Excel, also XLS), ods, sqlite. Share links of Google Sheets, Google Drive, OneDrive, SharePoint and Dropbox are downloaded as the file they point to.

sheetstring

Sheet of a spreadsheet (xlsx, ods, Google Sheets) to read, by the name on its tab. Empty: the first one.

http_headersstring

Custom headers to send

rejectUnauthorizedboolean

Set to false to ignore invalid certificates: of the HTTPS server (url/any), or of a Microsoft SQL Server (database/mysql with db = ms, for a self-signed certificate). Default true.

sdp_enabledboolean

Set to true to enable stored data parameter in the Query. Any instances of ${SDP} will be replaced.

sdp_namestring

Name of the field to use for SDP

sdp_dirstring: desc | asc

Sorting direction to calc the SDP

databasestring

Name of the database or the S3 bucket.

userstring

User / Access key ID

passwordstring

Password / Secret key

tablestring

Name of the table / collection

querystring

Database Query. For mongo, this is a JSON.

sortstring

For MongoDB. Sorting

projectstring

MongoDB project.

limitnumber (int32)

Limit of results

dbstring: mysql | pg | oracle | ms

Database type (for relational)

hoststring

Database host. For Microsoft SQL Server (db = ms) it can also be server\INSTANCE (a named instance, found through the SQL Server Browser), server,port or tcp:server,port.

portnumber (int32)

Port number

topicsstring

For MQTT, list of topics split by commas.

fields_expectedarray<object>

List of expected fields for MQTT

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/autoupdate" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/features

Transforms the source features. If you change the types, all the instances will be casted to the selected types.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
shuffledboolean

True to add a hidden feature to shuffle instances

featuresarray<object>

List of features mapped to the previous features

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/features" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/analyze

Talk to your data: exact figures over ALL the rows of a source, computed by AIR-Core on the server (never by a language model). Counts, distinct values, sums, averages, minimums, maximums and medians, grouped by up to 2 fields (dates by hour, day, week, month, quarter or year in the time zone of the question), with filters, relative periods resolved on the server, top N, share of the total and comparison with the previous period or the same period a year before. Reads at most the rows of the installation limit (2,000,000 by default) for a limited time (25 s by default): read.partial says whether the figures cover only part of the rows. Changes nothing. Requires the read_sources permission. On the free plan it needs the organization's own AI key (403 TALK_PLAN_REQUIRED).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
metricstring: count | count_distinct | sum | avg | min | max | median

What is computed. count (default) counts rows, or the non-empty values of field; sum, avg and median need a numeric field; min and max a numeric or date field.

fieldstring | integer

Field measured, by name or index.

group_byarray<string | integer | object>

Up to 2 fields to group by, by name or index, or as {field, bucket}. Date fields are grouped by bucket: hour, day, week (from Monday), month (default), quarter or year.

filtersarray<object>

Conditions that must all hold: {field, op, value}. op: eq (default), not_eq, in (value is a list), gt, gte, lt, lte, cn, cni, sw, swi, ew, ewi or null. A category value written with other capitals or accents is matched to the value of the data, and the answer says so in notes.

whereobject

Advanced filter (QueryTree, as in the queries of instances), combined with filters. left may also be a field name.

periodobject

Period of a date field (by default, the first date field), resolved on the server in the time zone: a preset (today, yesterday, this_week, last_week, this_month, last_month, this_quarter, last_quarter, this_year, last_year, last_7_days, last_30_days, last_90_days, last_12_months or last_N_days, weeks, months or years; this_* runs up to now), last N units (the current one included), or from and to, both included (YYYY, YYYY-Qn, YYYY-MM, YYYY-MM-DD or YYYY-MM-DDTHH:mm).

comparestring: previous_period | previous_year

Compare with the previous period (of the same length; this_* with the same stretch of the previous unit) or with the same period a year before. Needs period. Adds previous, change and change_pct.

orderstring: desc | asc | label | label_desc

desc: largest value first (default); asc; label: by name, or in date order (default when grouping by a date); label_desc.

limitinteger

Groups returned (top N). 50 by default; the maximum is the installation limit (200 by default).

timezonestring

IANA time zone of the question (UTC by default).

Responses

  • 200 The figures as AIR-Core computed them. columns describes each position of rows: the group values (g0, g1; date groups as keys such as 2026-03, 2026-Q1, 2026-03-02 for the week of that Monday), value, and share, previous, change and change_pct when they apply. total has the value over all the rows that match; groups.other adds up the groups not returned (counts and sums). read says how many rows were read and whether the read was partial. explanation says how it was computed, in English.
  • 400 Bad question: BAD_REQUEST, BAD_METRIC, BAD_FIELD (details.fields lists the fields), FIELD_REQUIRED, FIELD_NOT_NUMERIC, TOO_MANY_GROUPS, BAD_FILTER, BAD_PERIOD, DATE_FIELD_REQUIRED, DATE_FIELD_NOT_DATE, BAD_COMPARE, COMPARE_NEEDS_PERIOD, TOO_MANY_GROUP_VALUES or EMPTY_SOURCE, with a message.
  • 401 Invalid authorization
  • 403 No permission, or TALK_PLAN_REQUIRED: on the free plan it needs the organization's own AI key.
  • 404 Workspace or source not found
  • 429 Too many questions in a minute (TOO_MANY_REQUESTS).
  • 503 SOURCE_UNAVAILABLE: the data could not be read now (an external source whose connector does not answer).
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/analyze" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/instances

Queries the instances of a data source

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

selectquerystring

List of features (indexes to fetch). Do not set to get all the features.

wherequerystring

Conditions to match (filter), as a JSON of QueryTree (see schemas for more information)

order_byquerystring

Sorting options. Must be the index of the feature to sort by and 'asc' or 'desc'.

offsetqueryinteger (int32)

Number of instances to skip (if you orderred them)

limitqueryinteger (int32)

Max number of instances to fetch. Do not set or set to -1 to get all the instances.

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/instances" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/instances

Updates a data source.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
replaceboolean

True in order to replace the dataset with the provided data, false in order to append the provided data.

pkstring

Private key (optional) to use to orevent duplicates

date_formatstring

Date formatting to use. ISO by default

dataarray<array<string>>

Data to provide, as a matrix

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/instances" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

DELETE /api/v2/workspace/{workspaceId}/source/{sourceId}/instances

Updates a data source.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Autentication token

wherequerystring

Conditions to match (filter), as a JSON of QueryTree (see schemas for more information)

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/instances" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/external/source/update

Updates an external source, so that its automations run and its cache is cleared. You can include up to 100 instances to analize in the body.

Parameters

NameInTypeDescription
x-public-key requiredheaderstring

External source public key

x-secret-key requiredheaderstring

External source secret key

Request body application/json

array<array<string | number | boolean>>

Responses

  • 200 Normal response.
  • 429 Busy. You will receive this response by trying to update with multiple requests in parallel.
Example
curl -X POST "https://app.air-core.io/api/v2/external/source/update" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/catalog

The catalogue of a data source («Ficha»): what its data mean. The description, the person in charge (steward), tags and provenance (origin and update process written by people, the sources of the workspace it is obtained from, and what AIR-Core knows in computed: kind of origin, automatic updates, parent sources and model). Per field, in the order of the source: description, unit, kind of value (semantic_type), allowed values or range (informative) and its personal data, the one found and chosen in the AI governance (never changed here). ai_withheld lists the texts an AI would not receive because the detector of personal data finds some in them. An AI application connected through MCP (and the built-in assistant) gets it as an AI may see it: never the person in charge nor who saved it, the flagged texts empty and listed in withheld_for_ai, no allowed values nor ranges below the level «aggregates» of the AI data policy, and personal_data as not_sent, pseudonymised or allowed. Needs a token that reads workspaces and permission to read the sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The catalogue (empty values when the source has none)
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or source not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/catalog" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

PUT /api/v2/workspace/{workspaceId}/source/{sourceId}/catalog

Changes the catalogue of a data source. Only the keys sent change: an empty text, null or an empty list clears a value, and null for a field clears its whole entry. fields is an object by field name or a list of entries with name or index. Unknown keys or fields, texts too long and kinds of value that do not exist are refused (400), never cut. provenance.derived_from names other sources of the same workspace. The data of the source and its personal data choices are not changed. Needs a token that writes workspaces and permission to edit the source (or to own it). Answers the catalogue as GET does.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
descriptionstring
stewardstring
tagsarray<string>
provenanceobject
fieldsobject | array<SourceCatalogFieldChange>

By field name ({"importe": {...}}) or a list of entries with name or index ([{"index": 2, ...}])

Responses

  • 200 The catalogue as it is left
  • 400 BAD_REQUEST, UNKNOWN_KEY, UNKNOWN_FIELD (details.fields), BAD_FIELD_ENTRY, BAD_SEMANTIC_TYPE, BAD_RANGE, BAD_DESCRIPTION, BAD_UNIT, BAD_TAGS, BAD_STEWARD, BAD_ORIGIN, BAD_UPDATE_PROCESS, BAD_ALLOWED_VALUES, BAD_DERIVED_FROM or BAD_PROVENANCE
  • 401 Invalid authorization
  • 403 Access denied (ACCESS_DENIED: without permission to edit the source), or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or source not found
Example
curl -X PUT "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/catalog" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/sources/join/suggest

Suggested keys to join a main data source with 1 to 5 other sources of the workspace (for a join of several sources, derived_type join_multi). For each lookup, up to 5 pairs of columns ordered by confidence: by names and types (the join the data advisor proposes, the same name), by the catalogue of both sources when it says something (the same kind of value helps; different kinds of value or units count against and are noted) and by the values in common measured on samples: overlap is the share of the first 1000 rows of the main source whose value is in the lookup (up to 30000 rows of it read, compared as the join compares keys), lookup_unique how unique the column is in the lookup (1: one row per key). suggested is the pair to start with, two pairs when one column alone repeats in the lookup and both together do not. For an AI application connected through MCP below the level «aggregates» of the AI data policy: by names, types and catalogue only, nothing read (measured false). Needs a token that reads workspaces and permission to read the sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Request body application/json

FieldTypeDescription
main requiredstring

Identifier of the main source

lookups requiredarray<string>

Identifiers of the sources to join with it (the same one may repeat)

Responses

  • 200 The suggested keys
  • 400 BAD_REQUEST, NOT_FOUND (a source that is not in the workspace), EXTERNAL (external and real time sources cannot be joined) or TOO_MANY_SOURCES
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/sources/join/suggest" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/join-report

The report of the last run (creation or refresh) of a join of several sources (derived_type join_multi), and a short history of the earlier runs (the last 10 are kept). Per lookup: rows of the main source that found a row in it and that did not (unmatched, with unmatched_empty for empty keys, which never match), the match rate, up to 20 different example keys without a match, rows of the lookup read, keys kept, repeated keys (only the first row of a repeated key is used, rows are never multiplied) with examples, and keys no row used. The names of the sources are the ones they have now. For an AI application connected through MCP, the example keys of key columns with personal data the organization does not share with AI applications are left out (examples_withheld, duplicate_examples_withheld). Needs a token that reads workspaces and permission to read the sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the source made by the join

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The report
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or source not found, or NOT_A_JOIN: the source is not a join of several sources
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/join-report" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/recipe

The recipe of a prepared source («fuente preparada»): its origin (and the origin's columns), the steps (columns named by name), the columns they give, whether they still fit the origin as it is now (check: the first step that does not, and why), the version of the recipe, who changed it and when, and what each step did in the last recomputation (last_report; or the step that failed, when the prepared source kept its previous data). A prepared source is created with POST .../sources/derived (derived_type recipe) and recomputed each time its origin updates; the origin is never changed. An AI application connected through MCP gets the values written in steps about a column with personal data not sent in clear withheld (withheld: true on the step) and, below the level «aggregates» of the AI data policy, no counts of rows. Needs a token that reads workspaces and permission to read the sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the prepared source

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The recipe
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or source not found, or NOT_A_RECIPE: the source is not prepared with a recipe
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/recipe" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/recipe

Replaces the steps of a prepared source (the whole list, in order) and asks for its recomputation from its origin with them (it runs in the background within seconds). The steps are checked first against the columns of the origin as it is now: when one cannot be used nothing is saved and details says which (step from 0, code, column). The origin is not changed. Needs a token that writes workspaces and permission to edit the source (or to own it) and to run tasks. Answers the recipe as GET does.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the prepared source

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
steps requiredarray<RecipeStep>

Responses

  • 200 The recipe as it is left (recipe_version + 1, pending true)
  • 400 RECIPE_STEPS_INVALID, RECIPE_TOO_MANY_STEPS, RECIPE_TOO_LONG, RECIPE_COLUMN_MISSING, RECIPE_COLUMN_EXISTS, RECIPE_STEP_TYPE, RECIPE_STEP_INVALID, RECIPE_EXPRESSION_INVALID (with details: step, op, code, column, message) or ORIGIN_MISSING
  • 401 Invalid authorization
  • 403 Access denied (ACCESS_DENIED: without permission to edit the source and run tasks), or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or source not found, or NOT_A_RECIPE
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/recipe" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/recipe/preview

Tries some steps over the first rows of a source (the origin of a recipe) without saving anything: for each step the columns, the rows in and out, the cells changed (or rows removed), the values left empty and the first resulting rows; error is the first step that cannot be used (the steps before it are given). The first steps, when they are filters, are applied by the storage when the rows are read. Regular expressions run with a time limit (RECIPE_REGEX_TIMEOUT in error). For an AI application connected through MCP: only when the AI data policy lets rows go, each column protected as the strictest rule of the columns of the origin it comes from, and refused (AI_POLICY_PERSONAL_DATA) when a filter, a cleaning of only some rows or a removal of duplicates uses a column with personal data not sent in clear. Needs a token that reads workspaces and permission to read the sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the origin source

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Request body application/json

FieldTypeDescription
stepsarray<RecipeStep>
sampleinteger

Rows of the origin read (default 200, at most 500)

rowsinteger

Rows given after each step (default 10, at most 50)

Responses

  • 200 The preview
  • 400 RECIPE_STEPS_INVALID, RECIPE_TOO_MANY_STEPS, RECIPE_TOO_LONG or EXTERNAL (external and real-time sources cannot be prepared)
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or source not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/recipe/preview" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/text-analysis

«Analizar textos»: what the AI module of this installation offers for texts (available; the tasks, languages, summaries and topics it advertises: gimodeler 0.21, methods.text-annotate, text-summarize, text-topics; with an older AI module everything is unavailable and nothing else changes), the caps of the plan of the organization (limits: texts per analysis, analyses per month, re-application when the data change, entities, topics over time, most topics, own classifiers, texts generative AI labels in one run; -1 = no limit), what it used this month (usage) and whether the labels with generative AI can be used (labels.code GENAI_PLAN_REQUIRED: a paid plan, AI credit or the organization's own AI key). Needs a token that reads workspaces and permission to read the sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 What can be used and the caps of the plan
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Workspace not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/text-analysis" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/text-analysis

The analysis of texts of a source made with POST .../sources/derived (derived_type text_analysis): its origin and column, the tasks, the language, the column of dates, its topics model and text classifiers, the columns it writes, the last run (last_report), whether a run is waiting or running, whether the origin changed and the plan does not apply it by itself (stale), the caps of the plan and the «Resumen del análisis» (overview: texts analysed and skipped by the cap of the plan, languages, sentiment and its evolution by period, keywords, entities, people, topics with their words, share and examples, labels of each classifier, examples of each sentiment, notes). For any other source: analysis: null, whether it can be analysed (can_create) and its columns (text: a column that can be analysed). For an AI application connected through MCP: the figures, keywords, entities and topics (aggregates); the examples and the people only when the AI data policy lets rows go and the analysed column has no personal data held back; at the level «structure», only the settings. Needs a token that reads workspaces and permission to read the sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the source

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The analysis, or what can be analysed in the source
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or source not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/text-analysis" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/text-analysis/reanalyze

«Volver a analizar»: asks for a new run of an analysis of texts now (within seconds, in the background), with the rows its origin has now. It counts as an analysis of the month (TEXT_ANALYSIS_LIMIT, 403, when the plan's are used up). Needs a token that writes workspaces and permission to edit the source (or to own it) and to run tasks. Answers the analysis as GET does (pending true).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the analysis source

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Responses

  • 200 {result: success, analysis, can_edit}
  • 400 NOT_A_TEXT_ANALYSIS
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, TEXT_ANALYSIS_LIMIT (the analyses of the month of the plan are used; details.offer upgrade) or the AI data policy (AI_POLICY_*)
  • 404 Workspace or source not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/text-analysis/reanalyze" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/text-analysis/preview

The analysis of the first rows of a source (at most 20) without writing or counting anything: for each text its language, sentiment (label, value written in the column, score), keywords and entities (entities only when the plan includes them). plan says how many texts a whole analysis would read and whether the cap of the plan would stop it. For an AI application connected through MCP: only when the AI data policy lets rows go, and refused (AI_POLICY_PERSONAL_DATA) when the column has personal data not sent in clear. Needs a token that reads workspaces and permission to read the sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the source

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Request body application/json

FieldTypeDescription
column requiredstring

Name of the column of texts (text or nominal)

tasksarray<string: language | sentiment | keywords | entities | topics>

Default language, sentiment, keywords; topics are found over every text when the analysis runs, never in a preview

languagestring

auto (default) or es, en, ca, de, fr, it, pt, ja, zh

keywords_topinteger
rowsinteger

Responses

  • 200 The preview
  • 400 TEXT_COLUMN_MISSING, TEXT_TASKS_INVALID, TEXT_LANGUAGE_INVALID, EXTERNAL or an error of the AI module (TEXT_ENGINE_BAD_REQUEST)
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or source not found
  • 503 TEXT_ENGINE_OUTDATED (the AI module cannot analyse texts) or TEXT_ENGINE_UNAVAILABLE
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/text-analysis/preview" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/text-analysis/summarize

The sentences that best sum up a group of texts of a source (extractive: sentences of the texts themselves, chosen by the AI module with TextRank; no generative AI): the texts of a sentiment, a topic or a keyword of an analysis of texts, or of a value of a column; at most max_texts texts (the first ones). For an AI application connected through MCP: only when the AI data policy lets rows go, and refused (AI_POLICY_PERSONAL_DATA) when the column (in the source or in the origin of the analysis) has personal data not sent in clear. Needs a token that reads workspaces and permission to read the sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the source (an analysis of texts

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Request body application/json

FieldTypeDescription
columnstring

Name of the column of texts (default: the analysed one)

groupobject

Which texts (none: the first ones of the source)

sentencesinteger

Default 3

max_textsinteger

Default 200

languagestring

auto (the most frequent language of the texts) or a code

Responses

  • 200 {column, group, texts (texts read), sentences: [{text, score}]}
  • 400 TEXT_COLUMN_MISSING, TEXT_GROUP_INVALID (the source has no column for that group), EXTERNAL
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or source not found
  • 503 TEXT_ENGINE_OUTDATED (the AI module cannot summarize texts) or TEXT_ENGINE_UNAVAILABLE
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/text-analysis/summarize" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/rows

Rows of a data source with their row ids (ids, parallel to instances), to edit them in place. For an AI application connected through MCP, rows only when the AI data policy of the organization allows them, with the personal data protected. The routes of /instances do not change.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

wherequerystring

Filter, as a JSON of QueryTree (filter is accepted too)

order_byquerystring

Index of the feature to sort by and 'asc' or 'desc'

selectquerystring

Indexes of the features to return (all by default)

offsetqueryinteger (int32)

Rows to skip

limitqueryinteger (int32)

Rows to return (default 100, at most 500)

Responses

  • 200 The rows
  • 400 INVALID_FILTER
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/rows" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/rows

Edits rows in place, as a spreadsheet: an ordered list of operations (set a cell, insert rows, delete rows by row id), all or nothing, at most 1000 operations or rows. Calculated columns are computed again when their expression only reads values of the row. Needs a token that writes workspaces and permission to edit the source (or to own it) and to run tasks.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
ops requiredarray<object>

Responses

  • 200 Applied ({result: success, applied, inserted: {tempId: rid}, missing, counts, version, instances, calculated?}), or refused with result error and code VALUE, UNIQUE, OPS_LIMIT, LIMIT or STORAGE_OLD
  • 400 OPS (malformed) or NOT_EDITABLE
  • 403 Access denied
  • 409 BUSY: a task or another edit has the source
  • 504 TIMEOUT: nothing was changed
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/rows" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/columns/{feature}/transform

Cleans a column in place (all rows, or those of the filter). With dry_run, only how many cells would change and a sample before and after (nothing is written). The version before the cleaning is kept for 24 hours (it counts in the size of the organization meanwhile) and undo restores it. Operations by type of column: text trim {collapse}, lower, upper, capitalize, replace {find, replace, mode contains|exact, case}, regex_replace {pattern (at most 500 characters), replace, case}, prefix|suffix {text}, fill_empty {value}, to_null {value}, merge_values {values: [{from, to}]} (each cell that is exactly from, same case and spaces, becomes to: the merge of the groups of GET .../columns/{feature}/variants, at most 500 pairs; no to may also be a from; it is one operation with one undo, its preview counts the rows of each value); numbers round {decimals 0-10}, multiply|add {value}, clip {min, max}, abs, fill_empty {value}; dates shift {ms}, fill_empty {value}; booleans invert, fill_empty {value}.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

feature requiredpathinteger

Index of the column

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
op requiredstring: trim | lower | upper | capitalize | replace | regex_replace | prefix | suffix
argsobject

Arguments of the operation

filterQueryTree

Tree used to describe a query. Used in order to query instances of data sources.

dry_runboolean

Only the preview: {changed, sample: [{rid, before, after}]} (at most 20)

Responses

  • 200 {result: success, changed, version, instances, undo, calculated?} (with dry_run: {dry_run: true, changed, sample}); refused with result error and code STORAGE_OLD, VALUE, UNIQUE or LIMIT
  • 400 FEATURE, OP, ARGS, INVALID_FILTER, FILTER, UNSUPPORTED or NOT_EDITABLE
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 409 BUSY
  • 504 TIMEOUT
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/columns/<feature>/transform" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/columns/{feature}/profile

Profile of a column computed by the storage over every row (or those of the filter): rows, nulls, empty texts, distinct values, the 10 most frequent values and min, max and average (numbers; min and max of dates). With duplicates, also how many rows repeat an earlier row (what dedupe would delete).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

feature requiredpathinteger

Index of the column

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

wherequerystring

Filter, as a JSON of QueryTree

duplicatesquerystring

'all' (whole rows) or a JSON list of feature indexes

Responses

  • 200 The profile
  • 400 FEATURE, INVALID_FILTER or UNSUPPORTED (external and real-time sources)
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/columns/<feature>/profile" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/columns/{feature}/variants

«Agrupar variantes», without AI and without credits (free plan too): groups of values of a text column (nominal or text) that are the same thing written differently («Madrid», «madrid », «Mádrid», «Madriz»; «C/ Mayor» and «Calle Mayor»). Values are normalised (case, accents, spaces, punctuation and, with abbreviations, a small list of abbreviations) and compared with a similarity (the mean of Jaro-Winkler and the normalised Levenshtein similarity; texts whose numbers differ never match; texts shorter than 4 characters only match when equal). It works on the DISTINCT values of the column with their counts: the storage says how many there are (distinct, column_profile); up to 200 it counts every one of them (method: histogram, no row is read); with more, only this column is read by streaming (method: stream) up to the rows of the plan (200,000 free, 1,000,000 paid, 2,000,000 without limits; estimated only when not every row was read) and the most frequent values are compared, up to the cap of the plan (2,000 free, 10,000 paid, 20,000 without limits; truncated when the column has more: values of distinct). Each group has its proposed canonical value (the most frequent), its values with their rows and similarity to it, and suggested for those proposed for the merge. merge_args are the arguments of POST .../columns/{feature}/transform with op merge_values that merges the suggested values. For an AI application connected through MCP: refused (AI_POLICY_PERSONAL_DATA) on a column, or with a filter, with personal data it may not see.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

feature requiredpathinteger

Index of the column (nominal or text)

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

thresholdquerynumber

Least similarity to group, from 0.5 to 1 (default 0.85; 1 = only the same normalised form)

abbreviationsqueryboolean

Expand the small list of abbreviations (c/, avda., pza., ctra., ayto., sta.…) before comparing (default true)

wherequerystring

Filter, as a JSON of QueryTree

Responses

  • 200 The groups of variants
  • 400 FEATURE, TYPE (not a text column), ARGS, INVALID_FILTER, UNSUPPORTED (external and real-time sources) or STORAGE_OLD
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/columns/<feature>/variants" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/near-duplicates

«Filas casi duplicadas», without AI and without credits (free plan too): clusters of rows that are almost the same in some columns (the same customer with small differences). Each row is the set of the character 3-grams of the normalised values of those columns (tagged with their column); MinHash with 64 hash functions of fixed seeds (the same answer every time) and LSH banding tuned to the threshold find the candidate pairs, kept when the exact Jaccard similarity of their 3-grams reaches the threshold; every row of a cluster is at the threshold of its first row (a chain ABC with A and C apart does not put C with A). Rows are read in pages with their ids from the first one, up to the cap of the plan (10,000 rows free, 100,000 paid, 200,000 without limits) or max_rows, and for 25 seconds at most: estimated (and stopped: cap or time) when not every row was read. Each cluster has its rows (row id, cells of the compared columns, differs: positions of the cells that differ from the first row, similarity to it) and a QueryTree filter that shows them in a table (null when too long). Nothing is deleted: remove the extra rows with POST .../rows (delete by row id), kept in the version history. For an AI application connected through MCP: rows (the policy must let rows go), refused over columns with personal data it may not see.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

featuresquerystring

Indexes of the columns compared, separated by commas or as a JSON list (default: every column that is not calculated, up to 20)

thresholdquerynumber

Least estimated Jaccard similarity, from 0.5 to 1 (default 0.8)

abbreviationsqueryboolean

Expand the small list of abbreviations before comparing (default true)

max_rowsqueryinteger

Rows to read at most (never more than the cap of the plan)

Responses

  • 200 The clusters of near-duplicate rows
  • 400 FEATURE, ARGS, UNSUPPORTED (external and real-time sources) or STORAGE_OLD
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Not found
  • 429 BUSY: other searches of near duplicates are running
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/near-duplicates" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/dedupe

Removes the rows that repeat the values of some features (whole rows when none are given; nulls equal), keeping the first or the last of each group. With dry_run, only how many rows it would delete. The version before is kept for 24 hours and undo restores it.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
featuresarray<integer>
keepstring: first | last
dry_runboolean

Responses

  • 200 {result: success, deleted, version, instances, undo} (with dry_run: {dry_run: true, deleted}); refused with result error and code STORAGE_OLD or LIMIT
  • 400 FEATURE, ARGS, UNSUPPORTED (CrateDB sources) or NOT_EDITABLE
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 409 BUSY
  • 504 TIMEOUT
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/dedupe" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/undo

Undoes the last cleaning of a column or removal of duplicates: puts back the version kept before it, within 24 hours and while nothing else changed the source (UNDO_GONE otherwise). The current version is deleted.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Responses

  • 200 {result: success, version, instances, undone}
  • 403 Access denied
  • 409 UNDO_GONE or BUSY
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/undo" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/detach

Turns a derived source (filter, join, merge, extend, aggregate, the predictions of a model, a forecast) into an independent stored source: the data stays, its update configuration stops being derived and its parents no longer refresh it. Needs permission to edit the source (or to own it).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Responses

  • 200 {result: success, update_effect: none, detached: {at, derived_type, derived_from, derived_from2, model}}
  • 400 NOT_DERIVED
  • 403 Access denied
  • 409 BUSY
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/detach" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/versions

The version history of the data of the source, the newest first: who made each version, when and how (kind: import, update, delete_rows, update_rows, columns, edit, clean, dedupe, restore, previous), its rows and size, and whether its data is kept (restorable). policy says what the organization keeps: keep (previous versions, 0 = no history), max (of its plan), auto_hours (versions kept for sources that update by themselves; 0 = no limit) and stored (false for sources in a CrateDB database: the history records who and when but keeps no data). Kept versions count in the size of the organization. Needs to read the sources of the workspace.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 {result: success, policy: {keep, max, auto_hours, stored}, kept_size, held_size, held_over_limit, versions: [{version, created, current, restorable, kind, task, authors: [{uid, name}], counts, note, size, instances, held_by, held_names}]}. A version something still needs (a model learned from it, a version of a model, a comparison of methods, a training running) is never deleted: held_by says how many models need it and held_names names them (the first five); it is kept, restorable and counted in held_size whatever the history keeps, and goes away by itself when nothing needs it. held_over_limit: the organization is over its size limit only because of those versions (updates of the data still work).
  • 403 Access denied
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/versions" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/versions/{version}/restore

Restores a kept version of the source: a new version that is a copy of it (its rows and its columns), added to the history as kind restore; nothing is rewritten and the version before stays in the history. Same permission, limits and lock as an edit of the rows (permission to edit the source or to own it, and to run tasks).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

version requiredpathinteger

The version to restore, as the history gives it

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Responses

  • 200 {result: success, version, instances, restored}
  • 400 VERSION or NOT_EDITABLE
  • 403 Access denied, or LIMIT
  • 409 VERSION_GONE (the version is not kept) or BUSY
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/versions/<version>/restore" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/sql/tables

The tables a read-only SQL query can read in a workspace: one per data source, named after it (lower case, no accents, _ between words, unique), with its columns (name as SQL sees it, sql as a query writes it, the field it comes from and its type); the caps of the plan of the organization; and the functions a query may call. Reads no rows. For people with a token that reads workspaces and permission to read the sources of the workspace; AI applications connected through MCP, MCP clients and the assistant get 403 SQL_NOT_FOR_AI_APPS.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The tables, the caps and the functions
  • 401 Invalid authorization
  • 403 ACCESS_DENIED (the token does not read workspaces) or SQL_NOT_FOR_AI_APPS
  • 404 Workspace not found, or no permission to read its sources
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/sql/tables" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/sql

Runs a read-only SQL query (SQLite dialect) over one or several data sources of the workspace and answers a page of its result, or the whole result as CSV with format: csv. One statement that starts with SELECT, WITH or VALUES; never ATTACH, PRAGMA, writes, extensions, the internals of SQLite, parameters or functions outside the allowed list (see GET .../sql/tables). The tables are the ones of GET .../sql/tables; sources gives a source of this workspace another table name (a source of another workspace or organization is refused, SQL_UNKNOWN_SOURCE, without reading it). Only the tables and columns the query names are read, up to the caps of the plan: a read cut by a cap says so in read.partial. The query runs in a process of its own, stopped at the time or memory limit of the plan (SQL_TIMEOUT, SQL_MEMORY_LIMIT). One query at a time per person. For people with a token that reads workspaces and permission to read the sources of the workspace (the same rows and columns they see on the page of each source); AI applications connected through MCP, MCP clients and the assistant get 403 SQL_NOT_FOR_AI_APPS.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Request body application/json

FieldTypeDescription
sql requiredstring

The query (at most 20000 characters)

sourcesobject | array<object>

Optional table names of your own for sources of this workspace: {alias: sourceId} or [{alias, source}] (letters, digits and _, not a keyword, at most 20)

offsetinteger

Rows of the result to skip (default 0)

limitinteger

Rows of the page (default 100, at most max_page_rows of the plan)

formatstring: json | csv

csv: the whole result as a CSV file

Responses

  • 200 A page of the result (JSON), or the whole result as CSV (UTF-8 with a byte order mark, at most `max_result_rows` of the plan) with format csv
  • 400 The query is refused or fails, with its place in the text when known: SQL_EMPTY, SQL_TOO_LONG, SQL_SYNTAX, SQL_MULTIPLE_STATEMENTS, SQL_NOT_A_QUERY, SQL_NOT_READ_ONLY, SQL_FORBIDDEN_STATEMENT, SQL_FORBIDDEN_NAME, SQL_FUNCTION_NOT_ALLOWED, SQL_PARAMETERS, SQL_UNKNOWN_TABLE, SQL_UNKNOWN_COLUMN, SQL_UNKNOWN_FUNCTION, SQL_ERROR, SQL_BAD_ALIAS, SQL_BAD_SOURCES, SQL_TOO_MANY_SOURCES, SQL_TOO_MANY_COLUMNS, SQL_TIMEOUT or SQL_MEMORY_LIMIT
  • 401 Invalid authorization
  • 403 ACCESS_DENIED (the token does not read workspaces) or SQL_NOT_FOR_AI_APPS
  • 404 Workspace not found, no permission to read its sources, or SQL_UNKNOWN_SOURCE (an alias names a source that is not in this workspace)
  • 429 SQL_BUSY (a query of the same person, or too many of the server, are running) or TOO_MANY_REQUESTS (30 queries per minute)
  • 503 SOURCE_UNAVAILABLE: the data of a table could not be read right now
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/sql" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/sql/source

Saves a read-only SQL query as a new derived data source (type sql) that is computed again whenever one of the sources it reads changes. The query is checked and prepared (its columns are known without reading any row); every table must be a stored source of the workspace and their rows must fit the cap of the plan, because a saved query reads them whole. Each run checks again that its owner can read the sources of the workspace, the query, the caps of the current plan and its columns. Answers the task that creates the source. Needs a token that writes workspaces, permission to read the sources and to create sources and tasks; AI applications connected through MCP, MCP clients and the assistant get 403 SQL_NOT_FOR_AI_APPS.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
sql requiredstring

The query (see SqlQuery)

sourcesobject | array<object>

Optional table names of your own for sources of this workspace, as in SqlQuery; they are kept with the saved query

name requiredstring

Name of the new source (1 to 120 characters)

descriptionstring

At most 300 characters

Responses

  • 200 The task that creates the source
  • 400 BAD_NAME, BAD_DESCRIPTION, SQL_NO_TABLES, EXTERNAL, SQL_TOO_MANY_ROWS or any refusal of the query (see POST .../sql)
  • 401 Invalid authorization
  • 403 ACCESS_DENIED (the token does not write workspaces, or no permission to create sources and tasks), LIMIT (plan) or SQL_NOT_FOR_AI_APPS
  • 404 Workspace not found, no permission to read its sources, or SQL_UNKNOWN_SOURCE
  • 429 SQL_BUSY or TOO_MANY_REQUESTS
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/sql/source" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/quality/rules

The data quality rules of a source («Calidad»): per column (not_empty, unique, range, allowed_values, pattern, not_future) or on the source (row_count, freshness), each with its severity (warning or error) and whether it is enabled. A rule names its field by name; index is its position now (-1 and missing: true when the field is gone: the rule then fails). With suggestions=true, the rules AIR-Core suggests from the catalogue of the source, the statistics of its columns, the names of the columns and its automatic updates, each with its reason (nothing is saved until they are sent with PUT). An AI application connected through MCP gets the rules without the values they hold (allowed values, bounds, the text of a pattern) below the level «aggregates» of the AI data policy, or for a field with personal data not allowed (withheld_for_ai). Needs a token that reads workspaces and permission to read the sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

suggestionsquerystring: true | false

true: adds the suggested rules

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The rules
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or source not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/quality/rules" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

PUT /api/v2/workspace/{workspaceId}/source/{sourceId}/quality/rules

Replaces the quality rules of a source with the list sent (an empty list removes them) and checks them now: the answer waits up to 20 seconds for the check (checking: true when it goes on in the background). A rule keeps its id when it sends one of the current list (its history and its alerts follow it); the other ones get a new id. Up to 30 rules. Refused (400), never cut: an unknown kind, key or parameter, a field that does not exist or of a type the kind does not apply to, invalid parameters or a repeated rule. alert turns the quality alert of the source on or off, with a threshold of the score (needs permission to edit the workspace). External and real-time sources cannot have rules (UNSUPPORTED_SOURCE). Needs a token that writes workspaces and permission to edit the source (or to own it). Answers the report as GET .../quality does.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
rulesarray<QualityRule>

The whole list: it replaces the current one

checkboolean

Check them now (default true)

alertobject

The quality alert of the source: on or off, and the score under which it also fires (0: only when a rule breaks)

Responses

  • 200 The report of the source with its new rules
  • 400 BAD_REQUEST, TOO_MANY_RULES, UNKNOWN_KEY, UNKNOWN_KIND, UNKNOWN_FIELD, FIELD_TYPE, BAD_SEVERITY, BAD_PARAMS, DUPLICATE_RULE (details.rule: its position), BAD_THRESHOLD or UNSUPPORTED_SOURCE
  • 401 Invalid authorization
  • 403 Access denied (ACCESS_DENIED: without permission to edit the source, or the workspace for `alert`), or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or source not found
Example
curl -X PUT "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/quality/rules" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/quality

The quality report of a source: its rules, the last check (when, why, the score from 0 to 100 and its status, the rows, and per rule its status pass, fail or unknown with the rows that break it, their share, whether the count is an estimate and some failing values for patterns and unique values), whether the data changed after it (stale; the watcher checks them again after each update) and the history of the score. Rules never checked yet are checked now. Score: each rule weighs 3 (error) or 1 (warning); a rule that passes counts fully, one on rows that fails counts at most half its weight, less the more rows break it (0.5 × (1 − share)), one on the source that fails or whose field is gone counts nothing; rules that could not be checked are left out; score = round(100 × Σ weight × value / Σ weight). Every rule is counted by the storage over all the rows (one scan for all of them); a pattern the storage cannot test (a preset or a regular expression) is checked on a sample of up to 2000 non-empty values spread over the source, and its count is an estimate unless the sample held them all. An AI application connected through MCP needs the level «aggregates» and gets the failing values only when rows may go, never the filter of the failing rows. Needs a token that reads workspaces and permission to read the sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The report (report null when there are no rules)
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or source not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/quality" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/quality/check

Checks the quality rules of a source now (the answer waits up to 20 seconds; checking: true when the check goes on in the background). Asked again within 15 seconds with nothing changed, it answers the last check. Needs a token that writes workspaces and permission to edit the source (or to own it). Answers the report as GET .../quality does.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the data source

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Responses

  • 200 The report
  • 400 UNSUPPORTED_SOURCE (external and real-time sources)
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or source not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/quality/check" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/quality

The quality score of each source of a workspace that has rules: score (null before its first check), status (ok, warning, error, unknown, or pending before its first check), when it was checked and how many rules it has. Needs a token that reads workspaces and permission to read the sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The scores, by source id
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/quality" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

metrics

Metrics API. The metric dictionary of a workspace (each metric defined once), their values with why they changed, unusual values, targets, automations and the briefing of the metrics each person follows.

GET /api/v2/workspace/{workspaceId}/metrics

The metric dictionary of the workspace (its semantic layer): each metric with its exact calculation, whether the user follows it and its last value. Needs read_sources.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 The metrics
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/metrics" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/metrics

Creates a metric, checked against its source (fields that exist, numbers for sums and averages; category values are matched as the data write them and noted in notes). Needs view_create and a token that can write. Each change keeps a version.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
name requiredstring
descriptionstring
source requiredstring
definitionMetricDefinition

The calculation of a metric: a question of the engine of «Habla con tus datos», with the fields by name.

date_fieldstring
periodstring: day | week | month | quarter | year
bucketstring: hour | day | week | month
unitstring
formatstring: number | integer | currency | percent
decimalsinteger
directionstring: up | down | none

up: more is better; down: more is worse

synonymsarray<string>
dimensionsarray<string>
forecaststring

Model of «Predict the future»

sensitivitystring: low | medium | high
ownerstring

Responses

  • 200 The metric created
  • 400 The definition does not run on the source (BAD_FIELD, FIELD_NOT_NUMERIC, BAD_METRIC, BAD_FILTER, DATE_FIELD_NOT_DATE, BAD_DIMENSION)
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
  • 409 A metric with that name exists (NAME_TAKEN)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/metrics" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/metrics/suggestions

Metrics the sources of the workspace suggest from their fields, without AI (the number of records, totals of amounts, averages of levels).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

sourcequerystring

Only this source

Responses

  • 200 The suggestions
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/metrics/suggestions" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/metrics/{metricId}

A metric with its targets, versions (who changed what), notices, unusual values found and the forecasts of its source. With value=true, also its value now (value, as /value).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

metricId requiredpathstring

Identifier of the metric

x-auth-token requiredheaderstring

Autentication token

timezonequerystring

IANA time zone of the user (default Europe/Madrid)

valuequeryboolean

Responses

  • 200 The metric
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/metrics/<metricId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/metrics/{metricId}

Changes a metric (what is not sent stays). A new version records who changed what. Needs view_edit or being its owner.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

metricId requiredpathstring

Identifier of the metric

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
name requiredstring
descriptionstring
source requiredstring
definitionMetricDefinition

The calculation of a metric: a question of the engine of «Habla con tus datos», with the fields by name.

date_fieldstring
periodstring: day | week | month | quarter | year
bucketstring: hour | day | week | month
unitstring
formatstring: number | integer | currency | percent
decimalsinteger
directionstring: up | down | none

up: more is better; down: more is worse

synonymsarray<string>
dimensionsarray<string>
forecaststring

Model of «Predict the future»

sensitivitystring: low | medium | high
ownerstring

Responses

  • 200 The metric, with `changes`
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/metrics/<metricId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

DELETE /api/v2/workspace/{workspaceId}/metrics/{metricId}

Deletes a metric with its targets, unusual values, follows and notices. Needs view_delete or being its owner.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

metricId requiredpathstring

Identifier of the metric

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Deleted
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>/metrics/<metricId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/metrics/{metricId}/value

The value of a metric now, computed by AIR-Core over all the rows: against the previous period (same stretch), its series with the usual range of each point, trend, unusual values (each point against its own history: median/MAD, with its weekly or yearly pattern when it has one), targets with their projection, forecast (when a model of «Predict the future» computes the same figure) and why it changed (why).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

metricId requiredpathstring

Identifier of the metric

x-auth-token requiredheaderstring

Autentication token

timezonequerystring

IANA time zone of the user (default Europe/Madrid)

Responses

  • 200 The card of the metric
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/metrics/<metricId>/value" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/metrics/{metricId}/explain

Why a metric changed, computed exactly by AIR-Core: for each dimension the change of each group and the share of the total change it explains (sums and counts add up exactly; averages split into mix and rate). Without a body: the current period against the previous one. With from/to (and ref_from/ref_to): those periods. With anomaly: one point of the series against the one before or, with season, one season before.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

metricId requiredpathstring

Identifier of the metric

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
fromstring
tostring
ref_fromstring
ref_tostring
anomalystring

Key of a point (2026-10-31, 2026-10)

seasoninteger
dimensionsarray<string>
timezonestring

Responses

  • 200 The contribution analysis
  • 400 NO_DIMENSIONS, DATE_FIELD_REQUIRED, BAD_POINT
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/metrics/<metricId>/explain" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/metrics/{metricId}/follow

Follows (or, with follow: false, stops following) a metric: it goes into the user's daily or weekly briefing; with notify, its unusual values reach them by email at once. Following does not start any email of the briefing: the briefing by email is off until the user turns it on (email in /briefing/preferences); briefing_email in the answer says whether it is on.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

metricId requiredpathstring

Identifier of the metric

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
followboolean
notifyboolean
timezonestring

Responses

  • 200 Whether the user follows it
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/metrics/<metricId>/follow" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/metrics/{metricId}/targets

Replaces the targets of a metric: one per period kind (every week, month, quarter or year) or for one period in particular (period_key: 2026-11, 2026-Q4, 2026, the Monday of a week).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

metricId requiredpathstring

Identifier of the metric

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
targetsarray<object>

Responses

  • 200 The targets
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/metrics/<metricId>/targets" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/metrics/{metricId}/dashboard

Adds the metric to a dashboard (or a new one) as a key figure over the last days of its period.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

metricId requiredpathstring

Identifier of the metric

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
dashboardstring
dashboard_namestring

Responses

  • 200 The dashboard and the visualization
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/metrics/<metricId>/dashboard" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/briefing

The briefing of the metrics the user follows, computed now: a card per metric (as /value) and narrative, two or three sentences from a template (summaries by AI are made by the daily or weekly briefing where AI is allowed: paid plans, or the free plan with AI credit or its own key; the model only sees aggregated figures, never rows).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

timezonequerystring

IANA time zone of the user (default Europe/Madrid)

Responses

  • 200 The briefing
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/briefing" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/briefing/preferences

When the user receives the briefing: frequency (daily, weekly, off), timezone, hour, weekday (1 Monday … 7 Sunday), email, ai. The briefing by email is off until the user turns it on (email: false by default); without it the briefing is only computed when it is opened.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

timezonequerystring

IANA time zone of the user (default Europe/Madrid)

Responses

  • 200 The preferences
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/briefing/preferences" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/briefing/preferences

Changes when the user receives the briefing. It is sent once per day or ISO week of their calendar, from that hour in their time zone.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
frequencystring: daily | weekly | off
timezonestring
hourinteger
weekdayinteger
emailboolean
aiboolean

Responses

  • 200 The preferences
  • 401 Invalid authorization
  • 403 The token or the user lacks the permission (ACCESS_DENIED), or a limit (LIMIT)
  • 404 Workspace, metric or its source not found (NOT_FOUND, SOURCE_NOT_FOUND)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/briefing/preferences" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

models

Models API. Models allow you to use artificial intelligence algorithms to analyze your data and extract knowledge from it.

GET /api/v2/workspace/{workspaceId}/topics-model/{modelId}

A topics model (model type topics: made by an analysis of texts with the task topics, or by the goal «Temas en textos» of the model wizard): its column of texts and of dates, language, method, number of topics and each topic with the name people gave it (or its first words), its words with their weight, its texts and its share; with a column of dates, the share of each topic by period (prevalence). Needs a token that reads workspaces and permission to read the models.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the topics model

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The topics model
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace not found, or NOT_FOUND: not a topics model of the workspace
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/topics-model/<modelId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/models/methods

Lists the methods that can be used to create models in this installation, by type of model and in the recommended order (the first ones are good defaults). They depend on the version of the AI module: source is 'ai-module' when the module advertises them and 'default' when it does not (an earlier module, or one that cannot be reached right now), and then they are the usual ones. Any valid token can call it, also one limited to a workspace.

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response.
  • 401 Invalid authorization
Example
curl -X GET "https://app.air-core.io/api/v2/models/methods" \
  -H "x-auth-token: $AIRCORE_TOKEN"

GET /api/v2/workspace/{workspaceId}/models

Lists the models of a workspace

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

pagequeryinteger (int32)

Requested page (starts with 0)

limitqueryinteger (int32)

Max number of items per page (max 500)

Responses

  • 200 Normal response. Paginated result.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/models

Creates a new artificial intelligence model. This may require advanced knowledge if you want to use specific configurations. Please refer to AIR-Core documentation on how to create models using this API.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Model name (max 80 characters)

descriptionstring

Model description (max 300 characters)

typestring: classifier | regressor | clustering | outlier

Model type: 'classifier' (nominal or logic target) and 'regressor' (numeric target) are supervised; 'clustering' and 'outlier' (anomaly detection) are unsupervised (target is ignored, but it must be a valid index).

methodstring: forest | hist-gradient | xgboost | lightgbm | gradient | extra-trees | logistic | linear

Method to build the model with. The methods offered depend on the version of the AI module of the installation: GET /api/v2/models/methods lists them by type, in the recommended order. With an AI module that does not advertise them they are: classifier 'bayes', 'forest', 'gradient', 'logistic', 'mlp', 'neighbors', 'sv', 'tree' and 'xgb'; regressor 'forest', 'gradient', 'linear', 'mlp', 'neighbors', 'sv', 'tree' and 'xgb'; clustering 'dbscan' and 'kmeans'; outlier 'elliptic-envelope', 'isolation-forest' and 'one-class-svm'. An AI module that advertises them (gimodeler 0.14) may add 'hist-gradient' (histogram-based gradient boosting, handles missing values), 'xgboost' (XGBoost gradient boosting; 'xgb' is XGBoost's random forest mode), 'lightgbm', 'extra-trees' and 'rgf' (classifier and regressor), 'multinomial-nb' and 'complement-nb' (classifier; non-negative inputs only), 'ridge', 'lasso' and 'elastic-net' (regressor), 'gaussianmixture', 'agglomerative' and 'spectral' (clustering) and 'local-outlier-factor' (outlier), and leave out a method whose library is not installed. A known method the AI module does not offer is refused with 400 METHOD_NOT_AVAILABLE, and an unknown one with 400 UNKNOWN_METHOD; the message lists the methods available.

sourcestring

Identifier of the source to use for training.

targetinteger (int32)

Index of the feature to use as target (if applicable).

configurationobject

Dictionary of configuration attributes for the model (Advanced).

training_configurationobject

Training configuration (if applicable).

second_attemptboolean

Quality guarantee (classifiers and regressors). When the trained model is not better than the naive prediction (always answering the most frequent class, or always predicting the mean), AIR-Core trains a few other methods with their default settings on the same data (2 on the free plan, 3 on the paid ones, inside the same task and its time) and keeps the best one that beats it; the model then has that method, and quality.second_attempt of the model says what happened. false always keeps the method asked for. Default: true.

hyper_search_configurationobject

Hyperparameter search (advanced). {"auto": true} searches a small grid of the main settings of the method with 3-fold cross-validation (settings fixed in configuration are not searched); the chosen values are returned in the evaluation of the model (hyperparameters). Otherwise a gimodeler search configuration: method (grid or random), cv, shuffle, random_state, number_models and grid.estimator (lists of values per setting).

inputsarray<integer (int32)>

Optional: the columns the model learns from, as indexes of the training source (the target cannot be one of them; repetitions are refused). Without it, every column but the target, as always. Only for 'classifier', 'regressor', 'clustering' and 'outlier', and only with an AI module that trains on chosen columns (gimodeler 0.19 or later; GET /api/v2/models/methods says so in inputs). The model keeps them in configuration.inputs: inputs of the model, predict, batch-predict, predict-1d, apply and the explanations then take exactly these columns, in the order of the source. A list with every column but the target is the same as leaving it out. With nlp_config.text_attribute, the column of text must be one of them. Errors (400): BAD_INPUTS (not a list of indexes, empty or repeated), INPUT_NOT_FOUND, INPUT_IS_TARGET, INPUTS_NOT_SUPPORTED (another type of model), INPUTS_WITHOUT_TEXT and INPUTS_NOT_AVAILABLE (the AI module of the installation cannot yet; nothing is created).

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/models" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/models/{modelId}

Gets the information about a model (attributes, metrics, etc).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/models/{modelId}

Modifies the name and description of a model

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Model name (max 80 characters)

descriptionstring

Model description (max 300 characters)

Responses

  • 200 Normal response
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

DELETE /api/v2/workspace/{workspaceId}/models/{modelId}

Deletes a model.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/models/{modelId}/dependents

Dependency map of a model, to check before deleting it. sources, the sources made with its predictions (from is the source it was applied to), and dashboards, the dashboards with widgets of the model. Up to 50 of each; more counts the rest. Groups the user of the token cannot read keep their count, with hidden: true and no items.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/dependents" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/models/{modelId}/evaluation

Gets the evaluation of a model.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/evaluation" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/models/{modelId}/predict

Uses a model to predict a value given the inputs.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

inputs requiredquerystring

Input values given as JSON array. Example: [0.2, 0.1, -0.5, 0.9]

Responses

  • 200 Normal response
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
  • 500 Internal server error or model error.
  • 501 The model does not support prediction.
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/predict" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/models/{modelId}/batch-predict

Uses a model to predict a value given the inputs.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
dataarray<object>

Array of instances to predict. Max 25 instances in a single request.

Responses

  • 200 Normal response
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
  • 500 Internal server error or model error.
  • 501 The model does not support prediction.
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/batch-predict" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/models/{modelId}/apply

Applies a model to a source: a task creates a new source with the rows of the source and a column with the prediction of each row. Without mapping, each input of the model takes the column of the source with the same name (case-insensitive).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
source requiredstring

Identifier of the source with the data to predict (not external or real-time).

name requiredstring

Name of the new source (max 120 characters).

mappingarray<integer>

Optional. Column index of the source for each input of the model, in the order of the model inputs (all its fields but the target).

Responses

  • 200 Task created; poll GET /workspace/{workspaceId}/task/{taskId}: its result is the ID of the new source.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied or plan limit
  • 404 Workspace, model or source not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/apply" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/models/{modelId}/predict-1d

Unidimensional predict. Keep all the input variables with the same value and vary one of them.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
inputsarray<number>

Array of input values to provide the model with. You must provide the variable you want to vary, event it is not used, to keep the order of the variables.

varyinteger (int32)

Index of the input variable you want to vary

valuesarray<number>

Array of values for the input variable you want to vary. You must provide at least one value. Max values in a single request are 255.

Responses

  • 200 Normal response
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
  • 500 Internal server error or model error.
  • 501 The model does not support prediction.
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/predict-1d" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/models/{modelId}/explanation

Global explanation of a classification or regression model: weight of each input in its predictions (mean absolute SHAP value over a sample of the training data). Computed by the explainability module; cached until the model changes. Requires the model_use permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

langquerystring: es | en

Language of the text: es or en

storedqueryboolean

Only what is already stored: true answers the stored explanation for this version of the model, or 204 when there is none. Explanations are kept per model version (also those computed after training); the explainability module is never called.

Responses

  • 200 Normal response
  • 204 No explanation stored yet (only with stored=true)
  • 401 Error
  • 403 ACCESS_DENIED, or XAI_DISABLED: the explainability module is not enabled for the organization of the workspace (it is enabled per organization by a global administrator)
  • 404 Error
  • 422 XAI_UNSUPPORTED: the model type cannot be explained (only classifiers and regressors) or its training data no longer exists
  • 503 XAI_UNAVAILABLE: the explainability module is not enabled or not available
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/explanation" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/models/{modelId}/explanation/prediction

Explains one prediction: contribution of each input value (SHAP). For classifiers it explains the predicted class. Requires the model_use permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
inputs requiredarray<object>

Input values, in the order of the model inputs (all model fields except the target)

langstring: es | en

Responses

  • 200 Normal response
  • 400 Error
  • 401 Error
  • 403 ACCESS_DENIED, or XAI_DISABLED: the explainability module is not enabled for the organization of the workspace (it is enabled per organization by a global administrator)
  • 404 Error
  • 422 XAI_UNSUPPORTED
  • 503 XAI_UNAVAILABLE
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/explanation/prediction" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/models/{modelId}/explanation/rules

Rules that describe what a classification or regression model predicts («if … then …»; for regressors, ranges of the value), learned from its predictions over a random sample of up to 1000 rows of its training data (the same rows every time), with the coverage and precision of each rule and the fidelity of the rule list to the model. Computed by the explainability module; cached until the model changes. Requires the model_use permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

langquerystring: es | en

Language of the text: es or en

storedqueryboolean

Only what is already stored: true answers the stored explanation for this version of the model, or 204 when there is none. Explanations are kept per model version (also those computed after training); the explainability module is never called.

Responses

  • 200 Normal response
  • 204 No explanation stored yet (only with stored=true)
  • 401 Error
  • 403 ACCESS_DENIED, or XAI_DISABLED: the explainability module is not enabled for the organization of the workspace (it is enabled per organization by a global administrator)
  • 404 NOT_FOUND: the workspace or the model was not found
  • 422 XAI_UNSUPPORTED: only classifiers and regressors are supported, or the training data of the model no longer exists
  • 429 TOO_MANY_REQUESTS: too many explanation requests; wait a minute
  • 503 XAI_UNAVAILABLE: the explainability module is not enabled or not available
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/explanation/rules" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/models/{modelId}/explanation/prototypes

Representative cases (prototypes) of a random sample of up to 1000 rows of the training data of a model (the same rows every time), overall and per group: per class (classifiers), range (regressors), cluster (clustering) or anomaly / normal (anomaly detection), with how each group differs from the whole. The values of the cases are rows of the training source: they are left out (rows_hidden: true) unless the user has the read_sources permission in the workspace. Cached until the model changes. Requires the model_use permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

langquerystring: es | en

Language of the text: es or en

storedqueryboolean

Only what is already stored: true answers the stored explanation for this version of the model, or 204 when there is none. Explanations are kept per model version (also those computed after training); the explainability module is never called.

Responses

  • 200 Normal response
  • 204 No explanation stored yet (only with stored=true)
  • 401 Error
  • 403 ACCESS_DENIED, or XAI_DISABLED: the explainability module is not enabled for the organization of the workspace (it is enabled per organization by a global administrator)
  • 404 NOT_FOUND: the workspace or the model was not found
  • 422 XAI_UNSUPPORTED: only classifiers, regressors, clustering and anomaly detection models are supported, or the training data of the model no longer exists
  • 429 TOO_MANY_REQUESTS: too many explanation requests; wait a minute
  • 503 XAI_UNAVAILABLE: the explainability module is not enabled or not available
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/explanation/prototypes" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/models/{modelId}/explanation/counterfactuals

Counterfactual explanation of one case: the smallest changes of its input values that would make the model give the desired class (classifiers) or a value in the desired range (regressors), keeping the locked inputs. Up to 5 alternatives, each verified with the model. Requires the model_use permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
inputs requiredarray<object>

Input values, in the order of the model inputs (all model fields except the target)

lockedarray<string>

Names of inputs that may not change

desired_classobject

Classifiers: the wanted class (optional; any other class by default)

desired_rangeobject

Regressors (required): the wanted range of the prediction; null for no bound, at least one bound

countinteger

Alternatives to find

langstring: es | en

Responses

  • 200 Normal response
  • 400 BAD_INPUTS: the input values, the locked inputs or the desired class or range are not valid
  • 401 Error
  • 403 ACCESS_DENIED, or XAI_DISABLED: the explainability module is not enabled for the organization of the workspace (it is enabled per organization by a global administrator)
  • 404 NOT_FOUND: the workspace or the model was not found
  • 422 XAI_UNSUPPORTED: only classifiers and regressors are supported, or the training data of the model no longer exists
  • 429 TOO_MANY_REQUESTS: too many explanation requests; wait a minute
  • 503 XAI_UNAVAILABLE: the explainability module is not enabled or not available
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/explanation/counterfactuals" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/models/{modelId}/explanation/compare

Where two models of the same workspace disagree (interpretable model differencing): share of disagreement over a random sample of up to 1000 rows of the training data of the first model, and regions of the inputs, as readable conditions, where they differ most. Both models must be classifiers or both regressors, with the same inputs. Cached until either model changes. Requires the model_use permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

other requiredquerystring

Identifier of the other model, of the same workspace

langquerystring: es | en

Language of the text: es or en

storedqueryboolean

Only what is already stored: true answers the stored comparison (with other, that one; without other, the one stored last for this version of the model, whose other_model says which) or 204 when there is none. The explainability module is never called.

Responses

  • 200 Normal response
  • 204 No explanation stored yet (only with stored=true)
  • 401 Error
  • 403 ACCESS_DENIED, or XAI_DISABLED: the explainability module is not enabled for the organization of the workspace (it is enabled per organization by a global administrator)
  • 404 NOT_FOUND: the workspace or the model was not found, or `other` is not a model of the workspace
  • 422 XAI_UNSUPPORTED: the models are not both classifiers or both regressors, do not have the same inputs, or the training data no longer exists
  • 429 TOO_MANY_REQUESTS: too many explanation requests; wait a minute
  • 503 XAI_UNAVAILABLE: the explainability module is not enabled or not available
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/explanation/compare" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/models/{modelId}/explanation/forecast

What weighs in a forecast (a model of type forecast): which past periods of a series move most what it forecasts for the next periods. The explainability module treats the forecast as a black box and forecasts again from perturbed copies of the last periods (through the AI module, gimodeler 0.17 or later) with three methods ported from IBM AIX360: TS-Saliency (integrated gradients estimated by Monte Carlo), TS-LIME (a local linear surrogate) and TS-ICE (how the forecast changes when the values of one stretch go up or down), combined in equal parts. When the chosen method is naive or seasonal naive the explanation is exact and nothing is computed. Cached until the forecast is trained again. Requires the model_use permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

seriesquerystring

The series to explain (its value of the series field); the first one when left out

langquerystring: es | en

Language of the text: es or en

storedqueryboolean

Only what is already stored: true answers the stored explanation for this version of the model, or 204 when there is none. Explanations are kept per model version (also those computed after training); the explainability module is never called.

Responses

  • 200 Normal response
  • 204 No explanation stored yet (only with stored=true)
  • 401 Error
  • 403 ACCESS_DENIED, or XAI_DISABLED: the explainability module is not enabled for the organization of the workspace (it is enabled per organization by a global administrator)
  • 404 NOT_FOUND: the workspace, the model or the series was not found
  • 409 FORECAST_NOT_READY: the forecast is still being trained
  • 422 XAI_UNSUPPORTED: the model is not a forecast, or the AI module cannot forecast from a window (gimodeler before 0.17)
  • 429 TOO_MANY_REQUESTS: too many explanation requests; wait a minute
  • 503 XAI_UNAVAILABLE: the explainability module is not enabled or not available
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/explanation/forecast" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/models/{modelId}/explanation/effects

Effect of each input of a classification or regression model: one curve per input (ranges of numbers and dates, the 20 most frequent categories and «Otros») and up to 3 pairs of inputs that act together, from an Explainable Boosting Machine (InterpretML) fitted to the predictions of the model over a random sample of up to 2000 rows of its training data, with its fidelity on rows it did not see (accuracy for classification, R² for regression). For a classifier one class is explained against the rest and the effects are percentage points of its probability; for a regressor, units of the target. Computed by the explainability module; cached until the model changes. Requires the model_use permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

classquerystring

Classification: the class explained against the rest. By default the positive class of a binary task (1, true, yes, sí…) or, otherwise, the class the model predicts least often among those it predicts for at least 5 % of the rows.

langquerystring: es | en

Language of the text: es or en

storedqueryboolean

Only what is already stored: true answers the stored explanation for this version of the model, or 204 when there is none. Explanations are kept per model version (also those computed after training); the explainability module is never called.

Responses

  • 200 Normal response
  • 204 No explanation stored yet (only with stored=true)
  • 401 Error
  • 403 ACCESS_DENIED, or XAI_DISABLED: the explainability module is not enabled for the organization of the workspace (it is enabled per organization by a global administrator)
  • 404 NOT_FOUND: the workspace or the model was not found
  • 422 XAI_UNSUPPORTED: only classifiers and regressors are supported, the model does not predict the class asked for (or too few rows of it), or the training data of the model no longer exists
  • 429 TOO_MANY_REQUESTS: too many explanation requests; wait a minute
  • 503 XAI_UNAVAILABLE: the explainability module is not enabled or not available
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/explanation/effects" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/models/{modelId}/explanation/fairness

Bias audit (group fairness) of a classification or regression model by a sensitive field of a source (by default its training source): over a random sample of up to 5000 rows, the predictions of the model are compared with the real value of the target per group of the field (categories, or readable ranges for numbers). The field need not be an input of the model: a model that does not use it can still treat its groups differently through other inputs (indirect bias). Groups with fewer than 30 rows are reported with small: true and left out of the gaps. Verdict: concern with any flag of severity high, review with any warning (or fewer than two groups to compare), ok otherwise; the thresholds are documented in the explainability module (disparate impact below 0.8 is a warning and below 0.6 high; gaps of rates of 0.1 a warning and 0.2 high; a ratio of mean errors of 1.25 a warning and 1.5 high). Cached for an hour per model, source version, field and class. Requires the model_use and read_sources permissions.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
sensitivestring

Name of the sensitive field in the source (required unless stored is true)

sourcestring

Identifier of a source of the workspace with the inputs and the target of the model (by name); the training source by default

favorablestring

Classification: the favorable class. By default the positive class of a binary task or, otherwise, the least frequent real class among those with at least 5 % of the rows.

langstring: es | en
storedboolean

Only what is already stored: true answers the stored audit (with sensitive, that one; without it, the one stored last for this version of the model while its source has not changed) or 204 when there is none. The explainability module is never called.

Responses

  • 200 Normal response
  • 204 No explanation stored yet (only with stored=true)
  • 400 BAD_SENSITIVE: the sensitive field is missing, not in the source or the target of the model; BAD_CLASS: the favorable class is not one value; MODEL_NOT_SUPPORTED: only classifiers and regressors can be audited
  • 401 Error
  • 403 ACCESS_DENIED (the audit reads the rows of a source: it needs read_sources), XAI_DISABLED, or a refusal of the AI data policy for an AI application connected through MCP (the groups are values of the field: never sent refuses the audit, pseudonymised gives them as tokens)
  • 404 NOT_FOUND: the workspace, the model or the source was not found
  • 422 XAI_UNSUPPORTED: the source does not have every input of the model and its target, has no rows, or the favorable class is not a class of the target
  • 429 TOO_MANY_REQUESTS: too many explanation requests; wait a minute
  • 503 XAI_UNAVAILABLE: the explainability module is not enabled or not available
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/explanation/fairness" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/models/{modelId}/card

Automatic model card: training data (source, rows, inputs and types, target, missing values), method and configuration, evaluation metrics, limitations detected with heuristics (class imbalance, small sample, low metric, missing values), intended use, out-of-scope uses, creation date and author. JSON by default; format=markdown returns a Markdown document. Requires the read_models permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

formatquerystring: json | markdown

Response format: json (default) or markdown

langquerystring: es | en

Language of the texts: es (default) or en

Responses

  • 200 Model card
  • 401 Error
  • 403 Error
  • 404 Error
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/card" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/forecasts

Creates a forecast of a time series: a model of type forecast that predicts the next periods of a figure from its history, with a range of likely values. Only the source and its date field are needed; the rest is automatic. It starts a task (poll GET /api/v2/workspace/{workspaceId}/task/{taskId}: its result is the ID of the model) and needs an AI module that forecasts (gimodeler 0.16; GET /api/v2/models/methods says forecast: true). If the task fails, its message is FORECAST_NOT_ENOUGH_HISTORY (fewer periods than needed, which the error description says), FORECAST_NO_DATES, FORECAST_CONSTANT or FORECAST_INTERNAL. Requires the model_create and task permissions; same plan limits as other models.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
name requiredstring

Name of the forecast (max 120 characters).

descriptionstring

Description (max 300 characters).

source requiredstring

Identifier of the source with the history (not external or real-time).

date requiredstring | integer

Date field of the source, by name or index.

targetstring | integer

Numeric field to forecast, by name or index. Empty or missing to forecast the number of records.

seriesstring | integer

Optional field with categories to make one forecast per value (the 20 most frequent).

aggregationstring: auto | sum | mean | count

How the records of a period are combined. 'auto' (default): sum when the figure adds up by its name, else mean; count without a target.

frequencystring: auto | H | D | W | M | Q | Y

Period of the forecast: 'auto' (default, the rhythm of the data), H hours, D days, W weeks, M months, Q quarters, Y years.

horizoninteger

Periods ahead; 0 (default) is automatic: 48 hours, 30 days, 12 weeks, 12 months, 8 quarters or 5 years.

levelnumber: 0.8 | 0.95

Coverage of the range of likely values.

Responses

  • 200 Task created; its result is the ID of the forecast model.
  • 400 Bad request: FORECAST_NOT_AVAILABLE (the AI module does not forecast), BAD_NAME, BAD_DESCRIPTION, SOURCE_EXTERNAL, DATE_FIELD_MISSING, DATE_FIELD_NOT_FOUND, DATE_FIELD_NOT_DATE, TARGET_NOT_FOUND, TARGET_NOT_NUMERIC, SERIES_NOT_FOUND, SERIES_NOT_CATEGORY, BAD_AGGREGATION, BAD_FREQUENCY, BAD_HORIZON or BAD_LEVEL, with a message.
  • 401 Invalid authorization
  • 403 No permission (ACCESS_DENIED) or a limit of the plan (LIMIT).
  • 404 Workspace or source not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/forecasts" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/models/{modelId}/forecast

The forecast of a model of type forecast, as the AI module has it: for each series (one without a series field), the next periods with the forecast value and its range, the chosen method, the seasonal pattern (in periods), the trend and the errors of the test on past data (rolling-origin backtest). history=1 adds the history (last 1,000 periods) and the test of each series. Requires the read_models permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the forecast model

x-auth-token requiredheaderstring

Autentication token

historyquerystring

1 to include the history and the test of each series

seriesquerystring

Only the series with this value of the series field

Responses

  • 200 The forecast (status 'ready'), or status 'training' or 'error' (with code and description; for NOT_ENOUGH_HISTORY, history.available and history.needed when the description says them).
  • 400 The model is not a forecast (NOT_A_FORECAST).
  • 401 Invalid authorization
  • 403 No permission
  • 404 Workspace or model not found, or the AI module does not have the forecast (FORECAST_NOT_FOUND).
  • 503 The AI module is not available (AI_MODULE_UNAVAILABLE).
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/forecast" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/models/{modelId}/forecast/retrain

Trains the forecast again with the same settings and the data the source has now. The model keeps its ID, page, dashboards and saved sources; the sources made with it are updated when the new forecast is ready. Starts a task. Requires the model_edit permission (or being its owner) and the task permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the forecast model

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Task created.
  • 400 FORECAST_NOT_AVAILABLE, NOT_A_FORECAST, SOURCE_NOT_FOUND (the source was deleted) or a settings code when the columns of the source changed.
  • 401 Invalid authorization
  • 403 No permission (ACCESS_DENIED) or a limit of the plan (LIMIT).
  • 404 Workspace or model not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/forecast/retrain" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/models/{modelId}/forecast/source

Saves the forecast as a data source with the columns date, series (only with a series field), forecast, lower and upper. It is a derived source of the model: it is updated each time the forecast is trained again. Starts a task (its result is the ID of the source). Requires the model_use, source_create and task permissions; counts towards the sources of the plan.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the forecast model

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
name requiredstring

Name of the new source (max 120 characters).

Responses

  • 200 Task created.
  • 400 NOT_A_FORECAST or BAD_NAME.
  • 401 Invalid authorization
  • 403 No permission (ACCESS_DENIED) or a limit of the plan (LIMIT).
  • 404 Workspace or model not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/forecast/source" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/genai-models

Lists the models with generative AI of a workspace: the user described what to predict from one to five sources, and generative AI predicts it row by row. Requires the read_models permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

pagequeryinteger
limitqueryinteger
x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 The models (the cases of their checks left out).
  • 401 Invalid authorization
  • 404 Workspace or model not found (NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/genai-models" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/genai-models

Plans a model with generative AI from a description and one to five sources. The model only sees a profile of each source (schema, statistics and at most 30 sample rows, long texts cut): a small fixed cost (plan_estimate_eur of the config), whatever the size of the data; nothing is spent on the rows. The plan is kept only as far as it fits the sources (dropped says what was left out) and can be corrected with POST .../genai-models/{genaiModelId}. Requires the model_create permission. On the free plan only the cost-free model of the platform or the organization's own key can be used (403 GENAI_PLAN_REQUIRED).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
description requiredstring

What to predict, in the user's words.

sources requiredarray<string>

Identifiers of the sources (the first one is a good main source).

namestring

Name; otherwise the AI proposes one.

langstring

Language of the plan and of the reasons (es, en, cat, fr...).

Responses

  • 200 The model and its plan.
  • 400 BAD_DESCRIPTION, BAD_SOURCES, or the text was not accepted (REQUEST_NOT_ALLOWED...).
  • 401 Invalid authorization
  • 403 GENAI_PLAN_REQUIRED, LIMIT (models per workspace) or a spending limit of the AI.
  • 404 Workspace or model not found (NOT_FOUND)
  • 422 NOT_UNDERSTOOD: no plan could be made from the description.
  • 429 Too many requests or a spending limit (SPEND_LIMIT, ORG_SPEND_LIMIT).
  • 503 ASSISTANT_DISABLED or MODEL_UNAVAILABLE.
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/genai-models" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/genai-models/config

Whether models with generative AI can be used here (available, else code: ASSISTANT_DISABLED or GENAI_PLAN_REQUIRED), the AI model (cost_free, own_key), the fixed cost of a plan, the default spending limit of a run, the limits and what the user may do. Requires the read_models permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 The configuration.
  • 401 Invalid authorization
  • 404 Workspace or model not found (NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/genai-models/config" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/genai-models/{genaiModelId}

A model with generative AI: its plan, its last check (with its result) and its last run (with why it stopped and the source of the predictions). While a check or a run is in progress, read it every few seconds: it catches up with its task. Requires the read_models permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

genaiModelId requiredpathstring

Identifier of the model with generative AI

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 The model.
  • 401 Invalid authorization
  • 404 Workspace or model not found (NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/genai-models/<genaiModelId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/genai-models/{genaiModelId}

Corrects the plan (only the keys sent; it is checked again against the sources as the plan of the AI), the name or the description. No cost. Requires the model_edit permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

genaiModelId requiredpathstring

Identifier of the model with generative AI

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
planobject

The keys of the plan that change: question, task, answers, inputs, past_answers (or null), guidance, number_range.

namestring
descriptionstring

Responses

  • 200 The model, what was left out and a new estimate.
  • 400 BAD_PLAN, BAD_SOURCES or a text that was not accepted.
  • 401 Invalid authorization
  • 404 Workspace or model not found (NOT_FOUND)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/genai-models/<genaiModelId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

DELETE /api/v2/workspace/{workspaceId}/genai-models/{genaiModelId}

Deletes the model; the source of its predictions stays. Requires the model_delete permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

genaiModelId requiredpathstring

Identifier of the model with generative AI

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Deleted.
  • 401 Invalid authorization
  • 404 Workspace or model not found (NOT_FOUND)
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>/genai-models/<genaiModelId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/genai-models/{genaiModelId}/estimate

What each paid step would cost, in charged euros, from counts and a small sample (the data is never read whole): the check on up to 100 rows with a known answer, and the apply with the limits of the run. Zero with the cost-free model or the organization's own key. Spends nothing. Requires the read_models permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

genaiModelId requiredpathstring

Identifier of the model with generative AI

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
max_eurnumber

Spending limit of the run in charged euros (default: what is left of the AI credits or monthly caps of the user and the organization, at most 5).

max_rowsinteger

Maximum rows sent to the model in the run (default 20000).

only_missingboolean

Only the rows without a known answer (default true when the plan has a field of known answers).

Responses

  • 200 The estimate.
  • 401 Invalid authorization
  • 404 Workspace or model not found (NOT_FOUND)
  • 409 PLAN_NOT_READY or SOURCE_MISSING.
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/genai-models/<genaiModelId>/estimate" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/genai-models/{genaiModelId}/check

Checks the plan, as a task: predicts up to 100 rows that already have the answer (stratified by answer, without seeing it), with a few others as examples, and measures the hit rate or the error next to a simple rule. A paid step: it runs only with the estimate_id of the check the user accepted, or confirm_eur. Requires the model_create or model_edit permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

genaiModelId requiredpathstring

Identifier of the model with generative AI

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
estimate_idstring

The estimate_id of the step, from the estimate the user accepted.

confirm_eurnumber

Instead of estimate_id: an amount in euros the user accepted, at least the payable_eur of the step now.

max_eurnumber

Spending limit of the run in charged euros (default: what is left of the AI credits or monthly caps of the user and the organization, at most 5).

Responses

  • 200 Task created (poll GET .../genai-models/{genaiModelId}, which catches up with the task).
  • 401 Invalid authorization
  • 403 GENAI_PLAN_REQUIRED, LIMIT (task time or parallel tasks) or a spending limit.
  • 404 Workspace or model not found (NOT_FOUND)
  • 409 ESTIMATE_NOT_CONFIRMED (409): the step was not confirmed or its cost changed; `details.estimate` has the current estimate to show to the user and confirm again. Also NO_PAST_ANSWERS (fewer than 20 known answers), PLAN_NOT_READY, PLAN_OUTDATED, SOURCE_MISSING or RUN_IN_PROGRESS.
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/genai-models/<genaiModelId>/check" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/genai-models/{genaiModelId}/apply

Applies the model to the rows of the main source, as a task: many rows per call, every answer validated against the plan, answers cached by row content (a refresh pays only for new or changed rows), and the limits of the run checked before every call: it stops cleanly at the first one and keeps what it got. The first run creates a source with the predictions, a one-sentence reason and a status per row; the next ones replace it. A paid step: send the estimate_id of the apply the user accepted with the same max_eur, max_rows and only_missing, or confirm_eur. Requires the source_create permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

genaiModelId requiredpathstring

Identifier of the model with generative AI

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
estimate_idstring

The estimate_id of the step, from the estimate the user accepted.

confirm_eurnumber

Instead of estimate_id: an amount in euros the user accepted, at least the payable_eur of the step now.

max_eurnumber

Spending limit of the run in charged euros (default: what is left of the AI credits or monthly caps of the user and the organization, at most 5).

max_rowsinteger

Maximum rows sent to the model in the run (default 20000).

only_missingboolean

Only the rows without a known answer (default true when the plan has a field of known answers).

namestring

Name of the source of the predictions (first run).

Responses

  • 200 Task created (poll GET .../genai-models/{genaiModelId}, which catches up with the task).
  • 401 Invalid authorization
  • 403 GENAI_PLAN_REQUIRED, LIMIT (sources, task time or parallel tasks) or a spending limit.
  • 404 Workspace or model not found (NOT_FOUND)
  • 409 ESTIMATE_NOT_CONFIRMED (409): the step was not confirmed or its cost changed; `details.estimate` has the current estimate to show to the user and confirm again. Also NO_ROWS, PLAN_NOT_READY, PLAN_OUTDATED, SOURCE_MISSING or RUN_IN_PROGRESS.
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/genai-models/<genaiModelId>/apply" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/models/{modelId}/monitoring

The monitoring of a model in production («Seguimiento»): whether it is on (on by default for the models trained after the feature existed, off for the older ones until a person turns it on), its settings, the sources it can watch (the training source and the origins of the sources the model is applied to), the reference profile of its training data (exact: from the exact version the model was trained on, kept by the version history of the source; approximate: that version is gone and the current one was used) with, per input and target, the fixed edges of its bins (numbers and dates: about ten bins with about the same rows, chosen among 200 bins of equal width) or its 20 most frequent values plus «others», and the shares of rows of each bucket; its status (stable, watch, alert, pending before its first run, off), the last run in full (per source watched and column: the PSI against the reference with the same edges, its status and the shares of each bucket now; and the quality with the real outcomes of the rows added after training: the main metric now against the one of the training, or a code saying why it was not measured, e.g. SCORE_UNAVAILABLE with a gimodeler without /score) and the summary of the latest runs for the trend. PSI = Σ (a − e) · ln(a / e) over the buckets (empty values, under the first edge, each bin, over the last edge; or empty values, each value, others), shares of 0 taken as 0.0001; a column is watch from psi_warning (0.10) and alert from psi_alert (0.25); dates do not count in the status unless include_dates. The watcher runs it after the updates of the sources watched, at most once a day. An AI application connected through MCP needs the level «aggregates» and gets the values of the categories and the edges of the bins only for columns without personal data held back (withheld_for_ai). Needs a token that reads workspaces and permission to read the models.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The monitoring of the model
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or model not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/monitoring" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

PUT /api/v2/workspace/{workspaceId}/models/{modelId}/monitoring

Turns the monitoring of a model on or off and changes its settings (only what is sent changes). Turning it on, or changing what is compared, takes the reference when there is none and runs it now: the answer waits up to 20 seconds (running: true when it goes on in the background). alert turns the alert of the model on or off (an alert of the workspace of type «model»: it fires when a run newly reaches «alert», never on the first run nor again while it stays; needs permission to edit the workspace). check: true runs it now. Classifiers, regressors, clusterings and outlier detectors can be monitored. Needs a token that writes workspaces and permission to edit the model (or to own it). Answers the monitoring as GET does.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
enabledboolean
settingsModelMonitoringSettings
alertobject
checkboolean

true: run it now

Responses

  • 200 The monitoring of the model
  • 400 BAD_REQUEST, BAD_SETTINGS, UNKNOWN_KEY, BAD_THRESHOLD, BAD_SOURCES, UNKNOWN_SOURCE, NO_SOURCES or UNSUPPORTED_MODEL
  • 401 Invalid authorization
  • 403 Access denied (ACCESS_DENIED: without permission to edit the model, or the workspace for `alert`), or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or model not found
  • 409 TRAINING_SOURCE_MISSING (an alert for a model without its training source)
Example
curl -X PUT "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/monitoring" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/models/{modelId}/monitoring/check

Runs the monitoring of a model now (the answer waits up to 20 seconds; running: true when it goes on in the background). Asked again within a minute with nothing changed, it answers the last run. Needs a token that writes workspaces and permission to edit the model (or to own it). Answers the monitoring as GET .../monitoring does.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Responses

  • 200 The monitoring of the model
  • 400 MONITORING_OFF (turn it on first) or UNSUPPORTED_MODEL
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or model not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/monitoring/check" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/models/{modelId}/versions

The versions of a model, the newest first. A model keeps its ID, page, dashboards and sources while the trained engine behind it can change: status says which version is in use (active), waits to be promoted (candidate), was in use and is kept to go back to it (previous: the last 2), failed, or is no longer kept (retired). Each one has its trigger (initial: the one the model was created with; manual: retrained by a person; retrain: retrained by AIR-Core), when and who, its metrics (numbers only, never the classes), the data it learned from (training_data: the source and its version, whether that version is the current one and whether it is kept in the history of the source), how it compared with the version in use when it was trained (comparison: basis same_rows when both were measured on the same rows, the holdout of the current version of the source, with gimodeler 0.20 and its /score; own_evaluation when each one was measured on its own test rows, indicative only; metric, delta, relative, better (at least 1 % better), baseline), its note and can_promote. retrain says whether the model can be retrained now (problem: why not, e.g. SOURCE_COLUMNS_CHANGED), whether a retraining is running (running: its task) and whether candidates are compared on the same rows (same_rows); a forecast is always replaced when retrained (promotion: always). Models without stored versions list the one they were created with. Requires the read_models permission. For an AI application connected through MCP, the gate «aggregates» of the AI data policy, and notes in which the detector of personal data finds some are withheld (note_withheld).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 {result: success, model, type, active, keep_previous: 2, min_gain: 0.01, versions: [{version, status, trigger, created, author: {uid, name}, metrics, size, training_data: {source, source_name, version, at, current, kept}, comparison, note, task, promoted, replaced, can_promote}], retrain: {supported, promotion, available, running, problem, same_rows}, can_retrain, can_promote}
  • 401 Invalid authorization
  • 403 Access denied, or AI_POLICY_* for an AI application
  • 404 Workspace or model not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/versions" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/models/{modelId}/retrain

Retrains the model with the same configuration (method, settings, chosen columns, train/test split) and the data its source has now (classifiers and regressors; a forecast gets the retraining of POST …/forecast/retrain, which always replaces it). The new version is a candidate, compared with the version in use, and nothing changes until it is promoted; with auto_promote: true it is promoted by itself when, measured on the same rows, its main metric (F1 macro or accuracy for a classifier, R² for a regressor) is at least 1 % better. The last 2 versions in use and the newest candidate are kept; their size counts in the workspace. Starts a task (its result is the ID of the model); its time counts like any training. Requires the model_edit permission (or being the owner of the model) and the task permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
auto_promoteboolean

Promote it by itself when it is at least 1 % better on the same rows (default false: it stays a candidate)

notestring

A note for the history

langstring: es | en

Language of the texts of the task

Responses

  • 200 {result: success, task, task_id}
  • 400 BAD_REQUEST, BAD_NOTE, RETRAIN_NOT_SUPPORTED, SOURCE_NOT_FOUND, SOURCE_EXTERNAL, SOURCE_COLUMNS_CHANGED (the columns of the source changed since the model was trained: details.columns), METHOD_NOT_AVAILABLE, INPUTS_NOT_AVAILABLE or a settings code of a forecast
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, or a limit of the plan (LIMIT)
  • 404 Workspace or model not found
  • 409 RETRAIN_RUNNING (details.task)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/retrain" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/models/{modelId}/versions/{version}/promote

Makes a version the one in use: a candidate, or a previous one to go back to it. One write of the model (its engine, evaluation, columns, size and version of the source), only if the model did not change meanwhile; the version that was in use is kept to go back to it, and the sources made by applying the model are computed again. Requires the model_edit permission (or being the owner of the model).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

version requiredpathinteger

The version to use, as GET …/versions gives it

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Responses

  • 200 {result: success, model, active, previous}
  • 400 VERSION or NOT_PROMOTABLE (forecasts and unsupervised models)
  • 401 Invalid authorization
  • 403 ACCESS_DENIED
  • 404 Workspace or model not found, or VERSION_NOT_FOUND
  • 409 VERSION_ACTIVE, VERSION_GONE (its engine is no longer kept) or CONFLICT (the model changed meanwhile)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/versions/<version>/promote" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/model-experiments

The comparisons of methods («Comparar métodos») of a workspace, the newest first (at most 50): their status, the methods of their candidates, the recommended candidate, whether a winner can still be picked (can_choose) and until when (expires), and the model the winner became. With model, only those started from that model or won by it; with source, only those of that source. options says what a comparison can have here: the candidates of the plan (2 to 3 on the free plan, up to 10 on the paid plans), the methods, whether candidates can learn from chosen columns, and who measures the naive prediction (ai-module with an AI module that learns it, platform otherwise). Needs a token that reads workspaces and permission to read the models.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

modelquerystring

Only the comparisons started from this model or won by it

sourcequerystring

Only the comparisons of this source

Responses

  • 200 The comparisons and what one can have
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Workspace not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/model-experiments" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/model-experiments

Starts a comparison of methods: several candidates that predict the same target of a source, trained one after the other in one task (one stage per candidate) on the same data and the same split (the same test_size, shuffle and seed for all; when no seed is given, one is drawn and used for all), each one a method with its default settings or the automatic search of its settings, and optionally other input columns. A candidate that fails does not stop the others, and the task stops starting candidates when the task time of the organization runs out. Each candidate is compared with the naive prediction (the most frequent class, or the mean): measured on the same rows by an AI module that learns it, or computed by AIR-Core from the evaluation otherwise. The candidates are not models: when the task ends, read the comparison and pick the winner (POST .../winner); candidates nobody picks are deleted after 7 days. Classifiers and regressors only; 2 to 3 candidates on the free plan, up to 10 on the paid plans. Answers the comparison and its task (the task gives the comparison in result). Needs a token that writes workspaces and permission to create models and run tasks.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
name requiredstring

The name the winner will have

descriptionstring

The description the winner will have

source requiredstring

Training source

target requiredinteger

Index of the target field

typestring: classifier | regressor

Without it, regressor for a numeric target and classifier otherwise

candidates requiredarray<ModelExperimentCandidateRequest>
training_configurationobject

The split shared by every candidate

scalingobject

Scaling of the inputs, as in the creation of a model (count-based naive Bayes candidates get minmax instead of standard or robust)

feature_selectionobject

Feature selection, as in the creation of a model

nlp_configobject

Text classifiers: the column of text and its settings, as in the creation of a model

from_modelstring

The model the comparison starts from («Try other methods with this data»), to link them

langstring: es | en

Language of the explanations of the winner

Responses

  • 200 The comparison and its task
  • 400 BAD_NAME, BAD_DESCRIPTION, BAD_TYPE, BAD_CANDIDATES, TOO_FEW_CANDIDATES, TOO_MANY_CANDIDATES (details.limit), DUPLICATE_CANDIDATE, UNKNOWN_METHOD, METHOD_NOT_AVAILABLE, BAD_INPUTS, INPUT_NOT_FOUND, INPUT_IS_TARGET, INPUTS_WITHOUT_TEXT, INPUTS_NOT_AVAILABLE, BAD_SPLIT or SOURCE_EXTERNAL
  • 401 Invalid authorization
  • 403 Access denied, or LIMIT (size, task time or parallel tasks of the plan)
  • 404 Workspace, source (SOURCE_NOT_FOUND) or target (TARGET_NOT_FOUND) not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/model-experiments" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/model-experiments/{experimentId}

A comparison of methods: its status (pending, running, done = waiting for a choice, chosen, expired, failed, history = imported), the shared split, and per candidate its method and settings, its columns, its status (and the error of one that failed), its metrics (classifier: accuracy and f1, macro average; regressor: r2 and mae), those of the naive prediction (baseline, with source: ai-module or platform), the gain over it in the main metric, how much smaller its error is (regressors, when known), the training time and the size. primary_metric is the figure they are compared by (r2; accuracy, or f1 when the classes of the test rows are unbalanced); recommended is the candidate with the best one, ties (less than half a point) going to the simpler method and then to the faster one (recommended_reason: best, tie_simpler, tie_faster, only); beats_baseline false means no candidate beats the naive prediction. An AI application connected through MCP never gets the class the naive prediction answers. Needs a token that reads workspaces and permission to read the models.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

experimentId requiredpathstring

Identifier of the comparison

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The comparison
  • 401 Invalid authorization
  • 403 Access denied, or the AI data policy refuses it (AI_POLICY_*)
  • 404 Workspace or comparison not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/model-experiments/<experimentId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/model-experiments/{experimentId}/winner

Picks the winner of a finished comparison (status done): the candidate becomes a normal model, with the identifier it has in the AI module, its configuration, its evaluation and the fields of the source when it was trained, and the other candidates are deleted from the AI module (they were never models). Picking the same candidate again answers the same model. Needs a token that writes workspaces and permission to create models.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

experimentId requiredpathstring

Identifier of the comparison

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
candidate requiredstring

Key of the candidate (c1, c2...)

Responses

  • 200 The model the winner became
  • 401 Invalid authorization
  • 403 Access denied, or LIMIT (size of the plan)
  • 404 Workspace or comparison not found, or CANDIDATE_NOT_FOUND
  • 409 NOT_FINISHED, ALREADY_CHOSEN (another candidate was picked), CANDIDATE_NOT_TRAINED, CANDIDATES_EXPIRED (not picked in 7 days) or NO_CANDIDATES
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/model-experiments/<experimentId>/winner" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/models/{modelId}/retrain-schedule

The automatic retraining of a classifier or a regressor («Reentrenamiento automático»; a forecast keeps its own retraining: supported: false). mode: off (never by itself: the default of every model, also the existing ones), schedule (every day, week or month in a window of hours, in the time zone of the organization or its own timezone), data (when the training source has at least min_new_rows new rows, or min_growth more rows as a share, since the data the version in use learned from: its source version), drift (when the monitoring of the model reaches «alert»). timezone is the one in use, next_run when the window starts next (schedule) or when the condition is looked at again (data, drift), last_started and last_task the last retraining it started, last_result and history what happened: started, skipped (reason: SOURCE_COLUMNS_CHANGED, RETRAIN_RUNNING, LIMIT, SOURCE_UNCHANGED, ONCE_A_DAY or another code of the retraining; the same skip again is counted in count), candidate (the new version waits for a person; reason why it was not promoted by itself: auto_off, not_same_rows, not_enough, worse), promoted (by itself, with version, previous to go back to it with POST …/versions/{previous}/promote, and the comparison) or failed; catch_up when it ran after the platform missed its window (once, never once per window missed). state gives each condition now: data (base_rows, rows, new_rows, growth, changed, met) and monitoring (enabled, status). At most one retraining by itself a day per model; each one is a task whose time counts like any training, within the limits of the plan. same_rows says whether the AI module measures both versions on the same rows (needed to promote by itself). Requires the read_models permission. For an AI application connected through MCP, the gate «aggregates» of the AI data policy, without who set it up.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The schedule of the model
  • 401 Invalid authorization
  • 403 Access denied, or AI_POLICY_* for an AI application
  • 404 Workspace or model not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/retrain-schedule" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

PUT /api/v2/workspace/{workspaceId}/models/{modelId}/retrain-schedule

Changes the automatic retraining of a classifier or a regressor: only what is sent changes. With auto_promote: true a new version is promoted by itself only when it was measured on the same rows as the version in use (gimodeler 0.20 with /score; never on each version's own evaluation) and its main metric (F1 macro or accuracy for a classifier, R² for a regressor) improves at least min_gain (a share: 0.01 = 1 %, the default; 0 or more); otherwise it waits as a candidate, with a notice in the bell of the owner and of who set it up, the activity of the workspace and, when the owner has the emails of alerts on, an email. Every automatic promotion is written down with its comparison and can be undone with POST …/versions/{version}/promote. Requires the model_edit permission (or being the owner of the model) and the task permission. Answers the schedule as GET does.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
modestring: off | schedule | data | drift
settingsModelRetrainScheduleSettings

Responses

  • 200 The schedule of the model
  • 400 BAD_REQUEST, UNKNOWN_KEY, BAD_MODE, BAD_SETTINGS, BAD_EVERY, BAD_WEEKDAY, BAD_DAY, BAD_HOUR, BAD_TIMEZONE, BAD_NEW_ROWS, BAD_GROWTH, NO_CONDITION (mode data without min_new_rows nor min_growth), BAD_AUTO_PROMOTE, BAD_MIN_GAIN or UNSUPPORTED_MODEL (forecasts and unsupervised models)
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, or AI_POLICY_* for an AI application
  • 404 Workspace or model not found
Example
curl -X PUT "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/retrain-schedule" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/models/{modelId}/trust-report

Trust report of a model, to help document it as an AI system (Regulation (EU) 2024/1689): intended purpose (written by the organization), data used (source, version, rows, columns and the personal data found, as field names and kinds, never values), method, evaluation and quality verdict, global importance of the inputs, known limits, monitoring and drift, versions, who changed what, human oversight (written by the organization) and where it runs. The risk category is the one the organization chose in its register of AI systems; the platform does not classify. It does not certify compliance and is not legal advice. JSON by default; format=markdown returns a Markdown document and format=pdf a PDF (an HTML document, with the header X-Report-Format: html, when the installation cannot print PDF). Read only. Requires the read_models permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

modelId requiredpathstring

Identifier of the model

x-auth-token requiredheaderstring

Autentication token

formatquerystring: json | markdown | pdf

Response format: json (default), markdown or pdf

langquerystring: es | en

Language of the texts: es (default) or en

Responses

  • 200 Trust report
  • 401 Error
  • 403 Error
  • 404 Error
  • 503 Too many PDF documents are being prepared (PDF_BUSY); try again after Retry-After
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/models/<modelId>/trust-report" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/flows

«Flujos»: the flows of the workspace (decisions that run by themselves: when a source is updated or every N hours, retrain a model when due, predict the new rows, evaluate a condition and act by email, signed webhook or rows written to another source), newest change first, each with last_outcome (the status of its last run). Requires the read permission. For an AI application connected through MCP, the gate «structure» of the AI data policy, without who made or changed them.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The flows
  • 401 Invalid authorization
  • 403 Access denied, or AI_POLICY_* for an AI application
  • 404 Workspace not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/flows" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/flows

Creates a flow, off unless enabled: true (switched on, the rows the source has then do not count as new). retrain: never, if_due (when the training source has data the model did not learn from, at most once a day) or always; the retraining is the task of «Versiones» and the new version is used only when its quality verdict is not not_better_than_naive and not worse than the version in use (nor worse on the same rows); otherwise the version in use is kept, the new one waits as a candidate, the owner is told and the run ends guarded without acting. condition: all, rules (on the columns of the source and the columns the model adds, such as <target>_predicted and <target>_predicted_probability; the operators of the simple notices) or alert (a simple notice of the trigger source). At most 3 actions, one of each type: email (to: me, members or list: the notice list of the workspace, all of it or the entries in recipients, with the checks of the simple notices), webhook (url: https and public only; JSON event flow.fired signed with HMAC-SHA256 in x-signature-256, as the webhooks of the simple notices) and append (target: a source of the workspace that can be edited; columns taken by name, flow_run_at gets the time of the run). Limits: 2 flows per workspace on the free plan (20 on paid plans), 4 runs per flow and hour, 10 tests per hour, 5 runs with actions a day on the free plan (48 on paid), 1000 rows predicted per run. Requires the ws_edit and task permissions. Answers the flow; webhook_secret only when one was made (shown once).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
namestring
descriptionstring
enabledboolean
triggerobject
modelstring

A classifier, regressor, clustering or outlier model of the workspace; empty: the condition is on the data only

retrainstring: never | if_due | always
conditionobject
actionsarray<object>
rotate_secretboolean

Responses

  • 200 The flow
  • 400 BAD_REQUEST, UNKNOWN_KEY, BAD_NAME, BAD_TRIGGER, BAD_SCHEDULE, BAD_RETRAIN, BAD_CONDITION, BAD_ACTIONS, BAD_RECIPIENTS, LIST_EMPTY, RECIPIENT_NOT_FOUND, SOURCE_NOT_FOUND, MODEL_NOT_FOUND, MODEL_NOT_SUPPORTED, INPUTS_MISSING, ALERT_NOT_FOUND, TARGET_NOT_FOUND, TARGET_NOT_EDITABLE, WEBHOOK_URL_INVALID, WEBHOOK_PRIVATE_ADDRESS, WEBHOOK_PORT_NOT_ALLOWED or WEBHOOK_HOST_NOT_ALLOWED
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, LIMIT (flows of the plan), or AI_POLICY_* for an AI application
  • 404 Workspace not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/flows" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/flows/{flowId}

A flow and its latest runs (runs: how many, 20 by default, 50 at most), each with what every step did (counts, never rows). The webhook is given by its origin only. Requires the read permission. For an AI application connected through MCP, the gate «aggregates».

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

flowId requiredpathstring

Identifier of the flow

runsqueryinteger
x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The flow and its runs
  • 401 Invalid authorization
  • 403 Access denied, or AI_POLICY_* for an AI application
  • 404 Workspace or flow not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/flows/<flowId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

PUT /api/v2/workspace/{workspaceId}/flows/{flowId}

Changes a flow: only what is sent changes, and every change is a new version (the previous ones are kept in history). rotate_secret: true makes a new signing secret for the webhook (answered once). Requires the ws_edit and task permissions.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

flowId requiredpathstring

Identifier of the flow

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
namestring
descriptionstring
enabledboolean
triggerobject
modelstring

A classifier, regressor, clustering or outlier model of the workspace; empty: the condition is on the data only

retrainstring: never | if_due | always
conditionobject
actionsarray<object>
rotate_secretboolean

Responses

  • 200 The flow
  • 400 The codes of POST …/flows
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, or AI_POLICY_* for an AI application
  • 404 Workspace or flow not found
Example
curl -X PUT "https://app.air-core.io/api/v2/workspace/<workspaceId>/flows/<flowId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/flows/{flowId}/runs

The runs of a flow, newest first (limit, 50 at most; the last 50 are kept). Requires the read permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

flowId requiredpathstring

Identifier of the flow

limitqueryinteger
x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The runs
  • 401 Invalid authorization
  • 403 Access denied, or AI_POLICY_* for an AI application
  • 404 Workspace or flow not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/flows/<flowId>/runs" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/flows/{flowId}/test

«Probar ahora»: goes through the flow with the new rows of its source (or, when there are none, its last 20 rows) and tells what each step would do (would_run, would_send, would_write), without starting a retraining, sending or writing anything. Recorded as a run with dry_run: true. preview: the first rows that meet the condition (left out for an AI application). At most 10 tests per flow and hour (429 RATE_LIMIT). Requires the ws_edit and task permissions.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

flowId requiredpathstring

Identifier of the flow

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Responses

  • 200 The test
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, or AI_POLICY_* for an AI application
  • 404 Workspace or flow not found
  • 429 RATE_LIMIT
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/flows/<flowId>/test" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

automations

Automations: the simple notices and the flows of a workspace in one list. A new automation is saved as a simple notice (kind: notice) when it is exactly one, and as a flow (kind: flow) otherwise; editing never changes its kind.

GET /api/v2/workspace/{workspaceId}/automations

List the automations

The simple notices (kind: notice, with their type: update, stall, metric, quality or model; a notice on a metric with its metric and condition in trigger) and the flows (kind: flow, with the outcome of their last run) of the workspace, by name. Requires the read permission.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

kindquerystring: notice | flow

Only notice or only flow

Responses

  • 200 The automations
  • 400 BAD_KIND
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, NO_ORGANIZATION, or AI_POLICY_* for an AI application
  • 404 Workspace not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/automations" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/automations

Create an automation

Creates an automation and saves it as a simple notice when it is exactly one, as a flow otherwise, by the same rule as the application:

  • trigger.type: stall (no data for trigger.hours hours) is always a simple notice;
  • trigger.type: source_updated is a simple notice when it has no model, its condition is all or rules on columns of the source with the operators eq, gt, gte, lt, lte, null, cn, sw or ew (not cni), min_rows is 1, it emails the whole notice list ({type: email, to: list} without recipients), it writes no rows (append), it may call one webhook and it is on;
  • trigger.type: metric (a metric and its condition, as «Alert me when…» in Metrics) is always a simple notice on that metric: trigger.metric, measure (value, change_pct or change), op (gt, gte, lt, lte), threshold, period, compare (previous_period or previous_year; not for value) and filters ([{field, value}] on fields of the source of the metric). It is checked and evaluated by the engine of the metrics as in the application; without name, it is named after its condition. It emails the notice list and may call one webhook; it takes no condition, model or rows written, and needs the read_sources permission (it reads the figures);
  • anything else (a schedule, a model, cni, columns the prediction adds, another recipient, rows written, created off) is a flow.

The answer says how it was saved and why (saved_as.reason: STALL, SIMPLE or METRIC for a notice; SCHEDULE, MODEL, ALERT_CONDITION, OPERATOR, COLUMN, MIN_ROWS, APPEND, NO_EMAIL, EMAIL_NOT_LIST or OFF for a flow). Without actions, it emails the notice list; without enabled, it is on. A flow has the limits of the flows (2 per workspace on the free plan, 20 on paid plans) and needs the ws_edit and task permissions; a simple notice needs ws_edit. A webhook answers its signing secret once (webhook_secret). warnings: [LIST_EMPTY] when the notice list has no address yet.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
namestring
descriptionstring
enabledboolean

On (true by default when it is created). A simple notice is always on.

triggerAutomationTrigger

source is required but for metric (which watches the source of its metric; answered, not sent)

modelstring

A model that predicts the new rows (a flow)

retrainstring: never | if_due | always
conditionobject

{kind: all}, {kind: rules, match: all|any, rules: [{column, op, value}]} (op: eq, gt, gte, lt, lte, cn, cni, sw, ew, null) or {kind: alert, alert} (the condition of a simple notice of the source; a flow). min_rows: rows that must meet it (1).

actionsarray<object>

{type: email, to: list|me|members, recipients?}, {type: webhook, url} (https; Slack, Microsoft Teams, Google Chat and Discord get a readable message, any other address a signed JSON event) and {type: append, target}. Without it: an email to the notice list.

rotate_secretboolean

A flow: a new signing secret for its webhook

Responses

  • 200 The automation, how it was saved and why
  • 400 BAD_REQUEST, UNKNOWN_KEY, BAD_NAME, BAD_TRIGGER, BAD_STALL, BAD_STALL_HOURS, BAD_METRIC, BAD_METRIC_NOTICE, METRIC_NOT_FOUND, BAD_FIELD, BAD_SCHEDULE, BAD_RETRAIN, BAD_CONDITION, BAD_ACTIONS, BAD_RECIPIENTS, LIST_EMPTY (a flow that emails an empty list), SOURCE_NOT_FOUND, MODEL_NOT_FOUND, TARGET_NOT_FOUND, TARGET_NOT_EDITABLE or WEBHOOK_*
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, LIMIT (flows of the plan), or AI_POLICY_* for an AI application
  • 404 Workspace not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/automations" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/automations/{automationId}

Read an automation

A simple notice or a flow in the same shape: trigger, condition (a notice made with the editor of conditions of the application answers {kind: tree, tree}; the notices of a metric, the quality of a source or the monitoring of a model answer their condition in words, {kind: text}, and a notice on a metric its metric and condition in trigger) and actions (of a webhook only its channel and origin, never its address). A flow also answers its version, model, retraining and history of versions.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

automationId requiredpathstring

Identifier of the automation (of a simple notice or of a flow)

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 The automation
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, NO_ORGANIZATION, or AI_POLICY_* for an AI application
  • 404 NOT_FOUND
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/automations/<automationId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

PUT /api/v2/workspace/{workspaceId}/automations/{automationId}

Change an automation

Changes only what is sent. A flow stays a flow (a new version, as PUT …/flows/{flowId}). A simple notice of type update or stall stays a simple notice: what would need a flow answers 409 NOT_A_NOTICE (create a new automation instead); actions replaces its webhook (an action {type: webhook} without url keeps the saved address; without a webhook action, it is removed). A notice on a metric changes its name, description, actions and, in trigger, its metric and any part of its condition (the rest is kept; a new condition is checked again and may fire again in the current period); its trigger stays on a metric (409 NOTICE_FIXED). A notice of the quality of a source or of the monitoring of a model only changes its name and description here (409 NOTICE_FIXED).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

automationId requiredpathstring

Identifier of the automation (of a simple notice or of a flow)

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
namestring
descriptionstring
enabledboolean

On (true by default when it is created). A simple notice is always on.

triggerAutomationTrigger

source is required but for metric (which watches the source of its metric; answered, not sent)

modelstring

A model that predicts the new rows (a flow)

retrainstring: never | if_due | always
conditionobject

{kind: all}, {kind: rules, match: all|any, rules: [{column, op, value}]} (op: eq, gt, gte, lt, lte, cn, cni, sw, ew, null) or {kind: alert, alert} (the condition of a simple notice of the source; a flow). min_rows: rows that must meet it (1).

actionsarray<object>

{type: email, to: list|me|members, recipients?}, {type: webhook, url} (https; Slack, Microsoft Teams, Google Chat and Discord get a readable message, any other address a signed JSON event) and {type: append, target}. Without it: an email to the notice list.

rotate_secretboolean

A flow: a new signing secret for its webhook

Responses

  • 200 The automation
  • 400 As when it is created
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, NO_ORGANIZATION, or AI_POLICY_* for an AI application
  • 404 NOT_FOUND
  • 409 NOT_A_NOTICE or NOTICE_FIXED
Example
curl -X PUT "https://app.air-core.io/api/v2/workspace/<workspaceId>/automations/<automationId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

DELETE /api/v2/workspace/{workspaceId}/automations/{automationId}

Delete an automation

Deletes a simple notice (with its webhook) or a flow (with its runs). Requires ws_edit (and task for a flow).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

automationId requiredpathstring

Identifier of the automation (of a simple notice or of a flow)

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Responses

  • 200 Deleted
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, NO_ORGANIZATION, or AI_POLICY_* for an AI application
  • 404 NOT_FOUND
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>/automations/<automationId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/automations/{automationId}/history

History of an automation

Of a simple notice, when it fired, newest first, with the rows that met its condition (only for those who read the sources; an AI application gets them only when the AI data policy lets rows go, protected), paginated with page and limit. Of a flow, its runs, newest first (limit, 50 at most), with what each step did (counts, never rows).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

automationId requiredpathstring

Identifier of the automation (of a simple notice or of a flow)

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

pagequeryinteger

Page (starts with 0; simple notices)

limitqueryinteger

Items per page (simple notices) or runs (flows)

Responses

  • 200 The history
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, NO_ORGANIZATION, or AI_POLICY_* for an AI application
  • 404 NOT_FOUND
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/automations/<automationId>/history" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/automations/{automationId}/test

Test an automation

What would happen now, with nothing sent, retrained or written. A flow: its test run (as POST …/flows/{flowId}/test, at most 10 an hour). A simple notice of type update: its condition on the newest 20 rows of its source (rows_checked, matched, would_fire and, for people who read the sources, up to 5 rows in preview). Of type stall: how many hours the source has been without new data (silent_hours) against its silence (after_hours). The notices of a metric, the quality of a source or the monitoring of a model answer 409 TEST_NOT_AVAILABLE. Requires ws_edit (and task for a flow).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

automationId requiredpathstring

Identifier of the automation (of a simple notice or of a flow)

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Responses

  • 200 What would happen
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, NO_ORGANIZATION, or AI_POLICY_* for an AI application
  • 404 NOT_FOUND
  • 409 TEST_NOT_AVAILABLE or SOURCE_NOT_FOUND
  • 429 RATE_LIMIT (tests of a flow)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/automations/<automationId>/test" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

emails

API to manage email notifications

GET /api/v2/workspace/{workspaceId}/emails

Lists the emails to send workspace notifications

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response. Paginated result.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/emails" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/emails

Adds new email to send notifications

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
emailstring

Responses

  • 200 Normal response.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/emails" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

DELETE /api/v2/workspace/{workspaceId}/emails/{mailId}

Deletes the email from the list

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

mailId requiredpathstring

Identifier of the mail

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 The requested resource was not found
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>/emails/<mailId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

visualizations

Visualizations API.

GET /api/v2/workspace/{workspaceId}/visualizations

Lists the visualizations of a workspace

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

pagequeryinteger (int32)

Requested page (starts with 0)

limitqueryinteger (int32)

Max number of items per page (max 500)

Responses

  • 200 Normal response. Paginated result.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/visualizations" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/visualizations

Creates a visualization

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Visualization name (Max 120 characters)

descriptionstring
privacystring: public | private

Visualization privacy

sourcestring

Visualization data source (ID)

configurationVisualizationConfig

Visualization configuration, everything is optional

Responses

  • 200 Success
  • 400 Bad request
  • 401 Unauthorized
  • 403 Access denied
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/visualizations" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/visualization/{visualizationId}

Gets visualization data

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

visualizationId requiredpathstring

Identifier of the visualization

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Success
  • 401 Unauthorized
  • 403 Access denied
  • 404 Not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/visualization/<visualizationId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/visualization/{visualizationId}

Modifies visualization

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

visualizationId requiredpathstring

Identifier of the visualization

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Visualization name (Max 120 characters)

descriptionstring
privacystring: public | private

Visualization privacy

sourcestring

Visualization data source (ID)

configurationVisualizationConfig

Visualization configuration, everything is optional

Responses

  • 200 Success
  • 400 Bad request
  • 401 Unauthorized
  • 403 Access denied
  • 404 Not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/visualization/<visualizationId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

DELETE /api/v2/workspace/{workspaceId}/visualization/{visualizationId}

Deletes visualization

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

visualizationId requiredpathstring

Identifier of the visualization

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Success
  • 401 Unauthorized
  • 403 Access denied
  • 404 Not found
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>/visualization/<visualizationId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/visualization/{visualizationId}/dependents

Dependency map of a visualization, to check before editing or deleting it: the dashboards that show it (up to 50, more counts the rest). Without read_dashboards, the group keeps its count with hidden: true and no items.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

visualizationId requiredpathstring

Identifier of the visualization

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Normal response.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/visualization/<visualizationId>/dependents" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/visualization/{visualizationId}/clone

Clones visualization

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

visualizationId requiredpathstring

Identifier of the visualization

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Visualization name (Max 120 characters)

Responses

  • 200 Success
  • 400 Bad request
  • 401 Unauthorized
  • 403 Access denied
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/visualization/<visualizationId>/clone" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/source/{sourceId}/visualizations/suggestions

The visualizations AIR-Core recommends for a source from the types of its fields, the same as «Recommended for this data» in the editor of the web application: trend, breakdown, one figure against another, share, distribution, map, a heat map of two categories, the trend of each category, the weight of many categories, a key figure and the table (up to 9, the most useful first). Each one carries the configuration that draws it, ready for POST /visualizations. No AI and no cost. Real-time sources get none. Needs to read the sources of the workspace (read_sources, or a permission that makes something from them). Used by the MCP tool suggest_visualizations.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the source

langquerystring: es | en | cat

Language of the names and reasons (es, en, cat); by default, the one of the request.

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 The recommendations
  • 401 Invalid authorization (INVALID_AUTH_TOKEN)
  • 403 Access denied (ACCESS_DENIED), or the AI data policy of the organization refuses it to a connected AI application
  • 404 Workspace or source not found (NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/visualizations/suggestions" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/source/{sourceId}/visualizations/suggestions

Creates, private, the recommended visualization of a key. The recommendation is computed again with the current fields of the source, so the configuration does not travel. Needs view_create and a token that can write, within the limits of the plan. Used by the MCP tool create_suggested_visualization.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourceId requiredpathstring

Identifier of the source

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
key requiredstring

The key of the recommendation (from the GET).

namestring

Name of the visualization (max 120); by default, the one of the recommendation.

descriptionstring

Description (max 300).

langstring

Language of the default name (es, en, cat).

Responses

  • 200 Visualization created
  • 400 Name or description too long (BAD_NAME, BAD_DESCRIPTION)
  • 401 Invalid authorization (INVALID_AUTH_TOKEN)
  • 403 Access denied (ACCESS_DENIED) or plan limit (LIMIT)
  • 404 Workspace or source not found (NOT_FOUND), or no recommendation with that key for this source (SUGGESTION_NOT_FOUND; the message lists the keys)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/source/<sourceId>/visualizations/suggestions" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

dashboards

Dashboards API.

GET /api/v2/workspace/{workspaceId}/dashboards

Lists the dashboards of a workspace

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

pagequeryinteger (int32)

Requested page (starts with 0)

limitqueryinteger (int32)

Max number of items per page (max 500)

Responses

  • 200 Normal response. Paginated result.
  • 401 Invalid authorization
  • 403 Access denied
  • 404 Requested resource was not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboards" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/dashboards

Creates new dashboard

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Dashboard name (Max 120 characters)

descriptionstring
privacystring: public | private

Dashboard privacy

shareOptstring: | controls | clean

Option for the shared dashboard GUI

gaIdstring

Optional Google Analitycs ID

restrictedboolean

True to check for explicit permission forshared dashboards

configurationobject

Dashboard configuration

Responses

  • 200 Success
  • 400 Bad request
  • 401 Unauthorized
  • 403 Access denied
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboards" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/dashboards/auto

Builds a dashboard automatically from a source: picks indicators and charts from its columns, creates the visualizations and the dashboard, and returns them. Used by the MCP tool build_dashboard.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
source requiredstring

Identifier of the source.

namestring

Optional name of the dashboard.

metricstring

Optional column to measure (name).

dimensionstring

Optional column to break down by (name).

datestring

Optional date column (name).

sourcesarray<string>

Up to 5 sources, each one in its own section (the first is source). A text with the identifiers separated by commas is accepted too.

langstring

Language of the texts (es, en, cat).

Responses

  • 200 Dashboard created with its visualizations.
  • 400 Bad request
  • 401 Invalid authorization
  • 403 Access denied or plan limit
  • 404 Workspace or source not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboards/auto" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/dashboards/proposal

The dashboard AIR-Core proposes for the whole workspace, to see before creating it (nothing is written), as «Proposal with the data of the project» in the web application: one section per source (up to 8, the most recently used first, archived ones left out) with the visualizations already made of it, without repeating the same chart, and, where there are few, recommended ones; on top, the name and description of the project; at the end, the metrics of the trained classifiers and regressors of those sources (only for a member who reads the models). No AI and no cost. Needs to read the sources of the workspace. Used by the MCP tool propose_dashboard.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

excludequerystring

Sources to leave out, separated by commas.

modelsquerystring: yes | no

no leaves out the metrics of the models.

langquerystring

Language of the titles (es, en, cat); by default, the one of the request.

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 The proposal
  • 401 Invalid authorization (INVALID_AUTH_TOKEN)
  • 403 Access denied (ACCESS_DENIED), or the AI data policy of the organization refuses it to a connected AI application
  • 404 Workspace not found (NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboards/proposal" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/dashboards/proposal

Creates, private, the proposed dashboard with the same choices as the GET, and the recommended visualizations it includes (the existing ones are reused). Needs dashboard_create (and view_create when it creates visualizations) and a token that can write, within the limits of the plan. Used by the MCP tool create_proposed_dashboard.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
excludearray<string>

Sources to leave out.

modelsstring: yes | no

no leaves out the metrics of the models.

namestring

Name of the dashboard (max 80); by default, the proposed one.

langstring

Language of the titles (es, en, cat).

Responses

  • 200 Dashboard created
  • 400 Name too long (BAD_NAME), or no source with data to propose (NO_SOURCES)
  • 401 Invalid authorization (INVALID_AUTH_TOKEN)
  • 403 Access denied (ACCESS_DENIED) or plan limit (LIMIT)
  • 404 Workspace not found (NOT_FOUND)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboards/proposal" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/dashboard/{dashboardId}

Gets dashboard data

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

dashboardId requiredpathstring

Identifier of the dashboard

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Success
  • 401 Unauthorized
  • 403 Access denied
  • 404 Not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboard/<dashboardId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/dashboard/{dashboardId}

Modifies dashboard

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

dashboardId requiredpathstring

Identifier of the dashboard

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Dashboard name (Max 120 characters)

descriptionstring
privacystring: public | private

Dashboard privacy

shareOptstring: | controls | clean

Option for the shared dashboard GUI

gaIdstring

Optional Google Analitycs ID

restrictedboolean

True to check for explicit permission forshared dashboards

configurationobject

Dashboard configuration

Responses

  • 200 Success
  • 400 Bad request
  • 401 Unauthorized
  • 403 Access denied
  • 404 Not found
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboard/<dashboardId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

DELETE /api/v2/workspace/{workspaceId}/dashboard/{dashboardId}

Deletes dashboard

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

dashboardId requiredpathstring

Identifier of the dashboard

x-auth-token requiredheaderstring

Autentication token

delete_visualizationsquerystring: yes | no

Set it to yes to delete all associated visualizations

Responses

  • 200 Success
  • 401 Unauthorized
  • 403 Access denied
  • 404 Not found
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboard/<dashboardId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/dashboard/{dashboardId}/clone

Clones a dashboard and its visualizations. With source_mapping, the copy reads from other sources of the workspace.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

dashboardId requiredpathstring

Identifier of the dashboard

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
namestring

Dashboard name (Max 120 characters)

source_mappingobject

Optional. Sources to replace in the copy: ID of a source read by the dashboard (visualizations, filters, filter widgets, variable inputs and monitors) -> ID of another source of the same workspace. Columns are matched by name (exact, then ignoring case) and every column index of the visualizations, dashboard filters and filter widgets is translated.

forceboolean

Only with source_mapping. Clone even if some visualizations or filters use columns that the new source does not have: those columns are removed from them. Without it, the request is refused with 409 and the report.

Responses

  • 200 Success
  • 400 Bad request
  • 401 Unauthorized
  • 403 Access denied
  • 409 The source mapping would remove columns from some visualizations or filters. Send force=true to clone anyway.
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboard/<dashboardId>/clone" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/dashboard/{dashboardId}/reports

The scheduled reports of a dashboard («Programar informe»): a summary of the dashboard by email every day, week or month at an hour of a time zone. Each visualization is summarized from exact figures computed by AIR-Core over its source (its filter, the period of the report: the day, the 7 days or the calendar month before the day it goes out, compared with the period before), in sentences written from templates in Spanish, English or Catalan: no generative AI is used. Tables, maps and other charts are listed by name. Each report has status (active or paused, with paused_reason: by_user, no_access, dashboard_deleted, workspace_deleted, no_share), settings, recipients, next_run, last_sent and last_result. A report only carries what whoever scheduled it can see: it is checked again every time it goes out, and paused (with an email to them) when they lost the access. Requires the read and read_dashboards permissions of the workspace. For an AI application connected through MCP, the gate «structure» of the AI data policy, without the addresses of the recipients.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

dashboardId requiredpathstring

Identifier of the dashboard

x-auth-token requiredheaderstring

Authentication token (reads workspaces)

Responses

  • 200 {result: success, reports, can_send_to_others, can_share_outside, limits}
  • 401 Invalid authorization
  • 403 Access denied, or AI_POLICY_* for an AI application
  • 404 Workspace or dashboard not found
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboard/<dashboardId>/reports" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/dashboard/{dashboardId}/reports

Schedules a new report of the dashboard (without recipients: the owner of the token alone). At most 20 recipients, 10 reports per dashboard and 200 per organization. Free on every plan.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

dashboardId requiredpathstring

Identifier of the dashboard

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
settingsobject

Only what is sent changes.

recipientsobject

Responses

  • 200 {result: success, report}
  • 400 BAD_REQUEST, UNKNOWN_KEY, BAD_SETTINGS, BAD_EVERY, BAD_WEEKDAY, BAD_DAY, BAD_HOUR, BAD_TIMEZONE, BAD_LANG, BAD_RECIPIENTS, NO_RECIPIENTS, TOO_MANY_RECIPIENTS, BAD_RECIPIENT, BAD_EMAIL or NOT_CONFIRMED
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, RECIPIENTS_NOT_ALLOWED, OUTSIDE_NOT_ALLOWED, or AI_POLICY_* for an AI application
  • 404 Workspace or dashboard not found
  • 409 TOO_MANY_REPORTS
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboard/<dashboardId>/reports" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

PUT /api/v2/workspace/{workspaceId}/dashboard/{dashboardId}/reports/{reportId}

Changes a scheduled report (only what is sent), pauses it or resumes it (status). Only who made it or who edits the dashboard. Resuming checks the recipients again; when whoever made it lost the access, the report then carries what the person resuming it can see.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

dashboardId requiredpathstring

Identifier of the dashboard

reportId requiredpathstring

Identifier of the scheduled report

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Request body application/json

FieldTypeDescription
settingsobject

Only what is sent changes.

recipientsobject
statusstring: active | paused

Responses

  • 200 {result: success, report}
  • 400 As POST, and BAD_STATUS
  • 401 Invalid authorization
  • 403 ACCESS_DENIED, RECIPIENTS_NOT_ALLOWED, OUTSIDE_NOT_ALLOWED
  • 404 Workspace, dashboard or report not found
Example
curl -X PUT "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboard/<dashboardId>/reports/<reportId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

DELETE /api/v2/workspace/{workspaceId}/dashboard/{dashboardId}/reports/{reportId}

Deletes a scheduled report. Only who made it or who edits the dashboard.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

dashboardId requiredpathstring

Identifier of the dashboard

reportId requiredpathstring

Identifier of the scheduled report

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Responses

  • 200 {result: success}
  • 401 Invalid authorization
  • 403 ACCESS_DENIED
  • 404 Workspace, dashboard or report not found
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboard/<dashboardId>/reports/<reportId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/dashboard/{dashboardId}/reports/{reportId}/test

Sends the report now, as a test, only to the address of the owner of the token (marked as a test; at most once a minute per report). The calendar does not change.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

dashboardId requiredpathstring

Identifier of the dashboard

reportId requiredpathstring

Identifier of the scheduled report

x-auth-token requiredheaderstring

Authentication token (writes workspaces)

Responses

  • 200 {result: success, sent, summarized, skipped}
  • 400 NO_EMAIL
  • 401 Invalid authorization
  • 403 ACCESS_DENIED
  • 404 Workspace, dashboard or report not found
  • 429 TOO_SOON
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/dashboard/<dashboardId>/reports/<reportId>/test" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

ai

Explainability of models and activity of AI assistants and agents

GET /api/v2/ai/activity

AI activity log of the organization: actions of the assistant, of MCP clients and agents and of the explainability module, with user, tool, model, result, duration and cost, filtered by user, channel, result and dates. Organization administrators only.

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

x-organizationheaderstring

Identifier of the organization (optional, defaults to the first one of the user)

pagequeryinteger
limitqueryinteger
channelquerystring: assistant | mcp | xai
userquerystring
fromqueryinteger

Unix time in milliseconds

toqueryinteger

Unix time in milliseconds

resultquerystring: success | error | blocked

blocked: stopped by the safeguards; error: the other failures

Responses

  • 200 Normal response
  • 400 A filter is not valid (code INVALID_FILTER): a date that is not Unix milliseconds or comes after the other, an unknown channel or result, or a user that is not an identifier
  • 401 Error
  • 403 Error
Example
curl -X GET "https://app.air-core.io/api/v2/ai/activity" \
  -H "x-auth-token: $AIRCORE_TOKEN"

POST /api/v2/ai/activity

Records an action performed by an MCP client or agent on behalf of the token owner. Used by the AIR-Core MCP server. The record is always attributed to the owner of the token; parameters are stored with credentials redacted.

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

x-organizationheaderstring

Identifier of the organization (optional, defaults to the first one of the user)

Request body application/json

FieldTypeDescription
channelstring: mcp | assistant
toolstring
workspacestring
paramsobject
resultstring: success | error
errorstring
duration_msinteger
modelstring

Responses

  • 200 Recorded
  • 401 Error
  • 403 Error
Example
curl -X POST "https://app.air-core.io/api/v2/ai/activity" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/recommendations

«Recommendations without sharing your data»: everything that can be done with a source (or with the workspace) in AIR-Core, worked out WITHOUT AI and without cost from its structure (names and types of the fields) and the statistics the platform already keeps of each source: what can be predicted, a forecast, an automatic dashboard, automations worth having, text columns worth enriching with AI, fields that look like personal data (a privacy warning), likely joins between sources, data quality and example questions. Available on every plan. Each recommendation has its texts in Spanish and English and the action that does it. preview is EXACTLY the text the AI would receive with the explanation with AI, without (structure) and with (statistics) aggregate statistics: names and types, and only rows, share of missing values and number of distinct values; never a value, a category, a sample or a row. Requires read access to the workspace.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

sourcequerystring

Identifier of a source of the workspace. Without it, the recommendations cover the most recently used sources of the workspace (up to 20) and the joins between them.

langquerystring

Language of the texts written for the user (es, en, cat...). By default, the one of the request.

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 The recommendations, the most valuable first.
  • 401 Invalid authorization
  • 404 Workspace or source not found (NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/recommendations" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/recommendations/ai

The recommendations explained and extended by AI. The AI receives ONLY the structure (the preview of GET .../recommendations, the same text character by character): names of the sources and fields and their types and, with statistics, rows, share of missing values and number of distinct values; never a value, a category, a sample or a row. It answers with a plain-language reading and up to 10 prioritised recommendations with why; the answer is sanitised (only the known kinds, the sources sent and the fields that exist) and the action of each one is built by the platform. Paid plans are charged to their AI credits; the free plan works with AI credit (bought or given by AIR-Core) or the organization's own AI key, and otherwise never with a model of the platform (403 AI_PLAN_REQUIRED). The AI activity log records the call with sent: structure_only. The same structure again returns the kept answer at no cost (cached). Spending caps, guardrails and the rate limit of the AI apply. Needs a token that can write and read access to the workspace.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
sourcestring

A source of the workspace; without it, the workspace.

statisticsboolean

Also send aggregate statistics, without values (default false).

langstring

Language of the answer (es, en, cat, fr...).

Responses

  • 200 The explanation of the AI.
  • 401 Invalid authorization
  • 403 The token cannot write (ACCESS_DENIED), or the explanation with AI is not allowed: AI_PLAN_REQUIRED (free plan without AI credit or the organization's own AI key).
  • 404 Workspace or source not found (NOT_FOUND)
  • 429 Too many requests to the AI features (TOO_MANY_REQUESTS), or a spending cap reached (SPEND_LIMIT, ORG_SPEND_LIMIT, GLOBAL_SPEND_LIMIT).
  • 503 Generative AI is not enabled (ASSISTANT_DISABLED) or the model is not available (MODEL_UNAVAILABLE).
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/recommendations/ai" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/ai/policy

AI data policy of the organization: what its data may show to a language model. Levels: structure (names and types of the fields only), aggregates (also results computed by AIR-Core, never rows) and rows (also rows, texts and documents, only with providers that process the data in the EU or with the organization's own AI key). Workspaces may have a stricter level. Every AI feature checks it before calling a model and refuses what needs more. Any member of the organization may read it.

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

x-organizationheaderstring

Identifier of the organization (optional, defaults to the first one of the user)

Responses

  • 200 The policy
  • 401 Missing or invalid token
  • 403 Not a member of the organization
Example
curl -X GET "https://app.air-core.io/api/v2/ai/policy" \
  -H "x-auth-token: $AIRCORE_TOKEN"

GET /api/v2/ai/register

Register of the AI systems of the organization (Regulation (EU) 2024/1689, AI Act): the built-in AI features of AIR-Core and the organization's own models, with purpose, risk category, prohibited practices reviewed, provider and model, human oversight, transparency, data used, logs, responsible person, last review and the articles that may be relevant. Descriptive, not legal advice. Organization administrators only.

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

x-organizationheaderstring

Identifier of the organization (optional, defaults to the first one of the user)

Responses

  • 200 The register
  • 401 Missing or invalid token
  • 403 Only the owner or the administrators of the organization
Example
curl -X GET "https://app.air-core.io/api/v2/ai/register" \
  -H "x-auth-token: $AIRCORE_TOKEN"

GET /api/v2/ai/register/report

Report of the register of AI systems, as a self-contained HTML document or, with format=pdf, as a PDF (an installation that cannot make PDFs answers the HTML with the header X-Report-Format: html). Organization administrators only.

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

x-organizationheaderstring

Identifier of the organization (optional, defaults to the first one of the user)

formatquerystring: html | pdf
langquerystring

Language of the report (en, es, cat, fr, de, zh, ja)

Responses

  • 200 The report
  • 401 Missing or invalid token
  • 403 Only the owner or the administrators of the organization
Example
curl -X GET "https://app.air-core.io/api/v2/ai/register/report" \
  -H "x-auth-token: $AIRCORE_TOKEN"

GET /api/v2/ai/audit

Export of the AI of the organization for audits: the AI data policy and the providers that apply, the choices about personal data of each source (field names and kinds, never values), the register of AI systems and the AI activity with «what the AI saw» of every call (level, sources and fields, whether values or rows were sent and how many, fields masked or not sent). Never the data itself. At most 20000 entries of activity, the newest. Organization administrators only.

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

x-organizationheaderstring

Identifier of the organization (optional, defaults to the first one of the user)

fromquerystring (date-time)

Start date (ISO 8601)

toquerystring (date-time)

End date (ISO 8601)

Responses

  • 200 The audit export
  • 401 Missing or invalid token
  • 403 Only the owner or the administrators of the organization
Example
curl -X GET "https://app.air-core.io/api/v2/ai/audit" \
  -H "x-auth-token: $AIRCORE_TOKEN"

GET /api/v2/ai/limits

Limits of the use of AI that the organization set per role and per person (Members and roles), with the use of the month of each member. Modes: all, free (only AI that spends no credits: the platform's models at no cost or the organization's own key) and none. spend_eur: most AI credit (charged euros) per month with the platform's models that cost credits; tokens: most tokens (input + output) per month of AI that spends no credits; null is no limit of its own (the credits and the caps of the platform still apply). A person's own limits replace those of their role; the owner is never limited. They renew on day 1 and are checked before every call to a model. The AI apps connected through MCP (Claude, ChatGPT…) use their own AI and are not counted. Organization administrators only.

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

x-organizationheaderstring

Identifier of the organization (optional, defaults to the first one of the user)

Responses

  • 200 The limits and the use of the month
  • 401 Missing or invalid token
  • 403 Only the owner or the administrators of the organization
Example
curl -X GET "https://app.air-core.io/api/v2/ai/limits" \
  -H "x-auth-token: $AIRCORE_TOKEN"

organization

The organization: its value report (what AIR-Core did on its own in a month).

GET /api/v2/organization/value-report

Value report of the organization («What AIR-Core did for you this month»): what the platform did on its own in a month (notices of the automations and the channels they reached, automatic updates and rows, predictions and anomalies, models trained, dashboard views, questions answered by the assistant, AI cost), the month before to compare (changes only for months that ended), the highlights of the month as sentences, and an estimate of the hours saved with the minutes it assumes for each thing (an estimate, not a measurement). Months start at midnight in the time zone of the organization. Organization administrators only. Read only.

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

x-organizationheaderstring

Identifier of the organization (optional, defaults to the first one of the user)

monthquerystring

YYYY-MM, from 2020-01 up to the current month, or 'current' (default)

monthsqueryinteger: 1 | 3 | 6 | 12

Months of the period that ends with month: 1 (default), 3, 6 or 12. The period before has as many months; previous and changes compare with it

langquerystring: en | es | ca | fr | de | zh | ja

Language of the sentences, labels and notes (en by default)

Responses

  • 200 Normal response
  • 400 The month is not valid (code INVALID_MONTH)
  • 401 Error
  • 403 The token cannot read or the user does not manage the organization (code ACCESS_DENIED)
Example
curl -X GET "https://app.air-core.io/api/v2/organization/value-report" \
  -H "x-auth-token: $AIRCORE_TOKEN"

GET /api/v2/organization/palette

The colours of the brand of the organization: every chart without colours of its own is drawn with them and their shades (also on shared dashboards), heat maps take a scale of the first one and the reports take it as accent. Organization administrators only.

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

x-organizationheaderstring

Identifier of the organization (optional, defaults to the first one of the user)

Responses

  • 200 Normal response
  • 403 Not an administrator of the organization, or a token without the permission
Example
curl -X GET "https://app.air-core.io/api/v2/organization/palette" \
  -H "x-auth-token: $AIRCORE_TOKEN"

POST /api/v2/organization/palette

Sets the colours of the brand of the organization: up to 12, as #rrggbb (#rgb is accepted). An empty list goes back to the default colours of AIR-Core. The visualizations with colours of their own keep them. Organization administrators only; needs a token that can write.

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

x-organizationheaderstring

Identifier of the organization (optional, defaults to the first one of the user)

Request body application/json

FieldTypeDescription
palettearray<string>

Responses

  • 200 Normal response
  • 400 A colour is not valid or there are more than 12 (INVALID_PALETTE)
  • 403 Not an administrator of the organization, or a token without the permission
Example
curl -X POST "https://app.air-core.io/api/v2/organization/palette" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "Content-Type: application/json" -d @body.json

scim

SCIM 2.0 user provisioning of an organization (RFC 7643, 7644). Authentication: the bearer token generated in Organization settings › Corporate sign-in (not an x-auth-token). Every call is recorded in the activity of the organization.

GET /scim/v2/{organization}/ServiceProviderConfig

SCIM service provider configuration

Features of the SCIM endpoint: PATCH, filters (up to 200 results) and ETags; no bulk, sorting or password changes.

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

Responses

  • 200 Configuration
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X GET "https://app.air-core.io/scim/v2/<organization>/ServiceProviderConfig" \
  -H "Authorization: Bearer $SCIM_TOKEN"

GET /scim/v2/{organization}/ResourceTypes

SCIM resource types

User and Group.

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

Responses

  • 200 List of resource types
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X GET "https://app.air-core.io/scim/v2/<organization>/ResourceTypes" \
  -H "Authorization: Bearer $SCIM_TOKEN"

GET /scim/v2/{organization}/Schemas

SCIM schemas

The attributes of User and Group that AIR-Core keeps.

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

Responses

  • 200 List of schemas
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X GET "https://app.air-core.io/scim/v2/<organization>/Schemas" \
  -H "Authorization: Bearer $SCIM_TOKEN"

GET /scim/v2/{organization}/Users

List or filter provisioned users

Users provisioned in the organization, filtered and paged.

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

filterquerystring

SCIM filter (RFC 7644 3.4.2.2): eq, ne, co, sw, ew, gt, ge, lt, le, pr, and, or, not, parentheses and value paths, e.g. userName eq "ana@example.com"

startIndexqueryinteger

1-based index of the first result

countqueryinteger

Results per page (at most 200)

attributesquerystring

Top-level attributes to return (comma separated)

excludedAttributesquerystring

Top-level attributes to leave out (comma separated), e.g. members

Responses

  • 200 Page of users
  • 400 Invalid filter (scimType invalidFilter)
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X GET "https://app.air-core.io/scim/v2/<organization>/Users" \
  -H "Authorization: Bearer $SCIM_TOKEN"

POST /scim/v2/{organization}/Users

Provision a user

The email (primary of emails, or userName) must be of a domain verified by the organization. The AIR-Core account with that email is linked, or a corporate account is created, and it joins the organization with the role of the new members (or of its groups). active false creates it suspended.

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

Request body application/scim+json

FieldTypeDescription
schemasarray<string>
idstring
externalIdstring
userName requiredstring

Usually the work email

displayNamestring
nameobject
emailsarray<object>
activeboolean
groupsarray<object>
metaScimMeta

Responses

  • 201 Created (Location and ETag headers)
  • 400 Invalid value, e.g. an email of a domain that is not verified
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 403 The organization has no free places for more members
  • 409 userName or externalId already used (scimType uniqueness)
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X POST "https://app.air-core.io/scim/v2/<organization>/Users" \
  -H "Authorization: Bearer $SCIM_TOKEN" \
  -H "Content-Type: application/scim+json" -d @body.json

GET /scim/v2/{organization}/Users/{id}

Read a provisioned user

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

id requiredpathstring

Identifier of the user

If-None-Matchheaderstring

ETag of the copy you have: 304 if unchanged

Responses

  • 200 The user (ETag header)
  • 304 Not modified
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 404 Not found in this organization
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X GET "https://app.air-core.io/scim/v2/<organization>/Users/<id>" \
  -H "Authorization: Bearer $SCIM_TOKEN"

PUT /scim/v2/{organization}/Users/{id}

Replace a provisioned user

Replaces userName, externalId, name, displayName, emails and active.

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

id requiredpathstring

Identifier of the user

If-Matchheaderstring

ETag of the resource (W/""): the change is refused with 412 if it was modified

Request body application/scim+json

FieldTypeDescription
schemasarray<string>
idstring
externalIdstring
userName requiredstring

Usually the work email

displayNamestring
nameobject
emailsarray<object>
activeboolean
groupsarray<object>
metaScimMeta

Responses

  • 200 The user
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 404 Not found in this organization
  • 412 ETag does not match
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X PUT "https://app.air-core.io/scim/v2/<organization>/Users/<id>" \
  -H "Authorization: Bearer $SCIM_TOKEN" \
  -H "Content-Type: application/scim+json" -d @body.json

PATCH /scim/v2/{organization}/Users/{id}

Update a provisioned user (PatchOp)

add, replace and remove (any case, booleans also as text). active false suspends the membership in the organization (the role is kept to give it back); the account and its data are never deleted. The owner cannot be deactivated. Attributes AIR-Core does not keep are accepted and ignored.

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

id requiredpathstring

Identifier of the user

If-Matchheaderstring

ETag of the resource (W/""): the change is refused with 412 if it was modified

Request body application/scim+json

FieldTypeDescription
schemasarray<string>
Operations requiredarray<object>

Responses

  • 200 The user
  • 400 Invalid operation
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 404 Not found in this organization
  • 412 ETag does not match
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X PATCH "https://app.air-core.io/scim/v2/<organization>/Users/<id>" \
  -H "Authorization: Bearer $SCIM_TOKEN" \
  -H "Content-Type: application/scim+json" -d @body.json

DELETE /scim/v2/{organization}/Users/{id}

Deprovision a user

Suspends the membership, takes back what its groups gave and hides the user from SCIM. Nothing is deleted from AIR-Core, and the person cannot come back with the corporate sign-in until provisioned again.

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

id requiredpathstring

Identifier of the user

If-Matchheaderstring

ETag of the resource (W/""): the change is refused with 412 if it was modified

Responses

  • 204 Deprovisioned
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 404 Not found in this organization
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X DELETE "https://app.air-core.io/scim/v2/<organization>/Users/<id>" \
  -H "Authorization: Bearer $SCIM_TOKEN"

GET /scim/v2/{organization}/Groups

List or filter provisioned groups

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

filterquerystring

SCIM filter (RFC 7644 3.4.2.2): eq, ne, co, sw, ew, gt, ge, lt, le, pr, and, or, not, parentheses and value paths, e.g. userName eq "ana@example.com"

startIndexqueryinteger

1-based index of the first result

countqueryinteger

Results per page (at most 200)

attributesquerystring

Top-level attributes to return (comma separated)

excludedAttributesquerystring

Top-level attributes to leave out (comma separated), e.g. members

Responses

  • 200 Page of groups
  • 400 Invalid filter
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X GET "https://app.air-core.io/scim/v2/<organization>/Groups" \
  -H "Authorization: Bearer $SCIM_TOKEN"

POST /scim/v2/{organization}/Groups

Provision a group

Members must be users of the same organization (others are ignored). The group rules of the single sign-on settings (by displayName, externalId or id) give a role or workspace permissions to its members.

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

Request body application/scim+json

FieldTypeDescription
schemasarray<string>
idstring
externalIdstring
displayName requiredstring
membersarray<object>
metaScimMeta

Responses

  • 201 Created
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 409 displayName already used
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X POST "https://app.air-core.io/scim/v2/<organization>/Groups" \
  -H "Authorization: Bearer $SCIM_TOKEN" \
  -H "Content-Type: application/scim+json" -d @body.json

GET /scim/v2/{organization}/Groups/{id}

Read a provisioned group

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

id requiredpathstring

Identifier of the group

If-None-Matchheaderstring

ETag of the copy you have: 304 if unchanged

Responses

  • 200 The group
  • 304 Not modified
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 404 Not found in this organization
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X GET "https://app.air-core.io/scim/v2/<organization>/Groups/<id>" \
  -H "Authorization: Bearer $SCIM_TOKEN"

PUT /scim/v2/{organization}/Groups/{id}

Replace a provisioned group

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

id requiredpathstring

Identifier of the group

If-Matchheaderstring

ETag of the resource (W/""): the change is refused with 412 if it was modified

Request body application/scim+json

FieldTypeDescription
schemasarray<string>
idstring
externalIdstring
displayName requiredstring
membersarray<object>
metaScimMeta

Responses

  • 200 The group
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 404 Not found in this organization
  • 412 ETag does not match
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X PUT "https://app.air-core.io/scim/v2/<organization>/Groups/<id>" \
  -H "Authorization: Bearer $SCIM_TOKEN" \
  -H "Content-Type: application/scim+json" -d @body.json

PATCH /scim/v2/{organization}/Groups/{id}

Update a provisioned group (PatchOp)

Add or remove members (also members[value eq ""]), rename it.

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

id requiredpathstring

Identifier of the group

If-Matchheaderstring

ETag of the resource (W/""): the change is refused with 412 if it was modified

Request body application/scim+json

FieldTypeDescription
schemasarray<string>
Operations requiredarray<object>

Responses

  • 200 The group
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 404 Not found in this organization
  • 412 ETag does not match
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X PATCH "https://app.air-core.io/scim/v2/<organization>/Groups/<id>" \
  -H "Authorization: Bearer $SCIM_TOKEN" \
  -H "Content-Type: application/scim+json" -d @body.json

DELETE /scim/v2/{organization}/Groups/{id}

Delete a provisioned group

Its members lose what the group gave them.

Parameters

NameInTypeDescription
organization requiredpathstring

Identifier of the organization (its SCIM base URL is /scim/v2/{organization})

id requiredpathstring

Identifier of the group

If-Matchheaderstring

ETag of the resource (W/""): the change is refused with 412 if it was modified

Responses

  • 204 Deleted
  • 401 Missing, wrong or revoked token, or a token of another organization
  • 404 Not found in this organization
  • 429 Too many requests for the organization, or too many failed authentications from the address (Retry-After: 60)
Example
curl -X DELETE "https://app.air-core.io/scim/v2/<organization>/Groups/<id>" \
  -H "Authorization: Bearer $SCIM_TOKEN"

collaboration

Comments on dashboards and visualizations (with mentions), annotations of dates on time series and the notifications of the user

GET /api/v2/workspace/{workspaceId}/comments

Lists the comment threads of a dashboard (the whole of it and its cards) or a visualization, with their comments, and how many are open by card. Anyone who can read the dashboard (read_dashboards) or the visualization (read_views) reads and writes its comments. Comments never appear in shared links, public views or embedded views.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

target_type requiredquerystring: dashboard | visualization
target_id requiredquerystring

Identifier of the dashboard or the visualization

statusquerystring: open | resolved
cardquerystring

Only the threads of a card of the dashboard: the index of its section and the number (i) of the piece, as in its configuration, e.g. 0:3

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 The threads, the latest first
  • 401 Invalid authorization
  • 403 The token lacks the permission to read (or to write) workspaces (ACCESS_DENIED)
  • 404 Workspace, dashboard or visualization not found, or the user cannot read it (NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/comments" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/comments

Starts a thread on a dashboard (the whole of it, or a card with card) or on a visualization. Plain text and links, up to 2,000 characters; to mention someone, write @ and their name as the application shows it. Only people who can read what is commented can be mentioned; they are notified in the application and by email (a digest, at most one an hour, if they want it).

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
target_type requiredstring: dashboard | visualization
target_id requiredstring
cardstring
text requiredstring
langstring

Language of the email notices (es, en or ca)

Responses

  • 200 The new thread
  • 400 Empty or too long text (EMPTY, TOO_LONG), a card that is not in the dashboard (CARD_NOT_FOUND) or a wrong target (BAD_TARGET)
  • 401 Invalid authorization
  • 403 The token lacks the permission to read (or to write) workspaces (ACCESS_DENIED)
  • 404 Not found, or the user cannot read it (NOT_FOUND)
  • 429 Too many comments in a short time (RATE_LIMIT)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/comments" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

GET /api/v2/workspace/{workspaceId}/comments/{threadId}

A thread with its comments.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

threadId requiredpathstring

Identifier of the thread

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 The thread
  • 401 Invalid authorization
  • 403 The token lacks the permission to read (or to write) workspaces (ACCESS_DENIED)
  • 404 Not found, or the user cannot read it (NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/comments/<threadId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/comments/{threadId}/replies

Replies to a thread. The author of the thread is notified, and the people mentioned. A resolved thread that gets a reply is open again.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

threadId requiredpathstring

Identifier of the thread

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
text requiredstring
langstring

Responses

  • 200 The new comment
  • 400 Empty or too long text (EMPTY, TOO_LONG)
  • 401 Invalid authorization
  • 403 The token lacks the permission to read (or to write) workspaces (ACCESS_DENIED)
  • 404 Not found, or the user cannot read it (NOT_FOUND)
  • 429 Too many comments in a short time (RATE_LIMIT)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/comments/<threadId>/replies" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/comments/{threadId}/status

Resolves or reopens a thread. Anyone who reads it can.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

threadId requiredpathstring

Identifier of the thread

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
status requiredstring: open | resolved

Responses

  • 200 The thread
  • 400 Unknown status (BAD_TARGET)
  • 401 Invalid authorization
  • 403 The token lacks the permission to read (or to write) workspaces (ACCESS_DENIED)
  • 404 Not found, or the user cannot read it (NOT_FOUND)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/comments/<threadId>/status" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/comment/{commentId}

Changes the text of a comment. Only its author can; the people mentioned for the first time are notified.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

commentId requiredpathstring

Identifier of the comment

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
text requiredstring

Responses

  • 200 The comment
  • 400 Empty or too long text (EMPTY, TOO_LONG)
  • 401 Invalid authorization
  • 403 Not its author (FORBIDDEN_EDIT), or the token cannot write
  • 404 Not found, or the user cannot read it (NOT_FOUND)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/comment/<commentId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

DELETE /api/v2/workspace/{workspaceId}/comment/{commentId}

Deletes a comment: its author or an administrator of the workspace (who manages its permissions). A thread left without comments is deleted too.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

commentId requiredpathstring

Identifier of the comment

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Deleted
  • 401 Invalid authorization
  • 403 Neither its author nor an administrator (FORBIDDEN_DELETE), or the token cannot write
  • 404 Not found, or the user cannot read it (NOT_FOUND)
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>/comment/<commentId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/workspace/{workspaceId}/annotations

The annotations of dates of a visualization (its own and those of the date fields of its source) or of a source, oldest date first, and whether the user can add them.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

visualizationquerystring

Identifier of a visualization

sourcequerystring

Identifier of a source

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 The annotations
  • 401 Invalid authorization
  • 403 The token lacks the permission to read (or to write) workspaces (ACCESS_DENIED)
  • 404 Not found (NOT_FOUND)
Example
curl -X GET "https://app.air-core.io/api/v2/workspace/<workspaceId>/annotations" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

POST /api/v2/workspace/{workspaceId}/annotations

Marks a date or a range with a short text on a visualization (its date axis) or on a date field of a source (every chart over that field, and the forecasts of the source). It needs permission to edit the visualization (view_edit) or the source (source_edit), or to own it. With shared it also shows in shared links and embedded views; comments never do.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
target_type requiredstring: visualization | source
target_id requiredstring
fieldinteger | string

Date field of the source (index or name); required on a source

date_from requiredstring
date_tostring
text requiredstring
sharedboolean

Responses

  • 200 The annotation
  • 400 Wrong date or range (BAD_DATE, BAD_RANGE), not a date field (BAD_FIELD), empty or too long text (EMPTY, TOO_LONG)
  • 401 Invalid authorization
  • 403 No permission to edit the visualization or the source (FORBIDDEN_ANNOTATE), or the token cannot write
  • 404 Not found (NOT_FOUND)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/annotations" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

POST /api/v2/workspace/{workspaceId}/annotations/{annotationId}

Changes an annotation: only the fields sent. The same permission as adding it.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

annotationId requiredpathstring

Identifier of the annotation

x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
fieldinteger | string
date_fromstring
date_tostring
textstring
sharedboolean

Responses

  • 200 The annotation
  • 400 Wrong values (BAD_DATE, BAD_RANGE, BAD_FIELD, EMPTY, TOO_LONG)
  • 401 Invalid authorization
  • 403 No permission (FORBIDDEN_ANNOTATE)
  • 404 Not found (NOT_FOUND)
Example
curl -X POST "https://app.air-core.io/api/v2/workspace/<workspaceId>/annotations/<annotationId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG" \
  -H "Content-Type: application/json" -d @body.json

DELETE /api/v2/workspace/{workspaceId}/annotations/{annotationId}

Deletes an annotation. The same permission as adding it.

Parameters

NameInTypeDescription
workspaceId requiredpathstring

Identifier of the workspace

annotationId requiredpathstring

Identifier of the annotation

x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 Deleted
  • 401 Invalid authorization
  • 403 No permission (FORBIDDEN_ANNOTATE)
  • 404 Not found (NOT_FOUND)
Example
curl -X DELETE "https://app.air-core.io/api/v2/workspace/<workspaceId>/annotations/<annotationId>" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "x-organization: $AIRCORE_ORG"

GET /api/v2/notifications

The latest notifications of the user (someone mentioned them or replied to their thread) that they can still open, and how many are unread.

Parameters

NameInTypeDescription
limitqueryinteger
x-auth-token requiredheaderstring

Autentication token

Responses

  • 200 The notifications
  • 401 Invalid authorization
  • 403 The token lacks the permission to read (or to write) workspaces (ACCESS_DENIED)
Example
curl -X GET "https://app.air-core.io/api/v2/notifications" \
  -H "x-auth-token: $AIRCORE_TOKEN"

POST /api/v2/notifications/read

Marks a notification, or all of them (all), as read.

Parameters

NameInTypeDescription
x-auth-token requiredheaderstring

Autentication token

Request body application/json

FieldTypeDescription
id requiredstring

Responses

  • 200 Done
  • 401 Invalid authorization
  • 403 The token lacks the permission to read (or to write) workspaces (ACCESS_DENIED)
Example
curl -X POST "https://app.air-core.io/api/v2/notifications/read" \
  -H "x-auth-token: $AIRCORE_TOKEN" \
  -H "Content-Type: application/json" -d @body.json