Skip to content

Api ​

For performance reasons AireFrame will cache data returned by AireGlu endpoints implemented for the StructuredData capability. AireFrame provides an API which you can call when data has changed externally, in order to invalidate the cache within AireFrame and refresh the data.

Updates will occur on a tenant-wide basis for a specific subject and specific data extract(s). They will run against any data obtained via any AireGlu data source. The subject is identified by a SubjectIdentifier and the data extract(s) by a DataExtractsOptionsValuesFilter. In DataExtractsOptionsValuesFilter each key is a path to a property and the associated value is the value that must be found there for the data associated with the data extract to be flagged for update. Where there are multiple filters these must all evaluate to true for the data extract to be a match.

Authentication ​

These api endpoints require a bearer token provided by AireIdentity using the OAuth client credentials. You can use the client you were provided with when setting up your first AireGlu data source. The client should have the AireFrameAireGluDataProviderApi scope.

Example Request ​

POST https://identity.aireinnovate.com/connect/token
CONTENT-TYPE application/x-www-form-urlencoded
client_id=[MY_CLIENT]&
client_secret=[MY_CLIENT_SECRET]&
grant_type=client_credentials&
tenant_key=[MY_TENANT_ENVIRONMENT_KEY]&
scope=AireFrameAireGluDataProviderApi

Endpoints ​

Url: https://frame.aireinnovate.com/{endpoint} e.g. https://frame.aireinnovate.com/aireglu-dataprovider/api/v1/dataChange/creationOrUpdate

CreationOrUpdate ​

Endpoint: aireglu-dataprovider/api/v1/dataChange/creationOrUpdate

Context: To call when there is new data for a subject, or an existing data point has changed

Verb: POST

Body:

{
    "SubjectIdentifier": "123",
    "DataExtractsOptionsValuesFilter": {"idArray[0].first": 789, "status": "active"},
    "NewOrUpdatedDataPoints": [
        {
            "Id": "myid", 
            "SubjectIdentifier": "sid", 
            "DataPointItems": [
                {
                    "Key": "mykey", 
                    "Value": {
                        "DataType": "Boolean",
                        "Value": true
                    }
                }
            ]
        }
    ]
}

Where:

  • SubjectIdentifier is the id of the subject for which the data has changed
  • DataExtractsOptionsValuesFilter defines how the data extracts for which the data has changed will be identified
  • NewOrUpdatedDataPoints are the data points that have been created or changed
    • Id is the id of the data point
    • SubjectIdentifier is the id of the subject - should match the subject id for the request
    • DataPointItems are the individual 'columns' in the 'row' that the data point represents
      • Key is the key of the item
      • Value is the DataTypeValue - see get-data-points for details of the options available for DataTypeValue

Response:
Status codes

  • 200
  • 400
  • 401
  • 404
  • 500

Removal ​

Endpoint: aireglu-dataprovider/api/v1/dataChange/removal

Context: To call when data has been removed for a subject

Verb: POST

Body:

{
    "SubjectIdentifier": "123",
    "DataExtractsOptionsValuesFilter": {"idArray[0].first": 789, "status": "active"},
    "RemovedDataPointIdentifiers": ["1"]
}

Where:

  • SubjectIdentifier is the id of the subject for which the data has changed
  • DataExtractsOptionsValuesFilter defines how the data extracts for which the data has changed will be identified
  • RemovedDataPointIdentifiers are the Ids of the data points that have been removed

Response:
Status codes

  • 200
  • 400
  • 401
  • 404
  • 500

Additional guidance ​

DataExtractsOptionsValuesFilter ​

Example data extract

{
    "type": "order",
    ...other properties...
}

A filter set to {"type": "order"} would match on this extract and any others where type was set to order

To identify what possible values there are for the properties that may appear in a data extract, see the return value of your endpoint-prefix-aireframe-get-dataset-options-schema endpoint. For example:

{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"description": "",
	"type": "object",
	"oneOf":[
	    {
	        "properties": {
	            "type":{
	                "type": "string",
	                "enum": ["account", "order", "product", "shipment", "invoice", "supplier", "customer", "organisation"]
	            }
	        },
	        "additionalProperties": false
	    }
	]
}

Last Updated: