This service allows users to create workers called subscriptions
that consume the agile API and write data to a timeseries database, it also allows users to query, create retention policies and directly write new measurements to the db.
method: POST
url: /api/subscription
body: {
deviceID: 'mySensor',
componentID: 'temperature',
// all keys below are optional
interval: '3000', // measure every 3s
retention: '7d' // All records created by this subscription are deleted after 7 days,
encrypt: {
key: // base64 encoded public key,
fields: [
'value',
] // List of keys, which values will be encrypted.
}
}
method: DELETE
url: /api/subscription/:subscriptionId
method: PUT
url: /api/subscription/:subscriptionId
body: {
interval: '10000'
}
method: GET
url: /api/subscription/:subscriptionId
method: GET
url: /api/subscription
If the request is made with with ws then a connect is opened an results will be streamed, if the request is standard http then JSON object will be returned.
method: GET
url: /api/records
method: GET
url: /api/record?<query>
method: PUT
url: /api/settings
body: {
interval: 3000
}
method: GET
url: /api/settings