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 Types

  • Last UpdatedOct 07, 2024
  • 15 minute read

The asset types API allows you to create, read, update, and delete asset types.

List Asset Types

Returns an array of asset types in a given namespace and the total number of asset types returned, specified as Total-Count in the HTTP response header.

Request

GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/AssetTypes
?skip={skip}&count={count}&filter={filter}

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

[optional] integer skip
Parameter representing the zero-based offset of the first object to retrieve. If unspecified, a default value of 0 is used.

[optional] integer count
Parameter representing the maximum number of objects to retrieve. If unspecified, a default value of 100 is used.

[optional] string filter
Filter expression for CreatedDate and LastModifiedDate properties.

Response

Status Code Body Type Description
200 AssetType[] List of asset types in the given namespace.
400 ErrorTemplate Request is not valid. See the response body for additional details.
403 ErrorTemplate Forbidden.
408 ErrorTemplate Request Timeout.
503 ErrorTemplate Service unavailable.

Response Headers

Status Header Type Description
200 Total-Count integer Total number of asset types in the namespace.

Example response body

200 Response

[
  {
    "Id": "SampleAssetType",
    "Description": "This is a sample asset type.",
    "Metadata": [
      {
        "Id": "fbd82b97-d29e-4022-968e-f8492cf86644",
        "Name": "ModelNumber",
        "Description": "This is a static attribute on the asset type which represents the model number.",
        "SdsTypeCode": "Double",
        "Value": 0.01
      }
    ],
    "TypeReferences": [
      {
        "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
        "StreamReferenceName": "ReferenceName",
        "TypeId": "PI-Float32"
      }
    ]
  },
  {
    "Id": "SecondSampleAssetType",
    "Description": "This is a second sample asset type.",
    "Metadata": [
      {
        "Id": "e79cdc54-5d94-4e78-ae1e-eb507c40737d",
        "Name": "ReleaseNumber",
        "Description": "This is a static attribute on the asset type which represents the model number.",
        "SdsTypeCode": "Double",
        "Value": 54.5
      }
    ],
    "TypeReferences": [
      {
        "StreamReferenceId": "d4f0f8b7-208a-4a6c-8a08-aec3577e0640",
        "StreamReferenceName": "ReferenceName",
        "TypeId": "PI-Int32"
      }
    ]
  }
]

400 Response (ErrorTemplate)

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

Head Asset Types

Returns the Headers corresponding to the GET AssetTypes call, including a collection ETag and, optionally, Total-Count. The collection ETag changes whenever an asset type is created, updated, or deleted.

Request

HEAD /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/AssetTypes
?filter={filter}&includeTotalCount={includeTotalCount}

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

[optional] string filter
Filter expression for CreatedDate and LastModifiedDate properties.

[optional] boolean includeTotalCount
Optional Parameter. Default value is false. If set to true, Total-count header will be included in the returned headers. Total-Count refers to the number of asset types that the user has permission to access corresponding to an optional query.

Response

Status Code Body Type Description
204 None Call succeeded.
403 ErrorTemplate Forbidden.
408 ErrorTemplate Request Timeout.
503 ErrorTemplate Service unavailable.

Response Headers

Status Header Type Description
204 Total-Count integer Total number of asset types accessible to the caller and that match the specified query.
204 ETag string Collection ETag. Changes whenever an asset type is created, updated, or deleted.

Create Asset Type

Create or update an asset type with a specified identifier.

Request

POST /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/AssetTypes

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

Request Body

Asset type to create.

{
  "Id": "SampleAssetType01",
  "Description": "This is a sample asset type.",
  "Metadata": [
    {
      "Id": "Id-fbd82b97-d29e-4022-968e",
      "Name": "ModelNumber",
      "Description": "This is a static attribute on the asset type which represents the model number.",
      "SdsTypeCode": "Double",
      "Value": 0.01
    }
  ],
  "TypeReferences": [
    {
      "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
      "StreamReferenceName": "ReferenceName",
      "TypeId": "PI-Float32"
    }
  ]
}

