Time Series Data Retrieval Service

About Time Series Data Retrieval Service

Use the following service to retrieve time series data for one or more asset tags collected over a specified time interval and aggregated by a specified function. The procedure retrieves time series data in a specified data store.

Time Series Data Retrieval Service

The Time Series Data service performs a check to ensure users can only query tags that are associated with assets they have permission to access.

The V5 version of the service supports partial tag access queries. For example, if tags are not associated with a GE Digital APM asset, or permission is not configured properly, you can query time series data using the Time Series Data service. The query response has only the tags to which you have access. The V3 version of the service supports passing the unit of measurement at the tag level. Use the UnitsTo key to specify the unit of measure for the resulting times series data (to be converted to) for the applied tag in the tagList.

This version also supports cross-tenancy data access. For example, when you have access to assets from one or more tenants, using this API, you can retrieve the data for all the assigned assets.

Table 1. Time Series Data Retrieval Service APIs v5
URL
https://api.example.com/v5/time_series/query
Note: V5 endpoint displays data quality when using KairosDB format.
JSON fields

Pass the json file in the request containing the following fields.

tagList
(required) Array of tag data. You must pass the tag source key configured in the asset model as the tagID to query for related time series data. You can query up to 100 tags per request. All tags must be associated with corresponding GE Digital APM assets and a time series link must be provided to retrieve the time series data in the data store.
Note: SmartSignal only supports one tag.
UnitsTo
(optional) Used for conversion of data units of measure. Specifies the unit of measure to which the resulting tag data will be converted. If defined at the tag level, the conversion is applied to that specific tag in the tagList.
UnitsFrom
(optional) Used for conversion of data units of measure. Specifies the unit of measure to which the resulting tag data will be converted. If defined at the tag level, the conversion is applied to that specific tag in the tagList. If omitted, the units are derived on the tag configuration in the asset model.
systemOfMeasure
A service that provides users with a UnitsTo and UnitsFrom conversion method for a specified UOM instance. If not specified, it will default to None.
attributes
(optional) Used to filter the time series data by tag attributes. Defining this at the tag level, the filter applies to the tag. If defined at the query level, the filter applies to all tags listed in the query. Definition at the tag level takes precedence over the query level.
groups
(optional) Used to group the time series data by tag attributes. Defining this at the tag level, the grouping applies to the tag, or if defined at the query level, the grouping applies to all tags listed in the query. Definition at the tag level takes precedence over the query level.
operation
(required) Type of data to retrieve. The following are the supported values.
  • (All data sources) raw - retrieve all data points as they were ingested.
  • (SmartSignal data sources only) downsampled - returns sampled data points from SmartSignal.
    Note: If you are using this operation for other data sources, then this operation will be ignored, and all raw data points will be returned.
  • (All data sources) interpolated - retrieve data points interpolated based on the sampleCount or interval parameters.
  • (All data sources) current - retrieve most recent data point.
  • (Predix data sources only) sum - retrieve all data points in the specified time range and sum them to receive one aggregated value, or explicitly specify a time interval to receive a sum of each interval.
  • (Predix data sources only) avg - retrieve all data points in the specified time range with an interval to return the average value of each interval.
Note: For SmartSignal, the only values supported are raw and downsampled.
startTime
(required, if operation is interpolated or raw) Beginning of the time range. The supported formats are:
  • Unix Epoch - in milliseconds,
  • ISO8601 (formats: [yyyy-MM-dd’T’HH:mm:ss.SSS±hhmm, yyyy-MM-dd’T’HH:mm:ss.SSS]),
  • Relative time (format: "<value><units>-ago", units: [ms, s, mi, h, d, w], example: "10d-ago").
Note: If the start date is empty, then the query searches data back only for last 15 days and provides only one latest data point. If the start date is specified, then the query searches data from given start time to now and provides only one latest data point.
endTime
(required, if operation is interpolated) End of the time range. The default value is current date and time. The supported formats are:
  • Unix Epoch - in milliseconds,
  • ISO8601 (formats: [yyyy-MM-dd’T’HH:mm:ss.SSS±hhmm, yyyy-MM-dd’T’HH:mm:ss.SSS]),
  • Relative time (format: "<value><units>-ago", units: [ms, s, mi, h, d, w], example: "10d-ago").
