Skip to main content
Version: 1.0

integration.saveSignals

This call creates or updates a set of signals with the provided meta data. Each signal is uniquely identified by it's input ID in combination with the integration ID.

An integration can only interact with it's own signals using this call.

Example​

# BASIC_AUTH_USERNAME=<Username from Basic Auth credentials>
# BASIC_AUTH_PASSWORD=<Password from Basic Auth credentials>
# INTEGRATION_ID=${BASIC_AUTH_USERNAME}
curl -u ${BASIC_AUTH_USERNAME}:${BASIC_AUTH_PASSWORD} \
--request POST \
--url https://api.clarify.io/v1/rpc \
--header 'content-type: application/json' \
--header 'X-API-Version: 1.0' \
--data \
'
{
"jsonrpc": "2.0",
"method": "integration.SaveSignals",
"id": "1",
"params": {
"integration": "'${INTEGRATION_ID}'",
"inputs": {
"a" : {
"name": "Signal A",
"labels": {
"data-source": ["<your data-source name>"],
"location": ["<your location name>"]
}
}
}
}
}
'

Method parameters​

NameTypeRequiredDescription
integrationIntegration IDYesThe ID if the integration to save signal information for.
inputsmap of Input ID => Signal save viewYesDesired signal information mapped by Input ID.
createOnlyBooleanNoIf set to true, skip update of information for existing signals. That is, all Input IDs that map to existing signals are silently ignored.

Response result​

type: object

Properties​

NameTypePresenceDescription
signalsByInputmap of Input ID => Save summaryYesSave operation summary per input.

Schema references​

Save summary​

type: object

Example​

{
"id": "c9137visahsjsdhrim6g",
"created": true
}

Properties​

NameTypeDescription
idstringUnique ID of the saved resource entry.
createdbooleanTrue if a new instance was created.

Integration ID​

Integration ID unqily identies a integration resourc entry.

Input ID​

Input ID routes data to a signal during insert. The input ID must be unique per integration only.

type: string(regex: ^[a-zA-Z0-9-_:.#+/]{1,128}$)

Signal save view​

The signal save view lists all writable signal fields. There are no required properties.

type: object

Example​

signal example
{
"name": "Ice Cream Temperature",
"type": "numeric",
"description": "Temperature measurement of the ice cream",
"labels": {
"flavours": ["sweet", "sour"],
"location": ["pier", "banana stand"]
},
"engUnit": "°C",
"sourceType": "measurement",
"sampleInterval": "PT1M",
"gapDetection": "PT5M"
}

Properties​

NameTypeDefaultDescription
annotationsmap of string(regex: "^[A-Za-z0-9-_/]{1,128}$") => string{}Arbitrary configuration parameters. Customer-provided annotations should use a relevant prefix, e.g. company-domain/application-name/.
namestringSame as Input IDThe default signal display name.
typestring(numeric or enum)numericThe default signal type.
descriptionstring""The default signal description
labelsmap of string(regex: "^[A-Za-z0-9-_/]{1,128}$") => array of string{}The default signal labels.
engUnitstring""Default signal display unit, used in numeric representations.
enumValuesmap of string(integer in range 0-9999) => string{}Default item enum values, used to replace numeric values with text in enumerated representations.
sourceTypestring("measurement" or "aggregation" or "prediction")"measurement"Default item source type.
sampleIntervalnull or string(RFC 3339 duration)nullHow often the signal is sampled (on average).
gapDetectionnull or string(RFC 3339 duration)nullThe default item gap detection. A gap will be drawn whenever there is no data for a duration longer than the specified value.