Returns the list of all metrics that where published under the specified Topic.
For each returned Metric its name and type will be returned. Value is not returned.
Please keep in mind that when supplying a Topic as a query parameter in a URL, proper URL encoding is necessary for characters like '+' (replace it with '%2B') and '#' (replace it with '%23').
name | type | description | default | constraints |
---|---|---|---|---|
limit | query | Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. | 50 | required |
offset | query | Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. | 0 | required |
topic | query | Mandatory parameter with the topic for which metrics are requested. |
media type | data type | description |
---|---|---|
application/json | MetricsResult (JSON) | The list of requested Metrics objects. |
application/xml | metricsResult (XML) |
GET /metrics/searchByTopic
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"limitExceeded" : true,
"metricInfo" : [ {
"name" : "...",
"type" : "...",
"value" : "..."
}, {
"name" : "...",
"type" : "...",
"value" : "..."
} ]
}
Returns the last message published to the specified topic but only the values for the metrics specified will be contained in the response to keep it compact and efficient. While the response is modeled as a MessageResult, the result will always contain one single EdcMessage - the last one published to the specified topic. The returned EdcMessage will provide the timestamp and position of the message; the metrics contained will be limited to the one specified; no binary message body will be available. Please keep in mind that when supplying a Topic as a query parameter in a URL, proper URL encoding is necessary for characters like '+' (replace it with '%2B') and '#' (replace it with '%23').
name | type | description | multivalued |
---|---|---|---|
metric | query | yes | |
topic | query | Mandatory parameter with the topic for which metrics are requested. | no |
media type | data type | description |
---|---|---|
application/json | MessagesResult (JSON) | The last EdcMessage published under the specified topic. The return message will be only partially populated. |
application/xml | messagesResult (XML) |
GET /metrics/values
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"limitExceeded" : true,
"message" : [ {
"topic" : "...",
"receivedOn" : 12345,
"payload" : {
"sentOn" : 12345,
"position" : { },
"metrics" : { },
"body" : "..."
},
"uuid" : "...",
"edcTopic" : {
"systemTopic" : true,
"edcTopic" : true,
"alertTopic" : true,
"account" : "...",
"asset" : "...",
"semanticTopic" : "...",
"leafName" : "...",
"parentTopic" : "...",
"grandParentTopic" : "...",
"fullTopic" : "...",
"topicParts" : [ "...", "..." ]
}
}, {
"topic" : "...",
"receivedOn" : 12345,
"payload" : {
"sentOn" : 12345,
"position" : { },
"metrics" : { },
"body" : "..."
},
"uuid" : "...",
"edcTopic" : {
"systemTopic" : true,
"edcTopic" : true,
"alertTopic" : true,
"account" : "...",
"asset" : "...",
"semanticTopic" : "...",
"leafName" : "...",
"parentTopic" : "...",
"grandParentTopic" : "...",
"fullTopic" : "...",
"topicParts" : [ "...", "..." ]
}
} ]
}
Returns the list of metrics published under the given Topic with the specific range of values. This API is available only if the metrics data are indexed by value. If the index metrics data is set to "none", the query is not available. The topic, metric name, metric type and min and max values are mandatory fields for this API, while the limit, offset and sorting fields are optional. Wild cards on the topic name can be used to aggregate messages at the different topic levels. For example, a topic "edcguest/+/bus/#" can used to return all messages published under the edcguest account, across all the assets, and for all the buses. Please keep in mind that when supplying a Topic as a query parameter in a URL, proper URL encoding is necessary for characters like '+' (replace it with '%2B') and '#' (replace it with '%23').
If the flag limitExceeded is set, the maximum number of entries to be returned has been reached, more data exist and can be read by moving the offset forward in a new request
If the parameter "sort" is set to "asc", metrics are returned smaller first.
name | type | description | default | constraints |
---|---|---|---|---|
limit | query | Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. | 50 | required |
max | query | Mandatory parameter with maximal value of the range of the metric to be applied. | ||
metric | query | Mandatory parameter with the name of the metric used for the data filtering. | ||
min | query | Mandatory parameter with minimal value of the range of the metric to be applied. | ||
offset | query | Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. | 0 | required |
sort | query | specify the sort order for metrics : "asc" return messages in ascending order (oldest first), "desc" or not set, messages are returned newest first | desc | |
topic | query | Mandatory parameter with the topic for which messages are requested. | ||
type | query | Mandatory parameter with the type of the metric used for the data filtering. Allowed types are: string, double, int, float, long, boolean. |
media type | data type | description |
---|---|---|
application/json | MetricValuesResult (JSON) | The list of requested Metrics. |
application/xml | metricValuesResult (XML) |
GET /metrics/valuesByRange
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"limitExceeded" : true,
"metricValue" : [ {
"timestamp" : 12345,
"value" : "...",
"UUID" : "...",
"uuid" : "..."
}, {
"timestamp" : 12345,
"value" : "...",
"UUID" : "...",
"uuid" : "..."
} ]
}
Returns the list of metrics published under the given Topic with the specific range of timestamp. This API is available only if the metrics data are indexed by timestamp. If the index metrics data is set to "none", the query is not available. The topic, metric name, metric type and start and end date are mandatory fields for this API, while the limit, offset and sorting fields are optional. Wild cards on the topic name can be used to aggregate messages at the different topic levels. For example, a topic "edcguest/+/bus/#" can used to return all messages published under the edcguest account, across all the assets, and for all the buses. Please keep in mind that when supplying a Topic as a query parameter in a URL, proper URL encoding is necessary for characters like '+' (replace it with '%2B') and '#' (replace it with '%23').
If the flag limitExceeded is set, the maximum number of entries to be returned has been reached, more data exist and can be read by moving the offset forward in a new request
If the parameter "sort" is set to "asc", metrics are returned oldest first.
name | type | description | default | constraints |
---|---|---|---|---|
endDate | query | Mandatory parameter with the end date of the date range requested. The parameter is expressed as a long counting the number of milliseconds since January 1, 1970, 00:00:00 GMT. If not specified it means current time. Alternatively, the date can be expressed as a string following the ISO 8601 format. | ||
limit | query | Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. | 50 | required |
metric | query | Mandatory parameter with the name of the metric used for the data filtering. | ||
offset | query | Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. | 0 | required |
sort | query | specify the sort order for metrics : "asc" return messages in ascending order (smallest first), "desc" or not set, messages are returned greatest first | desc | |
startDate | query | Mandatory parameter with the start date of the date range requested. The parameter is expressed as a long counting the number of milliseconds since January 1, 1970, 00:00:00 GMT. If not specified it means no start date. Alternatively, the date can be expressed as a string following the ISO 8601 format. | ||
topic | query | Mandatory parameter with the topic for which messages are requested. | ||
type | query | Mandatory parameter with the type of the metric used for the data filtering. Allowed types are: string, double, int, float, long, boolean. * |
media type | data type | description |
---|---|---|
application/json | MetricValuesResult (JSON) | The list of requested Metrics. |
application/xml | metricValuesResult (XML) |
GET /metrics/valuesByTimestamp
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"limitExceeded" : true,
"metricValue" : [ {
"timestamp" : 12345,
"value" : "...",
"UUID" : "...",
"uuid" : "..."
}, {
"timestamp" : 12345,
"value" : "...",
"UUID" : "...",
"uuid" : "..."
} ]
}