interval
(optional) Positive integer in milliseconds. Indicates a time interval that query for interpolated data is based on. For example, 1000 - every one second. Use either sampleCount or interval, but not both.
Note: Not supported by SmartSignal.
sampleCount
(optional) Number of data points to retrieve when using raw and interpolated operation. For interpolated operation, use either sampleCount or interval, but not both.
Note: Not supported by SmartSignal.
last
(Predix data sources only) The value of the last point in the interval.
dataSource
(optional) Name of the data source as defined by the data source configuration.
useOnlyGoodData
(optional) Indicator to retrieve data with the quality indicator 'Good' (3). The allowed values are: true, false, default value, and false.
Note: Not supported by SmartSignal.
direction
(optional) The direction by which data points are retrieved (by timestamp). The supported values are: backward retrieves data points backwards on the endTime; forward retrieves data points forward on the startTime; default value forwards the data.
Note: Not supported by SmartSignal.
queryDirection
(optional) The query that retrieves data points using the values backward and forward, which are specified direction options associated only with the startTime.
responseFormat
(optional) The format of the retrieved data. The supported values are :KAIROSDB,PROFICYLIKE and ANALYTICS. The default value is PROFICYLIKE.
precisionLevel
(optional) Positive integer that defines precision level of numeric tag values. The default value is as defined by the configuration.
useOnlyNumericData
(optional) Indicator to retrieve only numeric tag values. The allowed values are: true, false. The default value is true
fetchType
(optional) Defines the fetch type for the query result. Supported values:
  • SYNC - (default) Fetches the query data in synchronous mode.
  • ASYNC - Fetches the query data asynchronously. Users are provided with a correlation ID, which is used to fetch the query result.
  • DYNAMIC - The Predix Time Series service provides the query result either synchronously or asynchronously based on the underlying data storage configuration. For synchronous queries, users are provided with the query results; for asynchronous queries, users receive a correlation ID.
Note:

fetchType is supported only for the Predix Time Series and Proficy Historian data source types. For other data source types, fetchType is ignored, and the results are returned in synchronous mode.

ASYNC and DYNAMIC fetch types are not supported in all Predix Time Series service infrastructures, in which case ASYNC queries return a 400 error, and DYNAMIC queries are handled as SYNC queries.

asyncCorrelationId
The Time Series Data–generated correlation ID used to retrieve the results of previously submitted queries using the ASYNC and DYNAMIC fetch types.
MethodPOST
Sample Request
POST /v5/time_series/query HTTP/1.1
Content-Type: application/json
accept: application/json
Authorization: <Authorization>
tenant: <tenant>
Host: api.example.com
Content-Length: 350

{
  "operation" : "raw",
  "startTime" : "2015-12-13T18:42:33.224",
  "endTime" : "2016-02-09T16:00:00.000Z",
  "sampleCount" : 3,
  "useOnlyGoodData" : true,
  "direction" : "forward",
  "responseFormat" : "kairosDB",
  "precisionLevel" : "3",
  "useOnlyNumericData" : true,
  "tagList" : [ {
    "tagId" :  "/tenants/361d09ad-735d-4259-8d52-c0494ac99cf5/tags/bd42f265-13dc-417c-8382-99cd25b02347"  } ]
}
The following is a sample request for cross-tenancy only:
HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

Content-Length: 238

 

{

  "queries" : [ {

    "sample_size" : 3,

    "results" : [ {

      "name" : "/tenants/361d09ad-735d-4259-8d52-c0494ac99cf5/tags/bd42f265-13dc-417c-8382-99cd25b02347",

      "values" : [ [ 1454811103000, 2.123, 3 ], [ 1454880103000, 2.123, 3 ], [ 1454885503000, 999.234, 3 ] ]

    } ]

  } ]

}

Sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 238