Response

Status Code Body Type Description
201 AssetType Asset type created.
400 ErrorTemplate Request is not valid. See the response body for additional details.
403 ErrorTemplate Forbidden.
408 ErrorTemplate Request Timeout.
412 ErrorTemplate Pre-Condition Failed. See response body for additional details.
503 ErrorTemplate Service unavailable.

Response Headers

Status Header Type Description
201 ETag string Version.

Example response body

201 Response

{
  "Id": "SampleAssetType01",
  "Description": "This is a sample asset type.",
  "Metadata": [
    {
      "Id": "Id-fbd82b97-d29e-4022-968e",
      "Name": "ModelNumber",
      "Description": "This is a static attribute on the asset type which represents the model number.",
      "SdsTypeCode": "Double",
      "Value": 0.01
    }
  ],
  "TypeReferences": [
    {
      "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
      "StreamReferenceName": "ReferenceName",
      "TypeId": "PI-Float32"
    }
  ]
}

400 Response (ErrorTemplate)

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

Get Asset Type

Returns an array of asset types in a given namespace and the total number of asset types returned, specified as Total-Count in the HTTP response header.

Request

GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/AssetTypes/{assetTypeId}

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetTypeId
Asset type identifier.

Response

Status Code Body Type Description
200 AssetType Asset type with specified identifier.
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.

Response Headers

Status Header Type Description
200 ETag string Version.

Example response body

200 Response

{
  "Id": "SampleAssetType01",
  "Description": "This is a sample asset type.",
  "Metadata": [
    {
      "Id": "Id-fbd82b97-d29e-4022-968e",
      "Name": "ModelNumber",
      "Description": "This is a static attribute on the asset type which represents the model number.",
      "SdsTypeCode": "Double",
      "Value": 0.01
    }
  ],
  "TypeReferences": [
    {
      "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
      "StreamReferenceName": "ReferenceName",
      "TypeId": "PI-Float32"
    }
  ]
}

400 Response (ErrorTemplate)

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

Get Or Create Asset Type

Creates or updates an asset type with a specified identifier.

Request

POST /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/AssetTypes/{assetTypeId}

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetTypeId
Asset type identifier.

Request Body

Asset type to create.

{
  "Id": "SampleAssetType01",
  "Description": "This is a sample asset type.",
  "Metadata": [
    {
      "Id": "Id-fbd82b97-d29e-4022-968e",
      "Name": "ModelNumber",
      "Description": "This is a static attribute on the asset type which represents the model number.",
      "SdsTypeCode": "Double",
      "Value": 0.01
    }
  ],
  "TypeReferences": [
    {
      "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
      "StreamReferenceName": "ReferenceName",
      "TypeId": "PI-Float32"
    }
  ]
}

Response

Status Code Body Type Description
200 AssetType OK.
201 AssetType Asset type created.
400 ErrorTemplate Request is not valid. See the response body for additional details.
403 ErrorTemplate Forbidden.
408 ErrorTemplate Request Timeout.
409 ErrorTemplate Conflict. See response body for additional details.
412 ErrorTemplate Pre-Condition Failed. See response body for additional details.
503 ErrorTemplate Service unavailable.

Response Headers

Status Header Type Description
200 ETag string Version.
201 ETag string Version.

Example response body

200 Response

{
  "Id": "SampleAssetType01",
  "Description": "This is a sample asset type.",
  "Metadata": [
    {
      "Id": "Id-fbd82b97-d29e-4022-968e",
      "Name": "ModelNumber",
      "Description": "This is a static attribute on the asset type which represents the model number.",
      "SdsTypeCode": "Double",
      "Value": 0.01
    }
  ],
  "TypeReferences": [
    {
      "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
      "StreamReferenceName": "ReferenceName",
      "TypeId": "PI-Float32"
    }
  ]
}

