Skip to main content
Version: 1.1beta2

integration.saveSignals

A resource save method that create or update signals using an input key that's unique in combination with an integration ID. If no signal with a given key exists for the integration, it's automatically created. The input is made available on each signal as a read-only attribute. An integration can only interact with it's own signals using this call.

Method parameters

ParameterPropertiesDescription
integration
Integration ID
requiredThe integration to save signals for.
signalsByInput [alias: input]
map(Input key => Item save view)
requiredMap of input keys to signal meta-data.
createOnly
bool
default=falseIf set to true, skip update of for existing signals.

Result

The result contain a map that links each input key in the request to a signal save summary, which include a globally unique signal ID.

type: object

FieldDescription
signalsByInput
map(Input key => Save summary)
Save summary for signals mapped by signal ID.

Billing

Typically plans restrict the number of signals.

Exceeding the limitations allowed by your plan may result in additional charges.

Example

The curl example uses Basic Auth for simplicity.

# 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.1beta2' \
--data '
{
"jsonrpc": "2.0",
"method": "integration.saveSignals",
"id": "1",
"params": {
"integration": "'${INTEGRATION_ID}'",
"signalsByInput": {
"banana-stand/amount": {
"annotations": {
"docs-clarify-io/example/name": "save_signals",
},
"name": "Amount",
"description": "Amount at location, counted manually.",
"labels": {
"data-source": ["manual"],
"location": ["banana stand", "pier"]
},
"engUnit": "USD"
},
"banana-stand/status": {
"annotations": {
"docs-clarify-io/example/name": "save_signals",
"docs-clarify-io/example/publish": "true"
},
"name": "Building status",
"description": "Overall building status, aggregated from environmental sensors."
"labels": {
"data-source": ["manual"],
"location": ["banana stand", "pier"]
},
"sourceType": "aggregation"
"valueType": "enum".
"enumValues": {
"0": "not on fire",
"1": "on fire"
},
"sampleInterval": "PT15M",
"gapDetection": "PT2H"
}
}
}
}'