Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

CONNECT data services developer documentation

Asset Centric Data

  • Last UpdatedDec 14, 2022
  • 5 minute read

The asset centric data API provides a quick way to retrieve data stored in an asset's referenced streams.

Get Last Data

Returns the last stored value for SDS streams in the resolved asset.

Request

GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}/Data/Last
?stream={stream}

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetId
Asset identifier.

[optional] array stream
Optional parameter consisting of stream reference names in the format of stream={streamReferenceName}. Multiple stream references can be requested by joining with & in the format of stream={streamReferenceName1}&stream={streamReferenceName2}. By default, all data calls return data for all stream references.

Response

Status Code Body Type Description
200 DataResults Last status of the specified asset.
400 ErrorTemplate Request is not valid. See the response body for additional details.
403 ErrorTemplate Forbidden.
404 ErrorTemplate Not found.
408 ErrorTemplate Request Timeout.
503 ErrorTemplate Service unavailable.

Example response body

200 Response

{
  "Results": {
    "StreamReferenceWithEventsName": [
      {
        "Timestamp": "2019-01-02T01:00:00Z",
        "Temp": 155.5,
        "Pres": 1
      }
    ]
  },
  "Errors": null
}

400 Response (ErrorTemplate)

{
  "OperationId": "string",
  "Error": "string",
  "Resolution": "string",
  "Reason": "string",
  "property1": null,
  "property2": null
}

Get Sampled Data

Returns sampled data for referenced SDS streams.

Request

GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}/Data/Sampled
?startIndex={startIndex}&endIndex={endIndex}&intervals={intervals}&stream={stream}&boundaryType={boundaryType}&startBoundaryType={startBoundaryType}&endBoundaryType={endBoundaryType}

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetId
Asset identifier.

string startIndex
The start index for the intervals.

string endIndex
The end index for the intervals.

integer intervals
Number of intervals requested.

[optional] array stream
Optional parameter consisting of stream reference names in the format of stream={streamReferenceName}. Multiple stream references can be requested by joining with & in the format of stream={streamReferenceName1}&stream={streamReferenceName2}. By default, all data calls return data for all stream references.

[optional] any boundaryType
Optional SdsBoundaryType specifies the handling of events at or near the startIndex and endIndex.

[optional] any startBoundaryType
Optional SdsBoundaryType specifies the handling of events at or near the startIndex.

[optional] any endBoundaryType
Optional SdsBoundaryType specifies the handling of events at or near the endIndex.

Response

Status Code Body Type Description
200 DataResults Last status of the specified asset.
400 ErrorTemplate Request is not valid. See the response body for additional details.
403 ErrorTemplate Forbidden.
404 ErrorTemplate Not found.
408 ErrorTemplate Request Timeout.
503 ErrorTemplate Service unavailable.

Example response body

200 Response

{
  "Results": {
    "StreamReferenceWithEventsName": [
      {
        "Timestamp": "2019-01-02T00:00:00Z",
        "Temp": 0.044,
        "Pres": 1
      },
      {
        "Timestamp": "2019-01-02T00:16:38Z",
        "Temp": 998.046,
        "Pres": 1
      },
      {
        "Timestamp": "2019-01-02T01:00:00Z",
        "Temp": 155.5,
        "Pres": 1
      }
    ]
  },
  "Errors": null
}

400 Response (ErrorTemplate)

{
  "OperationId": "string",
  "Error": "string",
  "Resolution": "string",
  "Reason": "string",
  "property1": null,
  "property2": null
}

Get Summary Data

Returns summary data for referenced SDS streams.

Request

GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}/Data/Summaries
?startIndex={startIndex}&endIndex={endIndex}&stream={stream}&count={count}

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetId
Asset identifier.

string startIndex
The start index for the intervals.

string endIndex
The end index for the intervals.

[optional] array stream
Optional parameter consisting of stream reference names in the format of stream={streamReferenceName}. Multiple stream references can be requested by joining with & in the format of stream={streamReferenceName1}&stream={streamReferenceName2}. By default, all data calls return data for all stream references.

[optional] integer count
The number of intervals requested.

Response

Status Code Body Type Description
200 DataResults Last status of the specified asset.
400 ErrorTemplate Request is not valid. See the response body for additional details.
403 ErrorTemplate Forbidden.
404 ErrorTemplate Not found.
408 ErrorTemplate Request Timeout.
503 ErrorTemplate Service unavailable.

Example response body

200 Response

{
  "Results": {
    "StreamReferenceWithEventsName": [
      {
        "Start": {
          "Timestamp": "2019-01-01T08:00:00Z",
          "Temp": 0.044,
          "Pres": 1
        },
        "End": {
          "Timestamp": "2019-02-06T20:00:00Z",
          "Temp": 155.5,
          "Pres": 1
        },
        "Summaries": {
          "Count": {
            "Timestamp": 1000,
            "Temp": 1000,
            "Pres": 1000
          },
          "Minimum": {
            "Temp": 0.044,
            "Pres": 1
          },
          "Maximum": {
            "Temp": 998.046,
            "Pres": 1
          },
          "Range": {
            "Temp": 998.0020000000001,
            "Pres": 0
          },
          "Total": {
            "Temp": 498779.61199999356,
            "Pres": 1001
          },
          "Mean": {
            "Temp": 498.28133066933077,
            "Pres": 1
          },
          "StandardDeviation": {
            "Temp": 288.4561823749973,
            "Pres": 0
          },
          "PopulationStandardDeviation": {
            "Temp": 288.31206236481444,
            "Pres": 0
          },
          "WeightedMean": {
            "Temp": 153.11692828545156,
            "Pres": 1
          },
          "WeightedStandardDeviation": {
            "Temp": 25.424619899757136,
            "Pres": 0
          },
          "WeightedPopulationStandardDeviation": {
            "Temp": 25.411917116101474,
            "Pres": 0
          },
          "Skewness": {
            "Temp": 0.0011013861675857883,
            "Pres": "NaN"
          },
          "Kurtosis": {
            "Temp": -1.19976760290962,
            "Pres": "NaN"
          }
        }
      }
    ]
  },
  "Errors": null
}