{
  "queries" : [ {
    "sample_size" : 3,
    "results" : [ {
      "name" : "Inverter1-ASSET-TYPE1.Tag_Length",
      "values" : [ [ 1454811103000, 2.123, 3 ], [ 1454880103000, 2.123, 3 ], [ 1454885503000, 999.234, 3 ] ]
    } ]
  } ]
}
Status CodeOn successful retrieval, you receive a 200 OK and tag data in requested format.

The query output in the response is 200 OK regardless of whether you have access to all the tags in the list, partial access, or no access. However, the response includes only the tags for which you have permissions. If either the tag does not exists or you do not have permissions, it will not appear in the response. If you have no access to the entire list of tags, you still receive a 200 OK with an empty list.

Table 2. Time Series Data Retrieval Service APIs v4
URL
https://api.example.com/v4/time_series/query
Note: V4 endpoint displays data quality when using KairosDB format.
JSON fields

Pass the json file in the request containing the following fields.

tagList
(required) Array of tag data. You must pass the tag source key configured in the asset model as the tagID to query for related time series data. You can query up to 100 tags per request. All tags must be associated with corresponding GE Digital APM assets and a time series link must be provided to retrieve the time series data in the data store.
Note: SmartSignal only supports one tag.
UnitsTo
(optional) Used for conversion of data units of measure. Specifies the unit of measure to which the resulting tag data will be converted. If defined at the tag level, the conversion is applied to that specific tag in the tagList.
UnitsFrom
(optional) Used for conversion of data units of measure. Specifies the unit of measure to which the resulting tag data will be converted. If defined at the tag level, the conversion is applied to that specific tag in the tagList. If omitted, the units are derived on the tag configuration in the asset model.
systemOfMeasure
A service that provides users with a UnitsTo and UnitsFrom conversion method for a specified UOM instance. If not specified, it will default to None.
attributes
(optional) Used to filter the time series data by tag attributes. Defining this at the tag level, the filter applies to the tag. If defined at the query level, the filter applies to all tags listed in the query. Definition at the tag level takes precedence over the query level.
groups
(optional) Used to group the time series data by tag attributes. Defining this at the tag level, the grouping applies to the tag, or if defined at the query level, the grouping applies to all tags listed in the query. Definition at the tag level takes precedence over the query level.
operation
(required) Type of data to retrieve. The following are the supported values.
  • (All data sources) raw - retrieves all data points as they were ingested.
  • (All data sources) interpolated - retrieves data points interpolated based on the sampleCount or interval parameters.
  • (All data sources) current - retrieves most recent data point.
  • (Predix data sources only) sum - retrieves all data points in the specified time range and sum them to receive one aggregated value, or explicitly specify a time interval to receive a sum of each interval.
  • (Predix data sources only) avg - retrieves all data points in the specified time range with an interval to return the average value of each interval.
Note: For SmartSignal, the only value supported is raw.
startTime
(required, if operation is interpolated or raw) Beginning of the time range. The supported formats are:
  • Unix Epoch - in milliseconds,
  • ISO8601 (formats: [yyyy-MM-dd’T’HH:mm:ss.SSS±hhmm, yyyy-MM-dd’T’HH:mm:ss.SSS]),
  • Relative time (format: "<value><units>-ago", units: [ms, s, mi, h, d, w], example: "10d-ago").
Note: If the start date is empty, then the query searches data back only for last 15 days and provides only one latest data point. If the start date is specified, then the query searches data from given start time to now and provides only one latest data point.
endTime
(required, if operation is interpolated) End of the time range. The default value is current date and time. The supported formats are:
  • Unix Epoch - in milliseconds,
  • ISO8601 (formats: [yyyy-MM-dd’T’HH:mm:ss.SSS±hhmm, yyyy-MM-dd’T’HH:mm:ss.SSS]),
  • Relative time (format: "<value><units>-ago", units: [ms, s, mi, h, d, w], example: "10d-ago").
interval
(optional) Positive integer in milliseconds. Indicates a time interval that query for interpolated data is based on. For example, 1000 - every one second. Use either sampleCount or interval, but not both.
Note: Not supported by SmartSignal.
interpolatedMode
(optional) This mode is applicable only if the operation is interpolated. The supported values are:
  • Historian
  • SampleAndHold
  • Math
