Asset Change Data
- Last UpdatedSep 08, 2023
- 6 minute read
Get Statistics For Rule
Returns the AssetRuleStatistics for the ruleId.
Request
GET /api/v1-preview/tenants/{tenantId}/namespaces/{namespaceId}/admin/assetrules/changedata/rule/{ruleId}/statistics
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string ruleId
Rule identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | AssetRuleStatistics | The AssetRuleStatistics for the ruleId. |
| 403 | ResponseBody | Forbidden. |
| 500 | ResponseBody | Internal server error. |
Example response body
200 Response
{
"AssetsAffected": 0,
"StreamsExecutedOn": 0
}
403 Response
{
"OperationId": "00000000-0000-0000-0000-000000000000",
"Error": "Error message.",
"Reason": "Reason that caused the error.",
"Resolution": "Possible resolution for the error.",
"Parameters": {
"key1": "value1",
"key2": "value2"
}
}
500 Response
{
"OperationId": "00000000-0000-0000-0000-000000000000",
"Error": "Error message.",
"Reason": "Reason that caused the error.",
"Resolution": "Possible resolution for the error.",
"Parameters": {
"key1": "value1",
"key2": "value2"
}
}
List Change Data For Rule
Returns the collection of AssetChangeData for the ruleId.
Request
GET /api/v1-preview/tenants/{tenantId}/namespaces/{namespaceId}/admin/assetrules/changedata/rule/{ruleId}
?Skip={Skip}&Count={Count}
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string ruleId
Rule identifier.
[optional] integer Skip
An Int32 specifying the number of results to skip.
Defaults to 0.[optional] integer Count
An Int32 specifying the number of results to return.
Defaults to 100.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | AssetChangeData[] | The collection of AssetChangeData for the ruleId. |
| 400 | ResponseBody | Missing or invalid inputs. |
| 403 | ResponseBody | Forbidden. |
| 500 | ResponseBody | Internal server error. |
Example response body
200 Response
[
{
"RuleId": "ruleId",
"StreamId": "streamId",
"GeneratedAsset": {
"Id": "id",
"AssetTypeId": "assetTypeId",
"Name": "name",
"Description": "description",
"Metadata": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"SdsTypeCode": 18,
"Value": "value",
"Uom": "uom"
}
],
"StreamReferences": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"StreamId": "streamId"
}
],
"Status": {
"Name": "name",
"Description": "description",
"StreamReferenceId": "streamReferenceId",
"StreamPropertyId": "streamPropertyId",
"ValueStatusMappings": [
{
"Value": "value",
"Status": 1,
"DisplayName": "displayName"
}
]
}
}
},
{
"RuleId": "ruleId",
"StreamId": "streamId",
"GeneratedAsset": {
"Id": "id",
"AssetTypeId": "assetTypeId",
"Name": "name",
"Description": "description",
"Metadata": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"SdsTypeCode": 18,
"Value": "value",
"Uom": "uom"
}
],
"StreamReferences": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"StreamId": "streamId"
}
],
"Status": {
"Name": "name",
"Description": "description",
"StreamReferenceId": "streamReferenceId",
"StreamPropertyId": "streamPropertyId",
"ValueStatusMappings": [
{
"Value": "value",
"Status": 1,
"DisplayName": "displayName"
}
]
}
}
}
]
400 Response
{
"OperationId": "00000000-0000-0000-0000-000000000000",
"Error": "Error message.",
"Reason": "Reason that caused the error.",
"Resolution": "Possible resolution for the error.",
"Parameters": {
"key1": "value1",
"key2": "value2"
}
}
403 Response
{
"OperationId": "00000000-0000-0000-0000-000000000000",
"Error": "Error message.",
"Reason": "Reason that caused the error.",
"Resolution": "Possible resolution for the error.",
"Parameters": {
"key1": "value1",
"key2": "value2"
}
}
500 Response
{
"OperationId": "00000000-0000-0000-0000-000000000000",
"Error": "Error message.",
"Reason": "Reason that caused the error.",
"Resolution": "Possible resolution for the error.",
"Parameters": {
"key1": "value1",
"key2": "value2"
}
}
List Change Data For Asset
Returns the collection of AssetChangeData for the assetId.
Request
GET /api/v1-preview/tenants/{tenantId}/namespaces/{namespaceId}/admin/assetrules/changedata/asset/{assetId}
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string assetId
Asset identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | AssetChangeData[] | The collection of AssetChangeData for the assetId. |
| 403 | ResponseBody | Forbidden. |
| 500 | ResponseBody | Internal server error. |
Example response body
200 Response
[
{
"RuleId": "ruleId",
"StreamId": "streamId",
"GeneratedAsset": {
"Id": "id",
"AssetTypeId": "assetTypeId",
"Name": "name",
"Description": "description",
"Metadata": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"SdsTypeCode": 18,
"Value": "value",
"Uom": "uom"
}
],
"StreamReferences": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"StreamId": "streamId"
}
],
"Status": {
"Name": "name",
"Description": "description",
"StreamReferenceId": "streamReferenceId",
"StreamPropertyId": "streamPropertyId",
"ValueStatusMappings": [
{
"Value": "value",
"Status": 1,
"DisplayName": "displayName"
}
]
}
}
},
{
"RuleId": "ruleId",
"StreamId": "streamId",
"GeneratedAsset": {
"Id": "id",
"AssetTypeId": "assetTypeId",
"Name": "name",
"Description": "description",
"Metadata": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"SdsTypeCode": 18,
"Value": "value",
"Uom": "uom"
}
],
"StreamReferences": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"StreamId": "streamId"
}
],
"Status": {
"Name": "name",
"Description": "description",
"StreamReferenceId": "streamReferenceId",
"StreamPropertyId": "streamPropertyId",
"ValueStatusMappings": [
{
"Value": "value",
"Status": 1,
"DisplayName": "displayName"
}
]
}
}
}
]
403 Response
{
"OperationId": "00000000-0000-0000-0000-000000000000",
"Error": "Error message.",
"Reason": "Reason that caused the error.",
"Resolution": "Possible resolution for the error.",
"Parameters": {
"key1": "value1",
"key2": "value2"
}
}
500 Response
{
"OperationId": "00000000-0000-0000-0000-000000000000",
"Error": "Error message.",
"Reason": "Reason that caused the error.",
"Resolution": "Possible resolution for the error.",
"Parameters": {
"key1": "value1",
"key2": "value2"
}
}
List Change Data For Stream
Returns the collection of AssetChangeData for the streamId.
Request
GET /api/v1-preview/tenants/{tenantId}/namespaces/{namespaceId}/admin/assetrules/changedata/stream/{streamId}
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string streamId
Stream identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | AssetChangeData[] | The collection of AssetChangeData for the streamId. |
| 403 | ResponseBody | Forbidden. |
| 500 | ResponseBody | Internal server error. |
Example response body
200 Response
[
{
"RuleId": "ruleId",
"StreamId": "streamId",
"GeneratedAsset": {
"Id": "id",
"AssetTypeId": "assetTypeId",
"Name": "name",
"Description": "description",
"Metadata": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"SdsTypeCode": 18,
"Value": "value",
"Uom": "uom"
}
],
"StreamReferences": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"StreamId": "streamId"
}
],
"Status": {
"Name": "name",
"Description": "description",
"StreamReferenceId": "streamReferenceId",
"StreamPropertyId": "streamPropertyId",
"ValueStatusMappings": [
{
"Value": "value",
"Status": 1,
"DisplayName": "displayName"
}
]
}
}
},
{
"RuleId": "ruleId",
"StreamId": "streamId",
"GeneratedAsset": {
"Id": "id",
"AssetTypeId": "assetTypeId",
"Name": "name",
"Description": "description",
"Metadata": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"SdsTypeCode": 18,
"Value": "value",
"Uom": "uom"
}
],
"StreamReferences": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"StreamId": "streamId"
}
],
"Status": {
"Name": "name",
"Description": "description",
"StreamReferenceId": "streamReferenceId",
"StreamPropertyId": "streamPropertyId",
"ValueStatusMappings": [
{
"Value": "value",
"Status": 1,
"DisplayName": "displayName"
}
]
}
}
}
]
403 Response
{
"OperationId": "00000000-0000-0000-0000-000000000000",
"Error": "Error message.",
"Reason": "Reason that caused the error.",
"Resolution": "Possible resolution for the error.",
"Parameters": {
"key1": "value1",
"key2": "value2"
}
}
500 Response
{
"OperationId": "00000000-0000-0000-0000-000000000000",
"Error": "Error message.",
"Reason": "Reason that caused the error.",
"Resolution": "Possible resolution for the error.",
"Parameters": {
"key1": "value1",
"key2": "value2"
}
}
Definitions
AssetRuleStatistics
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| AssetsAffected | int32 | false | false | None |
| StreamsExecutedOn | int32 | false | false | None |
{
"AssetsAffected": 0,
"StreamsExecutedOn": 0
}
ResponseBody
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| OperationId | string | false | true | None |
| Error | string | false | true | None |
| Reason | string | false | true | None |
| Resolution | string | false | true | None |
| Parameters | object | false | true | None |
{
"OperationId": "00000000-0000-0000-0000-000000000000",
"Error": "Error message.",
"Reason": "Reason that caused the error.",
"Resolution": "Possible resolution for the error.",
"Parameters": {
"key1": "value1",
"key2": "value2"
}
}
AssetChangeData
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| RuleId | string | false | true | None |
| StreamId | string | false | true | None |
| GeneratedAsset | Asset | false | true | The asset which was generated by the RuleId and StreamId combination. |
{
"RuleId": "ruleId",
"StreamId": "streamId",
"GeneratedAsset": {
"Id": "id",
"AssetTypeId": "assetTypeId",
"Name": "name",
"Description": "description",
"Metadata": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"SdsTypeCode": 18,
"Value": "value",
"Uom": "uom"
}
],
"StreamReferences": [
{
"Id": "id",
"Name": "name",
"Description": "description",
"StreamId": "streamId"
}
],
"Status": {
"Name": "name",
"Description": "description",
"StreamReferenceId": "streamReferenceId",
"StreamPropertyId": "streamPropertyId",
"ValueStatusMappings": [
{
"Value": "value",
"Status": 1,
"DisplayName": "displayName"
}
]
}
}
}
Asset
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Id | string | false | true | None |
| AssetTypeId | string | false | true | None |
| Name | string | false | true | None |
| Description | string | false | true | None |
| Metadata | [MetadataItem] | false | true | None |
| StreamReferences | [StreamReference] | false | true | None |
| Status | StatusConfiguration | false | true | None |
| Tags | string[] | false | true | None |
{
"Id": "string",
"AssetTypeId": "string",
"Name": "string",
"Description": "string",
"Metadata": [
{
"Id": "string",
"Name": "string",
"Description": "string",
"SdsTypeCode": 0,
"Value": null,
"Uom": "string"
}
],
"StreamReferences": [
{
"Id": "string",
"Name": "string",
"Description": "string",
"StreamId": "string"
}
],
"Status": {
"DefinitionType": 0,
"Definition": null
},
"Tags": [
"string"
]
}
MetadataItem
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Id | string | false | true | None |
| Name | string | false | true | None |
| Description | string | false | true | None |
| SdsTypeCode | SdsTypeCode | false | false | None |
| Value | any | false | true | None |
| Uom | string | false | true | None |
{
"Id": "string",
"Name": "string",
"Description": "string",
"SdsTypeCode": 0,
"Value": null,
"Uom": "string"
}
SdsTypeCode
Enumerated Values
| Property | Value |
|---|---|
| Empty | 0 |
| Object | 1 |
| Boolean | 3 |
| Char | 4 |
| SByte | 5 |
| Byte | 6 |
| Int16 | 7 |
| UInt16 | 8 |
| Int32 | 9 |
| UInt32 | 10 |
| Int64 | 11 |
| UInt64 | 12 |
| Single | 13 |
| Double | 14 |
| Decimal | 15 |
| DateTime | 16 |
| String | 18 |
| Guid | 19 |
| DateTimeOffset | 20 |
| TimeSpan | 21 |
| Version | 22 |
| NullableBoolean | 103 |
| NullableChar | 104 |
| NullableSByte | 105 |
| NullableByte | 106 |
| NullableInt16 | 107 |
| NullableUInt16 | 108 |
| NullableInt32 | 109 |
| NullableUInt32 | 110 |
| NullableInt64 | 111 |
| NullableUInt64 | 112 |
| NullableSingle | 113 |
| NullableDouble | 114 |
| NullableDecimal | 115 |
| NullableDateTime | 116 |
| NullableGuid | 119 |
| NullableDateTimeOffset | 120 |
| NullableTimeSpan | 121 |
| BooleanArray | 203 |
| CharArray | 204 |
| SByteArray | 205 |
| ByteArray | 206 |
| Int16Array | 207 |
| UInt16Array | 208 |
| Int32Array | 209 |
| UInt32Array | 210 |
| Int64Array | 211 |
| UInt64Array | 212 |
| SingleArray | 213 |
| DoubleArray | 214 |
| DecimalArray | 215 |
| DateTimeArray | 216 |
| StringArray | 218 |
| GuidArray | 219 |
| DateTimeOffsetArray | 220 |
| TimeSpanArray | 221 |
| VersionArray | 222 |
| Array | 400 |
| IList | 401 |
| IDictionary | 402 |
| IEnumerable | 403 |
| SdsType | 501 |
| SdsTypeProperty | 502 |
| SdsStreamView | 503 |
| SdsStreamViewProperty | 504 |
| SdsStreamViewMap | 505 |
| SdsStreamViewMapProperty | 506 |
| SdsStream | 507 |
| SdsStreamIndex | 508 |
| SdsTable | 509 |
| SdsColumn | 510 |
| SdsValues | 511 |
| SdsObject | 512 |
| SByteEnum | 605 |
| ByteEnum | 606 |
| Int16Enum | 607 |
| UInt16Enum | 608 |
| Int32Enum | 609 |
| UInt32Enum | 610 |
| Int64Enum | 611 |
| UInt64Enum | 612 |
| NullableSByteEnum | 705 |
| NullableByteEnum | 706 |
| NullableInt16Enum | 707 |
| NullableUInt16Enum | 708 |
| NullableInt32Enum | 709 |
| NullableUInt32Enum | 710 |
| NullableInt64Enum | 711 |
| NullableUInt64Enum | 712 |
StreamReference
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Id | string | false | true | None |
| Name | string | false | true | None |
| Description | string | false | true | None |
| StreamId | string | false | true | None |
{
"Id": "string",
"Name": "string",
"Description": "string",
"StreamId": "string"
}
StatusConfiguration
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| DefinitionType | StatusDefinitionType | false | false | None |
| Definition | any | false | true | None |
{
"DefinitionType": 0,
"Definition": null
}
StatusDefinitionType
Enumerated Values
| Property | Value |
|---|---|
| Unspecified | 0 |
| StreamPropertyMapping | 1 |