201 Response

{
  "Id": "SampleAssetType01",
  "Description": "This is a sample asset type.",
  "Metadata": [
    {
      "Id": "Id-fbd82b97-d29e-4022-968e",
      "Name": "ModelNumber",
      "Description": "This is a static attribute on the asset type which represents the model number.",
      "SdsTypeCode": "Double",
      "Value": 0.01
    }
  ],
  "TypeReferences": [
    {
      "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
      "StreamReferenceName": "ReferenceName",
      "TypeId": "PI-Float32"
    }
  ]
}

400 Response (ErrorTemplate)

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

Create Or Update Asset Type

Creates or updates an asset type with a specified identifier.

Request

PUT /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/AssetTypes/{assetTypeId}

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetTypeId
Asset type identifier.

Request Body

Asset type to create or update.

{
  "Id": "SampleAssetType01",
  "Description": "This is a sample asset type.",
  "Metadata": [
    {
      "Id": "Id-fbd82b97-d29e-4022-968e",
      "Name": "ModelNumber",
      "Description": "This is a static attribute on the asset type which represents the model number.",
      "SdsTypeCode": "Double",
      "Value": 0.01
    }
  ],
  "TypeReferences": [
    {
      "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
      "StreamReferenceName": "ReferenceName",
      "TypeId": "PI-Float32"
    }
  ]
}

Response

Status Code Body Type Description
200 AssetType Asset type with specified identifier.
201 AssetType Asset type created.
400 ErrorTemplate The request is not valid. See the response body for additional details.
403 ErrorTemplate Forbidden.
408 ErrorTemplate Request Timeout.
409 ErrorTemplate Conflict.
412 ErrorTemplate Pre-Condition Failed.
503 ErrorTemplate Service unavailable.

Response Headers

Status Header Type Description
200 ETag string Version.
201 ETag string Version.

Example response body

200 Response

{
  "Id": "SampleAssetType01",
  "Description": "This is a sample asset type.",
  "Metadata": [
    {
      "Id": "Id-fbd82b97-d29e-4022-968e",
      "Name": "ModelNumber",
      "Description": "This is a static attribute on the asset type which represents the model number.",
      "SdsTypeCode": "Double",
      "Value": 0.01
    }
  ],
  "TypeReferences": [
    {
      "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
      "StreamReferenceName": "ReferenceName",
      "TypeId": "PI-Float32"
    }
  ]
}

201 Response

{
  "Id": "SampleAssetType01",
  "Description": "This is a sample asset type.",
  "Metadata": [
    {
      "Id": "Id-fbd82b97-d29e-4022-968e",
      "Name": "ModelNumber",
      "Description": "This is a static attribute on the asset type which represents the model number.",
      "SdsTypeCode": "Double",
      "Value": 0.01
    }
  ],
  "TypeReferences": [
    {
      "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
      "StreamReferenceName": "ReferenceName",
      "TypeId": "PI-Float32"
    }
  ]
}

400 Response (ErrorTemplate)

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

Patch Asset Type

Performs a Patch operation on the asset type with the specified identifier. The request body is expected to be a JSON Patch (RFC 6902) document. For the purposes of Patch operations, TypeReferences and Metadata are treated as dictionaries keyed by their identifiers, even though these properties are lists in the underlying asset type model. This permits individual TypeReferences and Metadata items to be indexed by their identifiers in the operation path.

Request

PATCH /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/AssetTypes/{assetTypeId}

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetTypeId
Asset Type identifier.

Request Body

Asset Type patch document.

{
  "Operations": [
    {
      "value": null,
      "path": "string",
      "op": "string",
      "from": "string"
    }
  ]
}

Response

Status Code Body Type Description
200 AssetType None
400 ErrorTemplate Request is not valid. See the response body for additional details.
403 ErrorTemplate Forbidden.
404 ErrorTemplate None
408 ErrorTemplate Request Timeout.
409 ErrorTemplate Conflict.
412 ErrorTemplate Pre-Condition Failed.
503 ErrorTemplate Service unavailable.