400 Response (ErrorTemplate)

{
  "OperationId": "string",
  "Error": "string",
  "Resolution": "string",
  "Reason": "string",
  "property1": null,
  "property2": null
}

Get Interpolated Data

Returns interpolated data for referenced SDS streams.

Request

GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}/Data/Interpolated
?startIndex={startIndex}&endIndex={endIndex}&count={count}&stream={stream}

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetId
Asset identifier.

string startIndex
The index defining the beginning of the window.

string endIndex
The index defining the end of the window.

integer count
The number of events to return. Read characteristics of the stream determine how the events are constructed.

[optional] array stream
Optional parameter consisting of stream reference names in the format of stream={streamReferenceName}. Multiple stream references can be requested by joining with & in the format of stream={streamReferenceName1}&stream={streamReferenceName2}. By default, all data calls return data for all stream references.

Response

Status Code Body Type Description
200 DataResults Last status of the specified asset.
400 ErrorTemplate Request is not valid. See the response body for additional details.
403 ErrorTemplate Forbidden.
404 ErrorTemplate Not found.
408 ErrorTemplate Request Timeout.
503 ErrorTemplate Service unavailable.

Example response body

200 Response

{
  "Results": {
    "StreamReferenceWithEventsName": [
      {
        "Timestamp": "2019-01-02T00:00:05Z",
        "Temp": 5.045,
        "Pres": 1
      },
      {
        "Timestamp": "2020-04-12T08:00:00Z",
        "Temp": 3.045,
        "Pres": 11
      },
      {
        "Timestamp": "2020-06-29T05:20:00Z",
        "Temp": 54.045,
        "Pres": 11
      }
    ]
  },
  "Errors": null
}

400 Response (ErrorTemplate)

{
  "OperationId": "string",
  "Error": "string",
  "Resolution": "string",
  "Reason": "string",
  "property1": null,
  "property2": null
}

Get Window Data

Returns window data for referenced SDS streams.

Request

GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}/Data
?startIndex={startIndex}&endIndex={endIndex}&stream={stream}&boundaryType={boundaryType}&startBoundaryType={startBoundaryType}&endBoundaryType={endBoundaryType}

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetId
Asset identifier.

string startIndex
Index bounding the beginning of the series of events to return.

string endIndex
Index bounding the end of the series of events to return.

[optional] array stream
Optional parameter consisting of stream reference names in the format of stream={streamReferenceName}. Multiple stream references can be requested by joining with & in the format of stream={streamReferenceName1}&stream={streamReferenceName2}. By default, all data calls return data for all stream references.

[optional] any boundaryType
Optional SdsBoundaryType specifies handling of events at or near the start and end indexes.

[optional] any startBoundaryType
Optional SdsBoundaryType specifies the first value in the result in relation to the start index. If startBoundaryType is specified, endBoundaryType must be specified.

[optional] any endBoundaryType
Optional SdsBoundaryType specifies the last value in the result in relation to the end index. If startBoundaryType is specified, endBoundaryType must be specified.

Response

Status Code Body Type Description
200 DataResults Last status of the specified asset.
400 ErrorTemplate Request is not valid. See the response body for additional details.
403 ErrorTemplate Forbidden.
404 ErrorTemplate Not found.
408 ErrorTemplate Request Timeout.
503 ErrorTemplate Service unavailable.

Example response body

200 Response

{
  "Results": {
    "StreamReferenceWithEventsName": [
      {
        "Timestamp": "2019-01-02T00:00:01Z",
        "Temp": 1.045,
        "Pres": 1
      },
      {
        "Timestamp": "2019-01-02T00:00:02Z",
        "Temp": 2.045,
        "Pres": 1
      },
      {
        "Timestamp": "2019-01-02T00:00:03Z",
        "Temp": 3.045,
        "Pres": 1
      }
    ]
  },
  "Errors": null
}

400 Response (ErrorTemplate)

{
  "OperationId": "string",
  "Error": "string",
  "Resolution": "string",
  "Reason": "string",
  "property1": null,
  "property2": null
}

Definitions

DataResults

Properties

Property Name Data Type Required Nullable Description
Results object false true None
Errors DataErrors false true None
{
  "Results": {
    "property1": [
      null
    ],
    "property2": [
      null
    ]
  },
  "Errors": {
    "OperationId": "string",
    "Error": "string",
    "Reason": "string",
    "ChildErrors": {
      "property1": null,
      "property2": null
    }
  }
}


DataErrors

Properties

Property Name Data Type Required Nullable Description
OperationId string false true None
Error string false true None
Reason string false true None
ChildErrors object false true None
{
  "OperationId": "string",
  "Error": "string",
  "Reason": "string",
  "ChildErrors": {
    "property1": null,
    "property2": null
  }
}


ErrorTemplate

Properties

Property Name Data Type Required Nullable Description
OperationId string false true Operation identifier
Error string false true Error string
Resolution string false true Resolution string
Reason string false true Error reason string
{
  "OperationId": "string",
  "Error": "string",
  "Resolution": "string",
  "Reason": "string",
  "property1": null,
  "property2": null
}


SdsBoundaryType

Enumerated Values

Property Value
Exact 0
Inside 1
Outside 2
ExactOrCalculated 3

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in