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 Status

  • Last UpdatedJan 08, 2025
  • 5 minute read

Get Last Asset Status Data

Returns status of an asset. Status of an asset is determined by an exact match of the Sds stream property value to the value of the ValueStatusMapping. If there are no exact matches, the status is a 0 (Unknown).

Request

GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}/Status/Last

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetId
Asset identifier.

Response

Status Code Body Type Description
200 LastStatusData 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.
422 ErrorTemplate Cannot be processed. See the response body for additional details.
503 ErrorTemplate Service unavailable.

Example response body

200 Response

{
  "AssetId": "AssetId-1",
  "Status": "Good",
  "Value": "85",
  "DisplayName": "AssetInGoodState",
  "DataRetrievalTime": "2020-05-04T16:55:26.3732693Z",
  "Index": "2019-01-02T00:00:00Z"
}

400 Response (ErrorTemplate)

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

Get Asset Status Range Summary Data

Returns status summary of an asset. Statistics are computed using 'StepwiseContinuousLeading' for interpolation and ‘Forward’ for extrapolation with regard to the status stream property, without regard to the actual interpolation or extrapolation modes configured in SDS for that property.

Request

GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}/Status/Summary
?startIndex={startIndex}&endIndex={endIndex}&intervals={intervals}

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetId
Asset identifier.

string startIndex
Start index.

string endIndex
End index.

integer intervals
Number of intervals.

Response

Status Code Body Type Description
200 StatusRangeSummary 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.
422 ErrorTemplate Cannot be processed. See the response body for additional details.
502 None Bad gateway.
503 ErrorTemplate Service unavailable.

Example response body

200 Response

{
  "RangeValues": [
    {
      "Index": "2019-01-02T00:00:00Z",
      "Status": "Warning",
      "Value": 2,
      "DisplayName": "AssetInWarning"
    },
    {
      "Index": "2019-01-02T00:30:00Z",
      "Status": "Bad",
      "Value": 4,
      "DisplayName": "AssetInBadState"
    }
  ],
  "Statistics": [
    {
      "Status": "Warning",
      "TotalInterval": "00:30:00",
      "Values": [
        {
          "Value": 2,
          "Interval": "00:30:00"
        }
      ]
    },
    {
      "Status": "Bad",
      "TotalInterval": "1246.06:30:00",
      "Values": [
        {
          "Value": 4,
          "Interval": "1246.06:30:00"
        }
      ]
    }
  ]
}

400 Response (ErrorTemplate)

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

Asset Status

Get Bulk Last Status Data For Assets

Returns status of multiple assets.

Request

POST /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Bulk/Assets/Status/Last

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

Request Body

Asset identifiers

[
  "AssetId-1",
  "AssetId-2",
  "AssetId-3"
]

Response

Status Code Body Type Description
200 MultiStatusResultOfLastStatusDataAndChildErrorTemplate Last status of assets in the body.
207 MultiStatusResultOfLastStatusDataAndChildErrorTemplate Partial success. Some assets encountered errors. See response body for additional details.
400 ErrorTemplate Request is not valid. See the response body for additional details.
408 ErrorTemplate Request Timeout.
503 ErrorTemplate Service unavailable.

Example response body

200 Response

[
  {
    "AssetId": "AssetId-1",
    "Status": 1,
    "Value": "85",
    "DisplayName": "TemperatureSensorBuild1InF",
    "DataRetrievalTime": "2020-05-04T16:55:26.3732693Z"
  },
  {
    "AssetId": "AssetId-2",
    "Status": 2,
    "Value": "185",
    "DisplayName": "DeviceMeasurement",
    "DataRetrievalTime": "2020-05-04T16:55:26.3732693Z"
  }
]

207 Response (MultiStatusResultOfLastStatusDataAndChildErrorTemplate)

{
  "Reason": "string",
  "Error": "string",
  "OperationId": "string",
  "Data": [
    {
      "AssetId": "AssetId-1",
      "Status": "Good",
      "Value": "85",
      "DisplayName": "AssetInGoodState",
      "DataRetrievalTime": "2020-05-04T16:55:26.3732693Z",
      "Index": "2019-01-02T00:00:00Z"
    }
  ],
  "ChildErrors": [
    {
      "OperationId": "string",
      "Error": "string",
      "Resolution": "string",
      "Reason": "string",
      "StatusCode": 0,
      "property1": null,
      "property2": null
    }
  ]
}