Example response body

200 Response

{
  "Id": "SampleAssetType01",
  "Description": "This is a sample asset type.",
  "Metadata": [
    {
      "Id": "Id-fbd82b97-d29e-4022-968e",
      "Name": "ModelNumber",
      "Description": "This is a static attribute on the asset type which represents the model number.",
      "SdsTypeCode": "Double",
      "Value": 0.01
    }
  ],
  "TypeReferences": [
    {
      "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
      "StreamReferenceName": "ReferenceName",
      "TypeId": "PI-Float32"
    }
  ]
}

400 Response (ErrorTemplate)

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

Delete Asset Type

Deletes asset type with a specified identifier.

Request

DELETE /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/AssetTypes/{assetTypeId}
?deleteAssets={deleteAssets}

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetTypeId
Asset type identifier.

[optional] boolean deleteAssets
Call should also delete all assets of this asset type. Default is false.

Response

Status Code Body Type Description
204 None Asset type with specified identifier has been deleted.
400 ErrorTemplate Request is not valid. See the response body for additional details.
403 ErrorTemplate Forbidden.
404 ErrorTemplate Not Found.
408 ErrorTemplate Request Timeout.
409 ErrorTemplate Conflict. See response body for additional details.
412 ErrorTemplate Pre-Condition Failed. See response body for additional details.
503 ErrorTemplate Service unavailable.

Bulk Create Asset Types

Bulk creates asset types. Creates multiple asset types in a single call.

Request

POST /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Bulk/AssetTypes

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

Request Body

List of asset types you want to create.

Response

Status Code Body Type Description
200 MultiStatusResultOfAssetTypeAndChildErrorTemplate Asset types as persisted, including values for optional parameters that were omitted in request.
207 MultiStatusResultOfAssetTypeAndChildErrorTemplate Partial success. Some asset types were created. See response body for additional details.
400 ErrorTemplate Request is not valid. See the response body for additional details.
403 ErrorTemplate Forbidden.
408 ErrorTemplate Request Timeout.
503 ErrorTemplate Service unavailable.

Example response body

200 Response (MultiStatusResultOfAssetTypeAndChildErrorTemplate)

{
  "Reason": "string",
  "Error": "string",
  "OperationId": "string",
  "Data": [
    {
      "Id": "SampleAssetType01",
      "Description": "This is a sample asset type.",
      "Metadata": [
        {
          "Id": "Id-fbd82b97-d29e-4022-968e",
          "Name": "ModelNumber",
          "Description": "This is a static attribute on the asset type which represents the model number.",
          "SdsTypeCode": "Double",
          "Value": 0.01
        }
      ],
      "TypeReferences": [
        {
          "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
          "StreamReferenceName": "ReferenceName",
          "TypeId": "PI-Float32"
        }
      ]
    }
  ],
  "ChildErrors": [
    {
      "OperationId": "string",
      "Error": "string",
      "Resolution": "string",
      "Reason": "string",
      "StatusCode": 0,
      "property1": null,
      "property2": null
    }
  ]
}

Get Asset Type Owner

Returns the owner of specified asset type.

Request

GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/AssetTypes/{assetTypeId}/Owner

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetTypeId
Asset type identifier.

Response

Status Code Body Type Description
200 Trustee OK.
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

{
  "Type": 1,
  "TenantId": "55555555-5555-5555-5555-555555555555",
  "ObjectId": "44444444-4444-4444-4444-444444444444"
}

400 Response (ErrorTemplate)

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

Update Asset Type Owner

Updates the owner of specified asset type.

Request

PUT /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/AssetTypes/{assetTypeId}/Owner

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetTypeId
Asset type identifier.

Request Body

Updated owner.

{
  "Type": 1,
  "TenantId": "55555555-5555-5555-5555-555555555555",
  "ObjectId": "44444444-4444-4444-4444-444444444444"
}

