Skip to main content

Publish signals

With the signals created, there is one final step to complete before we can view our data in Clarify and that is publishing our signals. This step exists to allow for a final quality control of the signal metadata, and to ensure that manual edits that we do to metadata is not overwritten by the integration code. The publish step creates items that can be visualized in Timelines, tagged in comments, and discussed with our colleagues.

Using the UI

Programmatically (experimental)

Publishing signals through API

In version 1.1beta1 of the API the support for publishing signals has been added. This makes it easier to publish large numbers of signals. To learn more about this, check out the reference guide.

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.1' \
--data \
'
{
"jsonrpc": "2.0",
"method": "admin.selectSignal",
"id": 10,
"params": {
"integration": "'${INTEGRATION_ID}'",
"query": {
"filter": {
"annotations.docs-clarify-io/example/name": "select_signals"
},
"limit": 10
},
"include": ["item"]
}
}
'

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

What's next?

Now that you have created your first signal and published it, you should be ready to start integrating some actual data sources. Check out the integration guides to learn how to connect specific data sources, or head on over to the user guides to learn more about interacting with Clarify.