The default mode is Historian. When this field is empty, the query will use the default mode.
Note: Not supported by SmartSignal and Proficy.
sampleCount
(optional) Number of data points to retrieve when using raw and interpolated operation. For interpolated operation, use either sampleCount or interval, but not both.
Note: Not supported by SmartSignal.
dataSource
(optional) Name of the data source as defined by the data source configuration.
useOnlyGoodData
(optional) Indicator to retrieve data with the quality indicator 'Good' (3). The allowed values are: true, false, default value, and false.
Note: Not supported by SmartSignal.
direction
(optional) The direction by which data points are retrieved (by timestamp). The supported values are: backward retrieves data points backwards on the endTime; forward retrieves data points forward on the startTime; default value forwards the data.
Note: Not supported by SmartSignal.
queryDirection
(optional) The query that retrieves data points using the values backward and forward, which are specified direction options associated only with the startTime.
Note: Not supported by SmartSignal.
responseFormat
(optional) The format of the retrieved data. The supported values are :KAIROSDB,PROFICYLIKE and ANALYTICS. The default value is PROFICYLIKE.
precisionLevel
(optional) Positive integer that defines precision level of numeric tag values. The default value is as defined by the configuration.
useOnlyNumericData
(optional) Indicator to retrieve only numeric tag values. The following values are allowed: true, false. The default value is true
MethodPOST
Sample Request
POST /v4/time_series/query HTTP/1.1
Content-Type: application/json
Content-Type: application/json
accept: application/json
accept: application/json
Authorization: <Authorization>
tenant: <tenant>
Host: api.example.com
Content-Length: 350

{
  "operation" : "raw",
  "startTime" : "2015-12-13T18:42:33.224",
  "endTime" : "2016-02-09T16:00:00.000Z",
  "sampleCount" : 3,
  "useOnlyGoodData" : true,
  "direction" : "forward",
  "responseFormat" : "kairosDB",
  "precisionLevel" : "3",
  "useOnlyNumericData" : true,
  "tagList" : [ {
    "tagId" : "Inverter1-ASSET-TYPE1.Tag_Length"
  } ]
}
Sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 238

{
  "queries" : [ {
    "sample_size" : 3,
    "results" : [ {
      "name" : "Inverter1-ASSET-TYPE1.Tag_Length",
      "values" : [ [ 1454811103000, 2.123, 3 ], [ 1454880103000, 2.123, 3 ], [ 1454885503000, 999.234, 3 ] ]
    } ]
  } ]
}
Status CodeOn successful retrieval, you receive a 200 OK and a tag data in requested format.
Table 3. Time Series Data Retrieval Service APIs v3
URL
https://api.example.com/v3/time_series/query
Note: The V3 version of the service supports passing the unit of measurement at the tag level. Use the UnitsTo key to specify the unit of measure for the resulting times series data (to be converted to) for the applied tag in the tagList.
JSON fields

Pass the json file in the request containing the following fields.

tagList
(required) Array of tag data. You must pass the tag source key configured in the asset model as the tagID to query for related time series data. You can query up to 40 tags per request. All tags must be associated with corresponding GE Digital APM assets and a time series link must be provided to retrieve the time series data in the data store.
Note: SmartSignal only supports 1 tag.
UnitsTo
(optional) Used for conversion of data units of measure. Specifies the unit of measure to which the resulting tag data will be converted. If defined at the tag level, the conversion is applied to that specific tag in the tagList.
UnitsFrom
(optional) Used for conversion of data units of measure. Specifies the unit of measure to which the resulting tag data will be converted. If defined at the tag level, the conversion is applied to that specific tag in the tagList. If omitted, the units are derived on the tag configuration in the asset model.
systemOfMeasure
A service that provides users with a UnitsTo and UnitsFrom conversion method for a specified UOM instance. If not specified, it will default to None.
attributes
(optional) Used to filter the time series data by tag attributes. Defining this at the tag level, the filter applies to the tag. If defined at the query level, the filter applies to all tags listed in the query. Definition at the tag level takes precedence over the query level.
groups
(optional) Used to group the time series data by tag attributes. Defining this at the tag level, the grouping applies to the tag, or if defined at the query level, the grouping applies to all tags listed in the query. Definition at the tag level takes precedence over the query level.
operation
(required) Type of data to retrieve. The following are the supported values.
  • (All data sources) raw - retrieves all data points as they were ingested.
  • (All data sources) interpolated - retrieves data points interpolated based on the sampleCount or interval parameters.
  • (All data sources) current - retrieves most recent data point.
  • (Predix data sources only) sum - retrieves all data points in the specified time range and sum them to receive one aggregated value, or explicitly specify a time interval to receive a sum of each interval.
  • (Predix data sources only) avg - retrieves all data points in the specified time range with an interval to return the average value of each interval.