Response

Status Code Body Type Description
204 None Asset type owner updated.
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.

Get Asset Type Acl

Returns the access control list of the specified asset type.

Request

GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/AssetTypes/{assetTypeId}/AccessControl

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetTypeId
Asset type identifier.

Response

Status Code Body Type Description
200 AccessControlList Access control list of the asset type with given identifier.
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

{
  "RoleTrusteeAccessControlEntries": [
    {
      "Trustee": {
        "Type": 3,
        "ObjectId": "11111111-1111-1111-1111-111111111111"
      },
      "AccessRights": 3
    },
    {
      "Trustee": {
        "Type": 3,
        "ObjectId": "22222222-2222-2222-1111-111111111111"
      }
    }
  ]
}

400 Response (ErrorTemplate)

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

Update Asset Type Access Control

Updates the access control of the specified asset type.

Request

PUT /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/AssetTypes/{assetTypeId}/AccessControl

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetTypeId
Asset type identifier.

Request Body

Updated ACL.

{
  "RoleTrusteeAccessControlEntries": [
    {
      "Trustee": {
        "Type": 3,
        "ObjectId": "11111111-1111-1111-1111-111111111111"
      },
      "AccessRights": 3
    },
    {
      "Trustee": {
        "Type": 3,
        "ObjectId": "22222222-2222-2222-1111-111111111111"
      }
    }
  ]
}

Response

Status Code Body Type Description
204 None Update success.
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.

List Asset Type Access Rights

Returns the access rights of specified asset type.

Request

GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/AssetTypes/{assetTypeId}/AccessRights

Parameters

string tenantId
Tenant identifier.

string namespaceId
Namespace identifier.

string assetTypeId
Asset type identifier.

Response

Status Code Body Type Description
200 Inline Access control list of the asset type with given identifier.
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

[
  "Read",
  "Write",
  "Delete",
  "ManageAccessControl"
]

400 Response (ErrorTemplate)

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

Definitions

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
}


AssetType

An asset type can be used to create multiple similar assets. A change to the asset type is reflected in all assets that are derived from the asset type.

Properties

Property Name Data Type Required Nullable Description
Id string false true Identifier. If you do not provide an identifier, a random GUID will be assigned as the identifier.
Name string false true User-friendly name. If not specified, name will be set to the same value as the Id field.
Description string false true Description
CreatedDate date-time false false Created Date
ModifiedDate date-time false false Modified Date
Metadata [MetadataItem] false true Metadata
TypeReferences [TypeReference] false true Asset type description
Status StatusConfiguration false true Asset type status. If an asset is of this asset type, asset type statuses will take precedence over asset status.
{
  "Id": "SampleAssetType01",
  "Description": "This is a sample asset type.",
  "Metadata": [
    {
      "Id": "Id-fbd82b97-d29e-4022-968e",
      "Name": "ModelNumber",
      "Description": "This is a static attribute on the asset type which represents the model number.",
      "SdsTypeCode": "Double",
      "Value": 0.01
    }
  ],
  "TypeReferences": [
    {
      "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
      "StreamReferenceName": "ReferenceName",
      "TypeId": "PI-Float32"
    }
  ]
}


MetadataItem

An asset or asset type metadata is static information associated with a given asset. A given metadata contains a list of individual metadata values. There is no limit on the number of metadata values defined by an asset. An asset or asset type metadata does not stand alone. It must be specified within an asset or asset type object and, therefore, there are no direct API routes to asset or asset type metadata.

Properties

