Assets
- Last UpdatedSep 03, 2024
- 18 minute read
Get Asset Owner
Returns the owner of specified asset.
Request
GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}/Owner
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string assetId
Asset 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. |
| 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 Owner
Updates the owner of specified asset.
Request
PUT /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}/Owner
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string assetId
Asset 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 owner updated. |
| 400 | ErrorTemplate | Request is not valid. See the response body for additional details. |
| 404 | ErrorTemplate | Not found. |
| 408 | ErrorTemplate | Request Timeout. |
| 503 | ErrorTemplate | Service unavailable. |
Get Asset Acl
Returns the access control list of the specified asset.
Request
GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}/AccessControl
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string assetId
Asset identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | AccessControlList | Access control list of the asset with given identifier. |
| 400 | ErrorTemplate | Request is not valid. See the response body for additional details. |
| 403 | ErrorTemplate | Forbidden. |
| 404 | ErrorTemplate | Not found. |
| 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 Access Control
Updates the access control of specified asset.
Request
PUT /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}/AccessControl
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string assetId
Asset 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 Access Rights
Returns the access rights of specified asset.
Request
GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}/AccessRights
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string assetId
Asset identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Inline | Access control list of the asset with given identifier. |
| 400 | ErrorTemplate | Request is not valid. See the response body for additional details. |
| 403 | ErrorTemplate | Forbidden. |
| 404 | ErrorTemplate | Not found. |
| 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
}
Get Asset
Returns specified asset and the version ETag in the HTTP response header.
Request
GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string assetId
Asset identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Asset | Assets with specified identifier. |
| 400 | ErrorTemplate | Request is not valid. See the response body for additional details. |
| 403 | ErrorTemplate | Forbidden. |
| 404 | ErrorTemplate | Not found. |
| 503 | ErrorTemplate | Service unavailable. |
Response Headers
| Status | Header | Type | Description |
|---|---|---|---|
| 200 | ETag | string | Version. |
Example response body
200 Response
{
"Id": "SampleAsset",
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "Id-abcde",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
}
],
"StreamReferences": [
{
"Id": "5345e98d-dc43-4f9d-a666-158a3baaf244",
"Name": "Data",
"Description": "This is the description for this stream reference.",
"StreamId": "SdsStream_1"
}
],
"Tags": [
"Tag1",
"Tag2"
]
}
400 Response (ErrorTemplate)
{
"OperationId": "string",
"Error": "string",
"Resolution": "string",
"Reason": "string",
"property1": null,
"property2": null
}
Get Or Create Asset
Creates a new asset. If the asset you are trying to create references an asset type (through the AssetTypeId property) and if the corresponding asset type has a metadata value with the same identifier, then the name and SDS type code of the metadata value on the asset must be null. If the asset type does not have metadata value with a corresponding Id, the name and SDS type code on the asset cannot be null. To support flexibility on creation and update, the following rules and behaviors are executed for metadata and stream references on a given asset when that asset is created from an asset type.
Request
POST /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string assetId
Asset identifier.
Request Body
Asset to create.
{
"Id": "SampleAsset",
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "Id-abcde",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
}
],
"StreamReferences": [
{
"Id": "5345e98d-dc43-4f9d-a666-158a3baaf244",
"Name": "Data",
"Description": "This is the description for this stream reference.",
"StreamId": "SdsStream_1"
}
],
"Tags": [
"Tag1",
"Tag2"
]
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Asset | OK. |
| 201 | Asset | Asset created. |
| 302 | None | Asset you attempted to create is identical to one that already exists. |
| 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 | Asset you attempted to create has a conflict. See the response body for additional details. |
| 503 | ErrorTemplate | Service unavailable. |
Response Headers
| Status | Header | Type | Description |
|---|---|---|---|
| 200 | ETag | string | Version. |
| 201 | ETag | string | Version. |
| 302 | Location | string | Location to get the identical resource. |
Example response body
200 Response
{
"Id": "SampleAsset",
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "Id-abcde",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
}
],
"StreamReferences": [
{
"Id": "5345e98d-dc43-4f9d-a666-158a3baaf244",
"Name": "Data",
"Description": "This is the description for this stream reference.",
"StreamId": "SdsStream_1"
}
],
"Tags": [
"Tag1",
"Tag2"
]
}
201 Response
{
"Id": "SampleAsset",
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "Id-abcde",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
}
],
"StreamReferences": [
{
"Id": "5345e98d-dc43-4f9d-a666-158a3baaf244",
"Name": "Data",
"Description": "This is the description for this stream reference.",
"StreamId": "SdsStream_1"
}
],
"Tags": [
"Tag1",
"Tag2"
]
}
400 Response (ErrorTemplate)
{
"OperationId": "string",
"Error": "string",
"Resolution": "string",
"Reason": "string",
"property1": null,
"property2": null
}
Create Or Update Asset
Creates or updates an asset with a specified identifier. If the asset already exists, you can specify an If-Match property in the HTTP request header to ensure that the asset is modified only if its version matches. To support flexibility on creation and update, the following rules and behaviors are executed for metadata and stream references on a given asset when that asset is from an asset type.
Request
PUT /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string assetId
Asset identifier.
Request Body
Asset to create or update.
{
"Id": "SampleAsset",
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "Id-abcde",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
}
],
"StreamReferences": [
{
"Id": "5345e98d-dc43-4f9d-a666-158a3baaf244",
"Name": "Data",
"Description": "This is the description for this stream reference.",
"StreamId": "SdsStream_1"
}
],
"Tags": [
"Tag1",
"Tag2"
]
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Asset | OK. |
| 201 | Asset | Asset created with specified identifier. |
| 400 | ErrorTemplate | 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": "SampleAsset",
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "Id-abcde",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
}
],
"StreamReferences": [
{
"Id": "5345e98d-dc43-4f9d-a666-158a3baaf244",
"Name": "Data",
"Description": "This is the description for this stream reference.",
"StreamId": "SdsStream_1"
}
],
"Tags": [
"Tag1",
"Tag2"
]
}
201 Response
{
"Id": "SampleAsset",
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "Id-abcde",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
}
],
"StreamReferences": [
{
"Id": "5345e98d-dc43-4f9d-a666-158a3baaf244",
"Name": "Data",
"Description": "This is the description for this stream reference.",
"StreamId": "SdsStream_1"
}
],
"Tags": [
"Tag1",
"Tag2"
]
}
400 Response (ErrorTemplate)
{
"OperationId": "string",
"Error": "string",
"Resolution": "string",
"Reason": "string",
"property1": null,
"property2": null
}
Patch Asset
Performs a Patch operation on the asset with the specified identifier. The request body is expected to be a JSON Patch (RFC 6902) document. For the purposes of Patch operations, Asset StreamReferences and Metadata are treated as dictionaries keyed by their identifiers, even though these properties are lists in the underlying Asset model. This permits individual StreamReferences and Metadata items to be indexed by their identifiers in the operation path.
Request
PATCH /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string assetId
Asset identifier.
Request Body
Asset patch document.
"SampleAssetName"
{
"Id": "Id-vwxyz",
"Name": "SerialNumber",
"Description": "This is a static attribute on the asset which represents the serial number.",
"SdsTypeCode": "String",
"Value": "SN6845"
}
"Tag3"
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Asset | OK. |
| 400 | ErrorTemplate | 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. |
Example response body
200 Response
{
"Id": "SampleAsset",
"Name": "SampleAssetName",
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "Id-abcde",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
},
{
"Id": "Id-vwxyz",
"Name": "SerialNumber",
"Description": "This is a static attribute on the asset which represents the serial number.",
"SdsTypeCode": "String",
"Value": "SN6645"
}
],
"StreamReferences": [
{
"Id": "5345e98d-dc43-4f9d-a666-158a3baaf244",
"Name": "Data",
"Description": "This is the description for this stream reference.",
"StreamId": "SdsStream_1"
}
],
"Tags": [
"Tag1",
"Tag2",
"Tag3"
]
}
400 Response (ErrorTemplate)
{
"OperationId": "string",
"Error": "string",
"Resolution": "string",
"Reason": "string",
"property1": null,
"property2": null
}
Delete Asset
Deletes the asset with a specified identifier.
Request
DELETE /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets/{assetId}
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.string assetId
Asset identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | Asset 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. |
| 412 | ErrorTemplate | Pre-Condition Failed. |
| 503 | ErrorTemplate | Service unavailable. |
Assets
List Assets
Returns an array of assets in a given namespace and the total number of assets returned, specified as Total-Count in the HTTP response header.
Request
GET /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets
?filter={filter}&skip={skip}&count={count}&orderBy={orderBy}&query={query}
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.
[optional] string filter
String used to filter the asset search results. Filter strings are not case-sensitive. Filters can be applied for the AssetTypeName property, the Status property, and the asset metadata properties, using the syntax filter[property_name]=property_value.[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 orderBy
Optional parameter which returns assets ordered either by the asset Id or the asset Name. Specify asc or desc to return the results in ascending or descending order. If not specified, the default is ascending order.[optional] string query
Query identifier.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | Asset[] | List of assets in the system. |
| 400 | ErrorTemplate | The 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 assets in the namespace. |
| 200 | ETag | string | Collection ETag. Changes whenever an asset is created, updated, or deleted. |
Example response body
200 Response
[
{
"Id": "SampleAsset",
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "fbd82b97-d29e-4022-968e-f8492cf86644",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
}
],
"StreamReferences": [
{
"Id": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
"Name": "Data",
"Description": "This is reference to a stream. The stream Id is SdsStream_1.",
"StreamId": "SdsStream_1"
}
]
},
{
"Id": "SecondSampleAsset",
"Description": "This is a second sample asset.",
"Metadata": [
{
"Id": "90ef6205-152b-40ed-8ffa-bac3feff6fa2",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 900
}
],
"StreamReferences": [
{
"Id": "fdda0985-7dba-48aa-95fc-55620a9b59ad",
"Name": "Data",
"Description": "This is reference to a stream. The stream identifier is SdsStream_2.",
"StreamId": "SdsStream_2"
}
]
}
]
400 Response (ErrorTemplate)
{
"OperationId": "string",
"Error": "string",
"Resolution": "string",
"Reason": "string",
"property1": null,
"property2": null
}
Head Assets
Returns the Headers corresponding to the GET Assets 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}/Assets
?filter={filter}&query={query}&includeTotalCount={includeTotalCount}
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.
[optional] string filter
String used to filter the asset search results. Filter strings are not case-sensitive. Filters can be applied for the AssetTypeName property, the Status property, and the asset metadata properties, using the syntax filter[property_name]=property_value.[optional] string query
Search query. Defaults to all assets if unspecified.[optional] boolean includeTotalCount
Optional parameter. If set to false, Total-Count header will not be included.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | Call succeeded. |
| 400 | ErrorTemplate | Invalid query syntax. |
| 403 | ErrorTemplate | Forbidden. |
| 408 | ErrorTemplate | Request Timeout. |
| 503 | ErrorTemplate | Service unavailable. |
Response Headers
| Status | Header | Type | Description |
|---|---|---|---|
| 204 | Total-Count | integer | Total number of assets in the matching the query and filter criteria and which the caller has permission to read. |
| 204 | ETag | string | Collection ETag. Changes whenever an asset is created, updated, or deleted. |
Create Asset
Creates a new asset. If the asset you are trying to create references an asset type (through the AssetTypeId property) and if the corresponding asset type has a metadata value with the same identifier, then the name and SDS type code of the metadata value on the asset must be null. If the asset type does not have metadata value with a corresponding Id, the name and SDS type code on the asset cannot be null. To support flexibility on creation and update, the following rules and behaviors are executed for metadata and stream references on a given asset when that asset is created from an asset type.
Request
POST /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Assets
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.
Request Body
Asset you want to create.
{
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "Id-abcde",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
}
],
"StreamReferences": [
{
"Id": "5345e98d-dc43-4f9d-a666-158a3baaf244",
"Name": "Data",
"Description": "This is the description for this stream reference.",
"StreamId": "SdsStream_1"
}
],
"Tags": [
"Tag1",
"Tag2"
]
}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 201 | Asset | Asset created |
| 400 | ErrorTemplate | Request is not valid. See the response body for additional details. |
| 403 | ErrorTemplate | You are not authorized to create assets. |
| 408 | ErrorTemplate | Request Timeout. |
| 503 | ErrorTemplate | Service unavailable. |
Response Headers
| Status | Header | Type | Description |
|---|---|---|---|
| 201 | ETag | string | Version. |
Example response body
201 Response
{
"Id": "6dad79ed-e0ea-423f-aed3-2ba2fccf5335",
"Name": "6dad79ed-e0ea-423f-aed3-2ba2fccf5335",
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "Id-abcde",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
}
],
"StreamReferences": [
{
"Id": "5345e98d-dc43-4f9d-a666-158a3baaf244",
"Name": "Data",
"Description": "This is the description for this stream reference.",
"StreamId": "SdsStream_1"
}
],
"Tags": [
"Tag1",
"Tag2"
]
}
400 Response (ErrorTemplate)
{
"OperationId": "string",
"Error": "string",
"Resolution": "string",
"Reason": "string",
"property1": null,
"property2": null
}
Bulk Create Assets
Creates assets in bulk. Creates multiple assets in a single call.
Request
POST /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Bulk/Assets
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.
Request Body
List of assets you want to create.
Response
| Status Code | Body Type | Description |
|---|---|---|
| 200 | MultiStatusResultOfAssetAndChildErrorTemplate | Assets as persisted, including values for optional parameters that were omitted in the request. |
| 207 | MultiStatusResultOfAssetAndChildErrorTemplate | Partial success. Some assets 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 (MultiStatusResultOfAssetAndChildErrorTemplate)
{
"Reason": "string",
"Error": "string",
"OperationId": "string",
"Data": [
{
"Id": "SampleAsset",
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "Id-abcde",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
}
],
"StreamReferences": [
{
"Id": "5345e98d-dc43-4f9d-a666-158a3baaf244",
"Name": "Data",
"Description": "This is the description for this stream reference.",
"StreamId": "SdsStream_1"
}
],
"Tags": [
"Tag1",
"Tag2"
]
}
],
"ChildErrors": [
{
"OperationId": "string",
"Error": "string",
"Resolution": "string",
"Reason": "string",
"StatusCode": 0,
"property1": null,
"property2": null
}
]
}
Bulk Delete Assets
Deletes all assets with the specified identifiers. This API can delete up to a maximum of 1000 assets in one API call.
Request
DELETE /api/v1/Tenants/{tenantId}/Namespaces/{namespaceId}/Bulk/Assets
?id={id}
Parameters
string tenantId
Tenant identifier.string namespaceId
Namespace identifier.
[optional] array id
Ampersand separated asset identifiers in the form of id={assetId_1}&id={assetId_2}
Response
| Status Code | Body Type | Description |
|---|---|---|
| 204 | None | Assets with the specified ids has been deleted. |
| 207 | MultiStatusResultOfStringAndChildErrorTemplate | Partial success. Not all assets were deleted. 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
207 Response (MultiStatusResultOfStringAndChildErrorTemplate)
{
"Reason": "string",
"Error": "string",
"OperationId": "string",
"Data": [
"string"
],
"ChildErrors": [
{
"OperationId": "string",
"Error": "string",
"Resolution": "string",
"Reason": "string",
"StatusCode": 0,
"property1": null,
"property2": null
}
]
}
Definitions
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 |
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
}
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 |
Asset
Represents an asset object.
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 |
| AssetTypeId | string | false | true | Asset type identifier. Identifier for the asset type that this asset is derived from. To get the merged view of the asset, get the resolved asset through the /Assets/{assetId}/Resolved route. |
| StreamReferences | [StreamReference] | false | true | Asset stream reference |
| Status | StatusConfiguration | false | true | Asset status |
| Tags | string[] | false | true | Asset tags |
{
"Id": "SampleAsset",
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "Id-abcde",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
}
],
"StreamReferences": [
{
"Id": "5345e98d-dc43-4f9d-a666-158a3baaf244",
"Name": "Data",
"Description": "This is the description for this stream reference.",
"StreamId": "SdsStream_1"
}
],
"Tags": [
"Tag1",
"Tag2"
]
}
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 |
StreamReference
An asset stream 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 stream 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 |
|---|---|---|---|---|
| Id | string | false | true | Stream Reference identifier |
| Name | string | false | true | User-friendly name for stream reference |
| Description | string | false | true | Description of the stream reference |
| StreamId | string | true | false | SDS stream identifier that is being referenced. |
{
"Id": "f1bf9da2-3858-4bcd-bf93-e7c26ab0d28e",
"Name": "Data",
"Description": "This is reference to a stream. The stream identifier is SdsStream_1.",
"StreamId": "SdsStream_1"
}
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 |
JsonPatchDocumentOfPatchAsset
Properties
| Property Name | Data Type | Required | Nullable | Description |
|---|---|---|---|---|
| Operations | [OperationOfPatchAsset] | false | true | None |
{
"Operations": [
{
"value": null,
"path": "string",
"op": "string",
"from": "string"
}
]
}
OperationOfPatchAsset
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"
}
MultiStatusResultOfAssetAndChildErrorTemplate
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 | [Asset] | false | true | Requested information from call. |
| ChildErrors | [ChildErrorTemplate] | false | true | Child error pertaining to specific resources. |
{
"Reason": "string",
"Error": "string",
"OperationId": "string",
"Data": [
{
"Id": "SampleAsset",
"Description": "This is a sample asset.",
"Metadata": [
{
"Id": "Id-abcde",
"Name": "ModelNumber",
"Description": "This is a static attribute on the asset which represents the model number.",
"SdsTypeCode": "Double",
"Value": 0.01
}
],
"StreamReferences": [
{
"Id": "5345e98d-dc43-4f9d-a666-158a3baaf244",
"Name": "Data",
"Description": "This is the description for this stream reference.",
"StreamId": "SdsStream_1"
}
],
"Tags": [
"Tag1",
"Tag2"
]
}
],
"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
}
MultiStatusResultOfStringAndChildErrorTemplate
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 | string[] | false | true | Requested information from call. |
| ChildErrors | [ChildErrorTemplate] | false | true | Child error pertaining to specific resources. |
{
"Reason": "string",
"Error": "string",
"OperationId": "string",
"Data": [
"string"
],
"ChildErrors": [
{
"OperationId": "string",
"Error": "string",
"Resolution": "string",
"Reason": "string",
"StatusCode": 0,
"property1": null,
"property2": null
}
]
}