Skip to main content
Version: 1.1

admin.publishSignals

Require access to Admin namespace

For an integration to access this method, it must have been granted access to the Admin namespace.

A resource save method that create or update items from signals.

Method parameters

ParameterPropertiesDescription
integration
Integration ID
requiredThe integration to publish signals from.
itemsBySignal
map(Signal ID => Item save view)
requiredMap of signal IDs to item meta-data.
createOnly
bool
default=falseIf set to true, skip update of for existing items.

Result

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

type: object

FieldDescription
itemsBySignal
map(Signal ID => Save summary)
Save summary for items mapped by signal ID.

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}
# SIGNAL_ID=<id from admin.selectSignals result>
# SIGNAL_HASH=<meta.attributesHash from admin.selectSignals result>
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.1' \
--data '
{
"jsonrpc": "2.0",
"method": "admin.publishSignals",
"id": "1",
"params": {
"integration": "'${INTEGRATION_ID}'",
"itemsBySignal": {
"'${SIGNAL_ID}'" : {
"annotations": {
"docs-clarify-io/example/source-signal/attributes-hash": "'${SIGNAL_HASH}'",
"docs-clarify-io/example/source-signal/id": "'${SIGNAL_ID}'"
},
"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": "✅",
"1": "🔥"
},
"sampleInterval": "PT15M",
"gapDetection": "PT2H"
}
},
"createOnly": false
}
}'