Property Name Data Type Required Nullable Description
Id string false true Metadata identifier
Name string false true User-friendly name for the metadata value. If not null, must be unique within an asset or asset type.
Description string false true Metadata item description.
SdsTypeCode SdsTypeCode2 false false This integer corresponds to the SdsTypeCode. Asset metadata support the following integer or string values: 11 ("Int64"), 14 ("Double"), 16 ("DateTime"), and 18 ("String").
Value any false true String representation of the metadata value.
Uom string false true Asset metadata unit of measurement. Select from the list of supported Uom types.
{
  "Id": "Sample Metadata identifier",
  "Name": "Max Pressure",
  "Description": "This metadata represents the maximum pressure of a given asset.",
  "SdsTypeCode": "Double",
  "Value": 11.2,
  "Uom": "newton"
}


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

SdsTypeCode2

Enumerated Values

Property Value
Empty Empty
Object Object
Boolean Boolean
Char Char
SByte SByte
Byte Byte
Int16 Int16
UInt16 UInt16
Int32 Int32
UInt32 UInt32
Int64 Int64
UInt64 UInt64
Single Single
Double Double
Decimal Decimal
DateTime DateTime
String String
Guid Guid
DateTimeOffset DateTimeOffset
TimeSpan TimeSpan
Version Version
NullableBoolean NullableBoolean
NullableChar NullableChar
NullableSByte NullableSByte
NullableByte NullableByte
NullableInt16 NullableInt16
NullableUInt16 NullableUInt16
NullableInt32 NullableInt32
NullableUInt32 NullableUInt32
NullableInt64 NullableInt64
NullableUInt64 NullableUInt64
NullableSingle NullableSingle
NullableDouble NullableDouble
NullableDecimal NullableDecimal
NullableDateTime NullableDateTime
NullableGuid NullableGuid
NullableDateTimeOffset NullableDateTimeOffset
NullableTimeSpan NullableTimeSpan
BooleanArray BooleanArray
CharArray CharArray
SByteArray SByteArray
ByteArray ByteArray
Int16Array Int16Array
UInt16Array UInt16Array
Int32Array Int32Array
UInt32Array UInt32Array
Int64Array Int64Array
UInt64Array UInt64Array
SingleArray SingleArray
DoubleArray DoubleArray
DecimalArray DecimalArray
DateTimeArray DateTimeArray
StringArray StringArray
GuidArray GuidArray
DateTimeOffsetArray DateTimeOffsetArray
TimeSpanArray TimeSpanArray
VersionArray VersionArray
Array Array
IList IList
IDictionary IDictionary
IEnumerable IEnumerable
SdsType SdsType
SdsTypeProperty SdsTypeProperty
SdsStreamView SdsStreamView
SdsStreamViewProperty SdsStreamViewProperty
SdsStreamViewMap SdsStreamViewMap
SdsStreamViewMapProperty SdsStreamViewMapProperty
SdsStream SdsStream
SdsStreamIndex SdsStreamIndex
SdsTable SdsTable
SdsColumn SdsColumn
SdsValues SdsValues
SdsObject SdsObject
SByteEnum SByteEnum
ByteEnum ByteEnum
Int16Enum Int16Enum
UInt16Enum UInt16Enum
Int32Enum Int32Enum
UInt32Enum UInt32Enum
Int64Enum Int64Enum
UInt64Enum UInt64Enum
NullableSByteEnum NullableSByteEnum
NullableByteEnum NullableByteEnum
NullableInt16Enum NullableInt16Enum
NullableUInt16Enum NullableUInt16Enum
NullableInt32Enum NullableInt32Enum
NullableUInt32Enum NullableUInt32Enum
NullableInt64Enum NullableInt64Enum
NullableUInt64Enum NullableUInt64Enum

TypeReference

An asset type type reference represents dynamic stream data associated with an asset. The references must either be an SDS stream or an SDS stream view. Asset-centric data routes provide direct access to dynamic data for a given asset. There are no limitations on the number of references an asset may contain. However, an asset cannot contain multiple references to the same SDS stream. An asset reference does not stand alone. It must be specified within an asset object and, therefore, asset references do not have direct API routes.

Properties