Note: For SmartSignal, the only value supported is raw.
startTime
(Required) Beginning of the time range. The supported formats are:
  • Unix Epoch - in milliseconds,
  • ISO8601 (formats: [yyyy-MM-dd’T’HH:mm:ss.SSS±hhmm, yyyy-MM-dd’T’HH:mm:ss.SSS]),
  • Relative time (format: "<value><units>-ago", units: [ms, s, mi, h, d, w], example: "10d-ago").
endTime
(required, if operation is interpolated) End of the time range. The default value is current date and time. The supported formats are:
  • Unix Epoch - in milliseconds,
  • ISO8601 (formats: [yyyy-MM-dd’T’HH:mm:ss.SSS±hhmm, yyyy-MM-dd’T’HH:mm:ss.SSS]),
  • Relative time (format: "<value><units>-ago", units: [ms, s, mi, h, d, w], example: "10d-ago").
interval
(optional) Positive integer in milliseconds. Indicates a time interval that query for interpolated data is based on. For example, 1000 - every one second. Use either sampleCount or interval, but not both.
Note: Not supported by SmartSignal.
sampleCount
(optional) Number of data points to retrieve when using raw and interpolated operation. For interpolated operation, use either sampleCount or interval, but not both.
Note: Not supported by SmartSignal.
dataSource
(optional) Name of the data source as defined by the data source configuration.
useOnlyGoodData
(optional) Indicator to retrieve data with the quality indicator 'Good' (3). The allowed values are: true, false, default value, and false.
Note: Not supported by SmartSignal.
direction
(optional) The direction by which data points are retrieved (by timestamp). The supported values are: backward retrieves data points backwards on the endTime; forward retrieves data points forward on the startTime; default value forwards the data.
Note: Not supported by SmartSignal.
queryDirection
(optional) The query that retrieves data points using the values backward and forward, which are specified direction options associated only with the startTime.
Note: Not supported by SmartSignal.
responseFormat
(optional) The format of the retrieved data. The supported values are :KAIROSDB,PROFICYLIKE and ANALYTICS. The default value is PROFICYLIKE.
precisionLevel
(optional) Positive integer that defines precision level of numeric tag values. The default value is as defined by the configuration.
useOnlyNumericData
(optional) Indicator to retrieve only numeric tag values. The allowed values are: true, false. The default value is true
MethodPOST
Sample Request
POST /v3/time_series/query HTTP/1.1
Content-Type: application/json
accept: application/json
accept: application/json
Authorization: <Authorization>
tenant: <tenant>
Host: api.example.com
Content-Length: 700

{
  "tagList" : [ {
    "tagId" : "Inverter1-ASSET-TYPE1.Tag_Pressure",
    "unitsTo" : "psi",
    "systemOfMeasure" : "test",
    "attributes" : {
      "key1" : [ "value1" ],
      "key2" : [ "value2" ]
    },
    "groups" : [ {
      "name" : "attribute",
      "attributes" : [ "Key1", "key2" ]
    } ]
  }, {
    "tagId" : "Inverter1-ASSET-TYPE2.Tag_Temperature",
    "unitsTo" : "c"
  }, {
    "tagId" : "Inverter1-ASSET-TYPE3.Tag_Length"
  } ],
  "operation" : "raw",
  "startTime" : "2016-02-09T15:00:00.000Z",
  "endTime" : "2016-02-09T16:00:00.000Z",
  "sampleCount" : 300,
  "useOnlyGoodData" : true,
  "direction" : "forward",
  "responseFormat" : "PROFICYLIKE",
  "precisionLevel" : "3",
  "useOnlyNumericData" : true
}
Sample response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 886

