Airflows Data Platform
EspaƱol
English (Deprecated)
IntroductionFirst stepsAdmin toolFormsLists of valuesFunctionsSecurityReportsWeb packagesWeb linksAutoMLDashboardsIAMSettingsAdmin tasksAPI referenceLoginQuerying dataEditing dataAggregationsOther functionsHow to'sFAQ

Airflows

API reference

Airflows provides a powerful and flexible GraphQL API, synchronized with the data model.

It allows to build data-intensive applications on top of it.

It enables easy integration with other platforms, generation of new opportunities, greater agility in transformation processes, job automation, and more.

An API console is available in https://<your-instance-fqdn>/graphql.

API can be tested using this console before integrating into custom applications.

There is a button "copy curl" that exports the GraphQL query to an HTTP POST curl request in order to easy the portability to other platforms.


Login

Login into the API with a valid username and password in order to obtain a valid access token.

Airflows

Then, use the access token in every API call to identify the user.

Current user

Obtain current user by passing a valid access token.

Airflows


Querying data

All the information stored in Airflows can be queried using the API. This includes model information also (i.e. "Models" schema).

Query parameters

Queries can be customized using several parameters:

Parameter nameDescriptionExample
limitNumber of entities to query (i.e. to enable query pagination).limit: 10
offsetNumber of entities to skip (i.e. to enable query pagination).offset: 100
orderByOrder criteria.orderBy: [{attribute: name direction: ASC nullsGo: FIRST}]
whereFilter criteria.where: {id: {EQ: 10}}

Airflows

Note that the results can be renamed specifying a label before the entity or field names.

Query criteria

Compose a filter criteria combining different operators.

Airflows

Depending on field type, several operators are available:

OperatorDescription
EQTrue if the field is equals to the parameter.
GETrue if the field is greater than or equals to the parameter.
GTTrue if the field is greater than the parameter.
ILIKETrue if the field matches case insensitive the pattern (i.e. name ILIKE '%peter%').
INTrue if the field is included in a set of values.
IS_NULLTrue if the field is NULL.
LETrue if the field is less than or equals to the parameter.
LIKETrue if the field matches the pattern (i.e. name ILIKE '%Peter%').
LTTrue if the field is less than the parameter.
NETrue if the field is not equals to the parameter.
SEARCHTrue if the field matches the free text search filter.

Airflows

The following boolean operators are supported:

OperatorDescription
ORMust match any of the combined conditions (disjunction).
ANDMust match all of the combined conditions (conjunction).
NOTNegates a filter.

Airflows

Use the following operators to specify a more specific search request in the free-text search criteria:

OperatorDescriptionExample value
:*Search any term starting with a prefixlad:*
|OR condition. Search results containing some of the terms.ladies
&AND condition. Search results containing all of the terms.men & shirts
()Group parts of the expression to give more precedence.(men

Airflows

Related entities can be queried by joining them into the main query in both directions (i.e. from referencing to referenced entity [n-to-1] and opposite [1-to-n]).

Airflows

When querying related entities (1-to-n), additional parameters can be specified:

Parameter nameDescriptionExample
joinTypeJoint type (i.e. INNER [only entities with related entities], OUTER [all the entities])joinType: INNER
offsetNumber of entities to skip (i.e. to enable query pagination).offset: 100
orderByOrder criteria.orderBy: [{attribute: name direction: ASC nullsGo: FIRST}]
whereFilter criteria.where: {id: {EQ: 10}}

Airflows

Example query: Get all the categories that have products, and for each category, get the first three products ordered by name.

Airflows

Querying documents

Fields of type document have special attributes which can be queried independently.

Airflows

Example query: Get image data including thumbnail for product which id is 98.

Airflows

In order to store the document, there are additional endpoints:

OperationEndpointExample
Get documentGET /wopi/files/:schemaName/:entityName/:id/:attributeName/contentsGET /wopi/files/Demo/Product/99/largeImage/contents?inline=true&access_token=eyJh... (i.e. "if inline is not specified then attachment will be used")
Post documentPOST /document/:schemaName/:entityName/:id/:attributeName/contentsPOST /document/Demo/Product/99/largeImage/contents

Variables

Parameter values can be also specified as variables.

Airflows


Editing data

GraphQL API offers mutations also in order to alter the stored data in the platform.

Creating new data

Add data using "create" operations.

Airflows

Updating data

Update data using "update" operations.

Airflows

Deleting data

Delete data using "delete" operations.

Airflows


Aggregations

GraphQL API offers aggretations in order to analyze data.

Airflows

Depending on the field type, different aggregation operations are available:

OperationDescription
_avgThe average value.
_maxThe maximum value.
_minThe minimum value.
_sumThe sum of the values.
_countThe count of the values.
_distinct_countThe count of the distinct values.
_stddevThe standard deviation of the values.
_varianceThe variance of the values.

Airflows

Buckets

GraphQL API offers buckets in order to group information based on different criteria.

Then, information on each bucket can be aggregated.

Buckets can be specified in two different ways:

Custom bounds buckets

Example: Count products in the following price ranges:

  • Bucket 0: Products which price is less than 10.
  • Bucket 1: Products which price is greater than or equals to 10 and less than 50.
  • Bucket 2: Products which price is greater than or equals to 50 and less than 100.
  • Bucket 3: Products which price is greater than or equals to 100.

Airflows

Equal-width buckets

Example: Count products in ten different groups of prices that go from 0 to 100.

Airflows


Other functions

Refreshing the access token

Access token expires each 60 minutes. Refresh token using refreshToken operation.

Airflows