Metrics

The following resources are applicable:

/metrics/searchByTopic

Mount Point: /v2/metrics/searchByTopic

GET

Returns the list of all metrics that where published under the specified Topic. For each returned Metric, its name, type and last value will be 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').

Parameters

name description type default
topic Mandatory parameter with the topic for which metrics are requested. query
limit Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. query 50
offset Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. query 0

Response Body

element: metricsResult
media types: application/xml
application/json

The list of requested Metrics objects.

/metrics/values

Mount Point: /v2/metrics/values

GET

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').

Parameters

name description type default
topic Mandatory parameter with the topic for which metrics are requested. query
metric (no documentation provided) query

Response Body

element: messagesResult
media types: application/xml
application/json

The last EdcMessage published under the specified topic. The return message will be only partially populated.

/metrics/valuesByRange

Mount Point: /v2/metrics/valuesByRange

GET

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.

Parameters

name description type default
topic Mandatory parameter with the topic for which messages are requested. query
limit Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. query 50
offset Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. query 0
metric Mandatory parameter with the name of the metric used for the data filtering. query
type Mandatory parameter with the type of the metric used for the data filtering. Allowed types are: string, double, int, float, long, boolean. query
min Mandatory parameter with minimal value of the range of the metric to be applied. query
max Mandatory parameter with maximal value of the range of the metric to be applied. query
sort specify the sort order for metrics : "asc" return messages in ascending order (oldest first), "desc" or not set, messages are returned newest first query desc

Response Body

element: metricValuesResult
media types: application/xml
application/json

The list of requested Metrics.

/metrics/valuesByTimestamp

Mount Point: /v2/metrics/valuesByTimestamp

GET

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.

Parameters

name description type default
topic Mandatory parameter with the topic for which messages are requested. query
limit Maximum number of entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. query 50
offset Starting offset for the entries to be returned. Note that an error will be returned if the maximum allowed value is exceeded. query 0
metric Mandatory parameter with the name of the metric used for the data filtering. query
type Mandatory parameter with the type of the metric used for the data filtering. Allowed types are: string, double, int, float, long, boolean. * query
startDate 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. query
endDate 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. query
sort specify the sort order for metrics : "asc" return messages in ascending order (smallest first), "desc" or not set, messages are returned greatest first query desc

Response Body

element: metricValuesResult
media types: application/xml
application/json

The list of requested Metrics.