{
  "errorCode" : "0",
  "errorMessage" : "",
  "tagList" : [ {
    "tagId" : "Inverter1-ASSET-TYPE1.Tag_Pressure",
    "errorCode" : "0",
    "errorMessage" : "",
    "data" : [ {
      "ts" : "2016-02-07T02:11:33.000",
      "v" : "31.123",
      "q" : "3"
    }, {
      "ts" : "2016-02-07T02:11:35.000",
      "v" : "38.123",
      "q" : "3"
    } ],
    "attributes" : {
      "key1" : [ "value1" ]
    }
  }, {
    "tagId" : "Inverter1-ASSET-TYPE2.Tag_Temperature",
    "errorCode" : "0",
    "errorMessage" : "",
    "data" : [ {
      "ts" : "2016-02-07T02:11:34.000",
      "v" : "11.123",
      "q" : "3"
    } ],
    "attributes" : { }
  }, {
    "tagId" : "Inverter1-ASSET-TYPE3.Tag_Length",
    "errorCode" : "0",
    "errorMessage" : "",
    "data" : [ {
      "ts" : "2016-02-07T02:11:35.000",
      "v" : "12.123",
      "q" : "3"
    } ],
    "attributes" : { }
  } ]
}
Status CodeOn successful retrieval, you receive a 200 OK and tag data in requested format.
Table 4. Time Series Data Retrieval Service APIs V2
URLhttps://apm-timeseries-services-/v2/time_series?
Query Parameters
operation
(required)Type of data to retrieve. Supported values are raw retrieve all data points as they were ingested. Interpolated, retrieves data points interpolated based on the sampleCount or interval parameters. Current,retrieves most recent data point.
Note: For SmartSignal, the only value supported is raw.
tagList
(required, if tagExpressionList is not specified) List of comma separated tag names.
When querying time series data need to refer to a tag via tag source key as configured in the asset model. All tags must be associated with corresponding GE Digital APM assets and ensure a time series link is provided for retrieving the time series data in the data store. The value of the time series link should match the raw tag name ingested in the time series data source. You can query up to 40 tags per request. To add a tag to the asset model, refer to Add a Tag Instance to an Instance. To update the reserved attribute value, refer to About Reserved Attributes for an Asset Instance.
Note: SmartSignal only supports one tag.
tagExpressionList
(required, if tagList is not specified) List of comma separated tag expressions. A tag expression may contain one or more tag source key and constant as operands, separated by operators. Tag source key should adhere to regex - '@[a-zA-Z0-9_#\.-]+': E.g. - @TAG1_SOURCE_KEY + 1, @TAG1_SOURCE_KEY + (@TAG2_SOURCE_KEY * 1.23456) / 0.45678; Operators - +,-,*,/,().
When querying time series data, we need to refer to a tag via tag source key as configured in the asset model. All tags must be associated with corresponding GE Digital APM assets and ensure a time series link is provided for retrieving the time series data from the data store.
Attention: You can use the tag expressions when querying a tag using the tag source key. However, you cannot use the tag expressions when querying a tag using the Uniform Resource Identifier (URI) of the tag. In addition, you cannot use the tag expressions when querying a tag that is associated with an asset belonging to another tenant.
Restriction: When using tagExpressionList, if a tag value is divided by an integer, the query output will be an integer. For example, if the query output of the expression (@TS-ASSET-TYPE1.TS-TAG1/100) is 0.93, the query will return 0 instead of 0.93. The workaround is to use the float data type for numeric tag values.
startTime
(required) Beginning of the time range. Supported formats: Unix Epoch in milliseconds, ISO8601 format. For example, yyyy-MM-dd'T'HH:mm:ss.SSS±hhmm, yyyy-MM-dd'T'HH:mm:ss.SSS.
endTime
(required, if operation is interpolated) End of the time range. Supported formats: Unix Epoch in milliseconds, ISO8601 format. For example, yyyy-MM-dd'T'HH:mm:ss.SSS±hhmm, yyyy-MM-dd'T'HH:mm:ss.SSS.
interval
(optional) Positive integer in milliseconds. Indicates a time interval that query for interpolated data is based on. For example, 1000 - every one second. Use either sampleCount or interval, but not both.
Note: Not supported by SmartSignal.
sampleCount
(optional) Number of data points to retrieve when using raw and interpolated operation. For interpolated operation, use either sampleCount or interval, but not both.
Note: Not supported by SmartSignal.
dataSource
(optional) Name of the data source as defined by the data source configuration. The default value are as defined by the data source configuration.
useOnlyGoodData
(optional) Indicator to retrieve data with the quality indicator 'Good' (3). The allowed values are: true, false,default value, and false.
Note: Not supported by SmartSignal.
direction
(optional) The direction by which data points are retrieved (by timestamp). The supported values are: backward retrieves data points backwards on the endTime; forward retrieves data points forward on the startTime; default valueforwards the data.
Note: Not supported by SmartSignal.
queryDirection
(optional) The query that retrieves data points using the values backward and forward, which are specified directional options associated only with the startTime.
Note: Not supported by SmartSignal.
responseFormat
(optional) The format of the retrieved data. The supported values are :KAIROSDB,PROFICYLIKE,ANALYTICS The default value is PROFICYLIKE.
valueBounds
(optional) To retrieve the values according to lower or upper bound. Use [] to indicate inclusive check and () to indicate exclusive check. Only one condition (lower or upper bound) is supported, not both. For example, [,5] returns data with tag values less or equal to 5,and (1,) returns data with tag values greater than 1.
precisionLevel
(optional) Positive integer that defines precision level of numeric tag values. The default value is as defined by the configuration.
useOnlyNumericData
(optional) Indicator to retrieve only numeric tag values. The allowed values are: true, false. The default value is true
UnitsFrom
(optional) Used for conversion of data units of measure. Specifies the unit of measure for the stored tag data (to be converted from). The conversion is applied to ALL tags in the tagList parameter.
UnitsTo
(optional; required if from_unit is specified) Used for conversion of data units of measure. Specifies the unit of measure for the result tag data (to be converted to). The conversion is applied to ALL tags in the tagList parameter.
systemOfMeasure
A service that provides you with a UnitsTo and UnitsFrom conversion method for a specified UoM instance. If not specified, it will default to None.
rounding
Rounding will be calculated based on your specified precisionLevel. Supported values are: ceiling, floor.
MethodGET
Sample Request
http://<hostname>/services/apm/timeseries/data?
operation=interpolated
&tagList=TR6.LNG_PSK_T2C1_21;TR7.LNG_PSK_T2C1_20;TR6.LNG_PSK_T2M1_11;TR7.LNG_PSK_T2M1_11;TR6.LNG_PSK_T2M1_14
&startTime=1970-01-01T22:18:33.000
&endTime=2016-04-23T00:28:03.000
&sampleCount=300
&tenant=sample
&useOnlyGoodData=true
&dataSource=predixtss.MVP3R2SysInt&responseFormat=KairosDB