Property Name Data Type Required Nullable Description
StreamReferenceId string false true The identifier for this type reference. If an asset is derived from this asset type, this identifier must be referenced in the asset reference type object. This identifier must be unique within asset types.
StreamReferenceName string false true User-friendly name for type reference
Description string false true Type reference description
TypeId string true false Referenced SdsType identifier
{
  "StreamReferenceId": "Reference1",
  "StreamReferenceName": "ReferenceName",
  "TypeId": "PI-Float32"
}


StatusConfiguration

Status configuration is a property of an asset or asset type that defines the simple status of an asset or asset type.

Properties

Property Name Data Type Required Nullable Description
DefinitionType StatusDefinitionType false false Status definition type. Only "StreamPropertyMapping" is supported.
Definition any false true Status definition
{
  "DefinitionType": "StreamPropertyMapping",
  "Definition": {
    "StreamReferenceId": "StatusMappingOnAssetTypeCrudFunctionalTest_streamRef",
    "StreamPropertyId": "Value",
    "ValueStatusMappings": [
      {
        "Value": 3,
        "Status": "Bad",
        "DisplayName": "Bad"
      },
      {
        "Value": 1,
        "Status": "Good",
        "DisplayName": "Good"
      }
    ]
  }
}


StatusDefinitionType

Status definition type. Currently, only StreamPropertyMapping is supported.

Enumerated Values

Property Value
Unspecified 0
StreamPropertyMapping 1

MultiStatusResultOfAssetTypeAndChildErrorTemplate

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 [AssetType] false true Requested information from call.
ChildErrors [ChildErrorTemplate] false true Child error pertaining to specific resources.
{
  "Reason": "string",
  "Error": "string",
  "OperationId": "string",
  "Data": [
    {
      "Id": "SampleAssetType01",
      "Description": "This is a sample asset type.",
      "Metadata": [
        {
          "Id": "Id-fbd82b97-d29e-4022-968e",
          "Name": "ModelNumber",
          "Description": "This is a static attribute on the asset type which represents the model number.",
          "SdsTypeCode": "Double",
          "Value": 0.01
        }
      ],
      "TypeReferences": [
        {
          "StreamReferenceId": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
          "StreamReferenceName": "ReferenceName",
          "TypeId": "PI-Float32"
        }
      ]
    }
  ],
  "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
}


JsonPatchDocumentOfPatchAssetType

Properties

Property Name Data Type Required Nullable Description
Operations [OperationOfPatchAssetType] false true None
{
  "Operations": [
    {
      "value": null,
      "path": "string",
      "op": "string",
      "from": "string"
    }
  ]
}


OperationOfPatchAssetType

Properties

Property Name Data Type Required Nullable Description
value any false true None
path string false true None
op string false true None
from string false true None
{
  "value": null,
  "path": "string",
  "op": "string",
  "from": "string"
}


Trustee

Properties

Property Name Data Type Required Nullable Description
Type TrusteeType false false None
ObjectId string false true None
TenantId string false true None
{
  "Type": 1,
  "ObjectId": "string",
  "TenantId": "string"
}


TrusteeType

Enumerated Values

Property Value Description
User 1
Client 2
Role 3

AccessControlList

Properties

Property Name Data Type Required Nullable Description
RoleTrusteeAccessControlEntries [AccessControlEntry] false true None
{
  "RoleTrusteeAccessControlEntries": [
    {
      "Trustee": {
        "Type": 1,
        "ObjectId": "string",
        "TenantId": "string"
      },
      "AccessType": 0,
      "AccessRights": 0
    }
  ]
}


AccessControlEntry

Properties

Property Name Data Type Required Nullable Description
Trustee Trustee false true None
AccessType AccessType false false None
AccessRights int64 false false None
{
  "Trustee": {
    "Type": 1,
    "ObjectId": "string",
    "TenantId": "string"
  },
  "AccessType": 0,
  "AccessRights": 0
}


AccessType

Enumerated Values

Property Value
Allowed 0
Denied 1

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