admin.selectSignals
Require access to Admin namespace
For an integration to access this method, it must have been granted access to the Admin namespace in Clarify.
This method retrieves signal meta-data as well as items published from these signals.
Example
- cURL
# BASIC_AUTH_USERNAME=<Username from Basic Auth credentials>
# BASIC_AUTH_PASSWORD=<Password from Basic Auth credentials>
# INTEGRATION_ID=${BASIC_AUTH_USERNAME}
curl --request POST \
--url 'https://api.clarify.io/v1/rpc' \
--header 'content-type: application/json' \
--header 'Authorization: Bearer <YOUR ACCESS TOKEN>' \
--header 'X-API-Version: 1.1' \
--data \
'
{
"jsonrpc": "2.0",
"method": "admin.selectSignal",
"id": 10,
"params": {
"integration": "'${INTEGRATION_ID}'",
"signals": {
"include": true,
"filter": {"name":{"$in": ["a", "b"]}},
"limit": 2
},
"items": {
"include": true
}
}
}
'
Method parameters
Name | Type | Properties | Description |
---|---|---|---|
integration | Integration ID | required | Integration to show signals for. |
signals | Resource query | default = {} | Query which signals to select, and configure signal inclusion. |
items | Items query | default = {} | Configure item inclusion. By default, no meta-data is included. |
Response result
type: object
Properties
Name | Type | Presence | Description |
---|---|---|---|
signals | map of Signal ID => Signal select view | When signals.include is true | Signals mapped by ID. |
items | map of Item ID => Item select view | When data.include is true | Item meta-data mapped by ID. |
Limits
Signals query:
signals.limit
can maximum be1000
.
Schema references
Items query
Name | Type | Properties | Description |
---|---|---|---|
include | boolean | default={} | Set to true to include items exposed by the selected signals. |
Integration ID
Integration ID uniquely identities a integration resource entry.
type: string(regex: "^[a-v0-9]{20}$"
)
Item ID
Item ID uniquely identities a item resource entry.
type: string(regex: "^[a-v0-9]{20}$"
)
Item select view
The item select view lists all exposed item fields.
type: object
Properties
Name | Type | Description |
---|---|---|
id | string(regex: "^[a-v0-9]{20}$" ) | |
meta | Resource meta | |
annotations | map 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/ . |
name | string | The default signal display name. |
type | string(numeric or enum ) | The default signal type. |
description | string | The default signal description |
labels | map of string(regex: "^[A-Za-z0-9-_/]{1,128}$" ) => array of string | The default signal labels. |
engUnit | string | Default signal display unit, used in numeric representations. |
enumValues | map of string(integer in range 0-9999 ) => string | Default item enum values, used to replace numeric values with text in enumerated representations. |
sourceType | string("measurement" or "aggregation" or "prediction" ) | Default item source type. |
sampleInterval | null or string(RFC 3339 duration) | How often the signal is sampled (on average). |
gapDetection | null or string(RFC 3339 duration) | The 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"
}
Resource meta
type: object
Properties
Name | Type | Description |
---|---|---|
contentHash | string | Hash of "relevant" fields in the resource (better definition in expected next API version) |
createdAt | string(RFC 3339 timestamp) | When the resource was created. |
updatedAt | string(RFC 3339 timestamp) | When the resource was updated. |
Resource query
Query a resource in Clarify.
type: object
Properties
Name | Type | Properties | Description |
---|---|---|---|
include | boolean | default = null | Set to true to include matched resources in the response. |
filter | Resource filter | default = {} | Filter which resources to include. |
limit | integer | default = 10 | Number of resources to include in the result. |
skip | integer | default = 0 | Skip the first N items. |
Signal ID
Signal ID uniquely identities a signal resource entry.
type: string(regex: "^[a-v0-9]{20}$"
)
Signal select view
The signal select view lists all exposed signal fields.
type: object
Properties
Name | Type | Description |
---|---|---|
id | string(regex: "^[a-v0-9]{20}$" ) | |
meta | Resource meta | |
annotations | map 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/ . |
name | string | The default signal display name. |
type | string(numeric or enum ) | The default signal type. |
description | string | The default signal description |
labels | map of string(regex: "^[A-Za-z0-9-_/]{1,128}$" ) => array of string | The default signal labels. |
engUnit | string | Default signal display unit, used in numeric representations. |
enumValues | map of string(integer in range 0-9999 ) => string | Default item enum values, used to replace numeric values with text in enumerated representations. |
sourceType | string("measurement" or "aggregation" or "prediction" ) | Default item source type. |
sampleInterval | null or string(RFC 3339 duration) | How often the signal is sampled (on average). |
gapDetection | null or string(RFC 3339 duration) | The default item gap detection. A gap will be drawn whenever there is no data for a duration longer than the specified value. |
item | Item ID | The 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"
}