This sample requests, time series for asset tags TR6.LNG_PSK_T2C1_21,TR7.LNG_PSK_T2C1_20, TR6.LNG_PSK_T2M1_11, TR7.LNG_PSK_T2M1_11 and TR6.LNG_PSK_T2M1_14

Response Headers
Authorization
Type the token_type followed by a space, then the access_token in the response you previously obtained. For example, bearer eyJhbGciOiJSUzI1NiJ9.A... The following code sample includes a bearer token:
{
  "access_token": "eyJhbGciOiJSUzI1NiJ9.A...",
  "token_type": "bearer",
  "refresh_token": "eyJhbGciOiJSUzI1NiJ9.e..",
  "expires_in": 86399,
  "scope": "openid",
  "jti": "5e2c90ea-9edd-4da1-80c8-4a0d67f77ef3"
}
tenant
The unique ID for the tenant (for example, 07F28C049E0F4F29B8E85E4A6C916D7F)
Status CodeOn successful retrieval, you receive 200 OK and tag data in requested format.

Aggregation Across Tags

Use this service to aggregate across multiple tags containing numeric values by time interval or number of data points. This is available for the V2 and V3 Time Series Data APIs.

Table 5. Multi-tag Aggregation Mode Parameters:
FieldDescription
tagIDProvides a list of two-10 tag names that must be separated by commas. All tags used in multi-tag aggregation mode must contain numeric values.
operationSpecifies the optional data results: sum or avg.
intervalDefines the length of time and determines the size of the aggregation. This value is indicated numerically.
aggregationModeGives you the ability to aggregate across multiple tags when you enter the multi-tag value. This parameter can only be set at the tag level, not the global level.
intervalUnitSets the unit of time for the interval. You can use any of these values:
  • ms (milliseconds)
  • s (seconds)
  • mi (minutes)
  • h (hours)
  • d (days)
  • w (weeks)
  • mm (months)
  • ys (years)
