Skip to main content
Version: 1.1beta1

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.1beta1' \
--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.

Respoonse result

type: object

Properties

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

Limits

Billing:

  • Signals above the amount allowed by your selected plan, may be charged.

Schema references

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}$)

Integration ID

Integration ID uniquely identities a integration resource entry.

type: string(regex: "^[a-v0-9]{20}$")

Save summary

type: object

Properties

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

Example

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

Signal save view

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

type: object

Properties

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

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"
}