Definitions

LastStatusData

Asset's last status

Properties

Property Name Data Type Required Nullable Description
Index any false true Index which the status was last updated
Status StatusEnum false false Status enumeration. Valid values are: Unknown, Good, Warning and Bad.
Value any false true Value of the last data retrieved
DisplayName string false true Status display name
AssetId string false true Asset identifier
DataRetrievalTime date-time false false Date and time when the status was last updated.
{
  "AssetId": "AssetId-1",
  "Status": "Good",
  "Value": "85",
  "DisplayName": "AssetInGoodState",
  "DataRetrievalTime": "2020-05-04T16:55:26.3732693Z",
  "Index": "2019-01-02T00:00:00Z"
}


StatusEnum

Pre-defined asset status values.

Enumerated Values

Property Value Description
Unknown 0
Good 1
Warning 2
Bad 3

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
}


StatusRangeSummary

Returns the status summary of an asset.

Properties

Property Name Data Type Required Nullable Description
RangeValues [StatusData] false true Status values
Statistics [StatusValueStatistics] false true Status data statistics
{
  "RangeValues": [
    {
      "Index": "2019-01-02T00:00:00Z",
      "Status": "Warning",
      "Value": 2,
      "DisplayName": "AssetInWarning"
    },
    {
      "Index": "2019-01-02T00:30:00Z",
      "Status": "Bad",
      "Value": 4,
      "DisplayName": "AssetInBadState"
    }
  ],
  "Statistics": [
    {
      "Status": "Warning",
      "TotalInterval": "00:30:00",
      "Values": [
        {
          "Value": 2,
          "Interval": "00:30:00"
        }
      ]
    },
    {
      "Status": "Bad",
      "TotalInterval": "1246.06:30:00",
      "Values": [
        {
          "Value": 4,
          "Interval": "1246.06:30:00"
        }
      ]
    }
  ]
}


StatusData

Status data that is assocated with asset.

Properties

Property Name Data Type Required Nullable Description
Index any false true Index which the status was last updated
Status StatusEnum false false Status enumeration. Valid values are: Unknown, Good, Warning and Bad.
Value any false true Value of the last data retrieved
DisplayName string false true Status display name
{
  "Index": "2019-01-02T00:00:00Z",
  "Status": "Warning",
  "Value": 2,
  "DisplayName": "AssetInWarning"
}


StatusValueStatistics

Status value statistics returns asset status statistics

Properties

Property Name Data Type Required Nullable Description
Status StatusEnum false false Asset status
TotalInterval any false true Total interval
Values [UnderlyingValueStatistics] false true Asset status statistics per interval
{
  "Status": 0,
  "TotalInterval": null,
  "Values": [
    {
      "Value": null,
      "Interval": null,
      "DisplayName": "string"
    }
  ]
}


UnderlyingValueStatistics

Underlying value statistics represents statistics for a single interval

Properties

Property Name Data Type Required Nullable Description
Value any false true Value of the status mapping.
Interval any false true Summary interval
DisplayName string false true User-friendly display name for that status mapping
{
  "Value": null,
  "Interval": null,
  "DisplayName": "string"
}


MultiStatusResultOfLastStatusDataAndChildErrorTemplate

A multi status result is returned to indicate a partial success.

Properties

Property Name Data Type Required Nullable Description
Reason string false true Failure reason.
Error string false true Error string
OperationId string false true Operational identifier of the call. Used for support.
Data [LastStatusData] false true Requested information from call.
ChildErrors [ChildErrorTemplate] false true Child error pertaining to specific resources.
{
  "Reason": "string",
  "Error": "string",
  "OperationId": "string",
  "Data": [
    {
      "AssetId": "AssetId-1",
      "Status": "Good",
      "Value": "85",
      "DisplayName": "AssetInGoodState",
      "DataRetrievalTime": "2020-05-04T16:55:26.3732693Z",
      "Index": "2019-01-02T00:00:00Z"
    }
  ],
  "ChildErrors": [
    {
      "OperationId": "string",
      "Error": "string",
      "Resolution": "string",
      "Reason": "string",
      "StatusCode": 0,
      "property1": null,
      "property2": null
    }
  ]
}


ChildErrorTemplate

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
StatusCode int32 false false None
{
  "OperationId": "string",
  "Error": "string",
  "Resolution": "string",
  "Reason": "string",
  "StatusCode": 0,
  "property1": null,
  "property2": null
}


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