If you do not use intervalUnit, it will default to milliseconds.
Sample curl request
$ curl 'https://api.example.com/v3/time_series/query' -i -X POST -H 'Content-Type: application/json' -H 'Content-Type: application/json' -H 'accept: application/json' -H 'accept: application/json' -H 'Authorization: <Authorization>' -H 'tenant: <tenant>' -d '{
  "tagList" : [ {
    "tagId" : "Inverter1-ASSET-TYPE1.Tag_Pressure,Inverter1-ASSET-TYPE2.Tag_Temperature",
    "operation" : "sum",
    "interval" : 20,
    "aggregationMode" : "multi-tag",
    "intervalUnit" : "mi"
  } ],
  "startTime" : "2016-02-09T15:00:00.000Z",
  "endTime" : "2016-02-09T16:00:00.000Z",
  "useOnlyGoodData" : true,
  "responseFormat" : "PROFICYLIKE",
  "valueBounds" : "",
  "precisionLevel" : "",
  "useOnlyNumericData" : true
}'
Sample HTTP request
POST /v3/time_series/query HTTP/1.1
Content-Type: application/json
Content-Type: application/json
accept: application/json
accept: application/json
Authorization: <Authorization>
tenant: <tenant>
Host: api.example.com
Content-Length: 453

{
  "tagList" : [ {
    "tagId" : "Inverter1-ASSET-TYPE1.Tag_Pressure,Inverter1-ASSET-TYPE2.Tag_Temperature",
    "operation" : "sum",
    "interval" : 20,
    "aggregationMode" : "multi-tag",
    "intervalUnit" : "mi"
  } ],
  "startTime" : "2016-02-09T15:00:00.000Z",
  "endTime" : "2016-02-09T16:00:00.000Z",
  "useOnlyGoodData" : true,
  "responseFormat" : "PROFICYLIKE",
  "valueBounds" : "",
  "precisionLevel" : "",
  "useOnlyNumericData" : true
}
Sample response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 597

{
  "errorCode" : "0",
  "errorMessage" : "",
  "tagList" : [ {
    "tagId" : "Inverter1-ASSET-TYPE1.Tag_Pressure,Inverter1-ASSET-TYPE2.Tag_Temperature",
    "errorCode" : "0",
    "errorMessage" : "",
    "data" : [ {
      "ts" : "2016-02-09T15:00:00.000",
      "v" : "12.123",
      "q" : "3"
    }, {
      "ts" : "2016-02-09T15:20:00.000",
      "v" : "12.124",
      "q" : "3"
    }, {
      "ts" : "2016-02-09T15:40:00.000",
      "v" : "12.125",
      "q" : "3"
    }, {
      "ts" : "2016-02-09T16:00:00.000",
      "v" : "12.126",
      "q" : "3"
    } ],
    "attributes" : { }
  } ]
}