Retrieve asset type details by name
get
/assetMonitoring/clientapi/v2/assetTypes/{asset-type-name}
This operation returns the asset type details for the given asset type name.
Request
Path Parameters
-
asset-type-name: string
Name of asset type to be retrieved from Oracle IoT Asset Monitoring Cloud Service
Query Parameters
-
expand(optional): string
The list of fields to be expanded in the result. Use 'all' to expand all expandable fields in result.
-
fields(optional): string
The comma-separated list of fields to be shown in response. By default all response object fields will be present.
Response
Supported Media Types
- application/json
- application/vnd.oracle.resource+json;type=singular
200 Response
Successfully processed.
Root Schema : AssetTypeImpl_receive
Type:
Show Source
object
-
actions:
object actions
Access actions definitions for the given asset type
-
attributes:
array attributes
List of asset types attributes
-
classes:
array classes
Read-only set of classes assigned to the given asset type
-
description:
string
Description of the asset type provided by the user
-
icon:
object icon
Binary object representing asset type icon. To set asset icon, binary stream with image data should be posted to the server as a multipart request
-
id:
string
Unique immutable id of the asset type object
-
lastModifiedBy:
string
Name of the user who last modified the definition of asset type.
-
lastModifiedTime:
integer
The time when the asset definition was last updated as an epoch value.
-
lastModifiedTimeAsString:
integer
The time when the asset type was last updated as an ISO-8601 formatted string.
-
maintenanceActivities:
array maintenanceActivities
List of maintenance activities for the particular asset
-
metrics:
array metrics
List of asset type metrics
-
name:
string
Unique mutable name of the asset type object. If name is not specified during asset creation, it will be set to the same value as generated uniqu asset type ID
-
organizationId:
string
The organization id for the given asset type
Nested Schema : actions
Type:
object
Access actions definitions for the given asset type
Show Source
-
links(optional):
array links
The set of API navigation links.
Nested Schema : classes
Type:
array
Read-only set of classes assigned to the given asset type
Show Source
Nested Schema : icon
Type:
object
Binary object representing asset type icon. To set asset icon, binary stream with image data should be posted to the server as a multipart request
Show Source
-
links(optional):
array links
The set of API navigation links.
Nested Schema : maintenanceActivities
Type:
array
List of maintenance activities for the particular asset
Show Source
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
Nested Schema : AssetAttributeDefinition_receive
Type:
Show Source
object
-
allowedValues:
array allowedValues
List of allowed values for the given field e.g. For the type field, it can be the names of all the asset types registered with the system.
-
assetTypeId:
string
Applicable only when "type" is asset. If type is asset, then asset type id must be specified.
-
dataType:
string
Applicable only when "type" is sensor. If type is sensor, then dataType must be specified.One of [STRING, NUMBER, BOOLEAN, INTEGER, DATETIME, URI, DATE].
-
deviceModel:
string
Applicable only when "type" is device. If type is device, then deviceModel must be specified.
-
id:
string
Identifier of the asset attribute e.g. &qot;id&qot;, &qot;0-AB&qot; etc. Identifier should be unique across asset attributes of a given type. This value is present only for attributes of type equal to SENSOR
-
instructions:
string
A human friendly instructions on how to fill given attribute
-
kind:
string
Type of the asset attribute. Following types would be supported &qot;string&qot;, &qot;number&qot;, &qot;boolean&qot;, &qot;date&qot;, &qot;binary&qot;, &qot;device&qot;, &qot;asset&qot;, &qot;sensor&qot;One of [STATIC, DYNAMIC, ASSET, DEVICE, BINARY, ALERT, SENSOR, CONTROL].
-
name:
string
Name of the asset attribute e.g. &qot;name&qot;, &qot;manufacturer&qot;, &qot;brand&qot;, &qot;status&qot; etc. Name should be unique across asset attributes of a given type
-
partitioningByAllowedValues:
boolean
Property description was not set
-
properties:
object properties
Additional Properties Allowed: additionalPropertiesProperty description was not set
-
required:
boolean
Specifies whether the asset must define this attribute to be valid
-
samplingPolicy:
object SamplingPolicy_receive
-
sensorAttributes:
array sensorAttributes
Property description was not set
-
simulation:
object Simulation_receive
-
static:
boolean
Property description was not set
-
type:
string
Type of the asset attribute. Following types would be supported &qot;string&qot;, &qot;number&qot;, &qot;boolean&qot;, &qot;date&qot;, &qot;binary&qot;, &qot;device&qot;, &qot;asset&qot;, &qot;sensor&qot;
-
unique:
boolean
Specifies whether the asset attribute value must be unique
-
valuePropagation:
object AssetAttributeValuePropagation_receive
Nested Schema : allowedValues
Type:
array
List of allowed values for the given field e.g. For the type field, it can be the names of all the asset types registered with the system.
Show Source
Nested Schema : properties
Type:
object
Additional Properties Allowed
Show Source
-
string
A map of the following type: Map<String, String>
Property description was not set
Show Source
Nested Schema : SamplingPolicy_receive
Type:
Show Source
object
-
interval:
integer
Property description was not set
-
type:
string
One of [NONE, LAST_VALUE, MINIMUM_VALUE, MAXIMUM_VALUE, MEAN_VALUE, THRESHOLD_VIOLATIONS].
Nested Schema : Simulation_receive
Type:
Show Source
object
-
extensions:
object extensions
Additional Properties Allowed: additionalPropertiesProperty description was not set
-
type:
string
Type of simulationOne of [PATTERN, FORMULA, CSV_REFERENCE].
Nested Schema : AssetAttributeValuePropagation_receive
Type:
Show Source
object
-
assetAttributeId:
string
Property description was not set
-
reverseDirection:
boolean
Property description was not set
-
sourceAttributeId:
string
Property description was not set
Nested Schema : items
Type:
object
Nested Schema : SensorAttributeType_receive
Type:
Show Source
object
-
field:
string
The name of the field.
-
format:
string
The format asssociated with this attribute.
-
id:
string
The unique id of the sensor.
-
name:
string
The name of this attribute.
Nested Schema : extensions
Type:
object
Additional Properties Allowed
Show Source
-
string
A map of the following type: Map<String, String>
Property description was not set
Show Source
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
Nested Schema : AssetMaintenanceActivity_receive
Type:
Show Source
object
-
description:
string
Description of the asset maintenance activity
-
name:
string
Name of the asset maintenance activity
Nested Schema : AssetMetric_receive
Type:
Show Source
object
-
description:
string
Description of the metric. This can be used in the UI.
-
displayName:
string
User-friendly name of the metric to be used in UI
-
frequency:
string
How frequently this metric would be computedOne of [HOURLY, DAILY, WEEKLY, MONTHLY].
-
name:
string
Name of the metric. e.g. mileage, utilization, totalUsage, efficiency, lifespan, currentLocation, energySavings, presenceInPlace, etc. Name of the metric should be unique across all the metrics defined for an asset type
-
parameters:
object parameters
Additional Properties Allowed: additionalPropertiesList of parameters provided by user that would be required for computing the metric. For example, for tracking "availability", or "ghost assets", parameter can be "duration". In this case all the assets that have not reported in last time interval greater than or equal to "duration" would be considered unavailable.
-
type:
string
One of [STRING, NUMBER, BOOLEAN, PERCENTAGE].
Nested Schema : parameters
Type:
object
Additional Properties Allowed
Show Source
-
string
A map of the following type: Map<String, String>
List of parameters provided by user that would be required for computing the metric. For example, for tracking "availability", or "ghost assets", parameter can be "duration". In this case all the assets that have not reported in last time interval greater than or equal to "duration" would be considered unavailable.
Show Source
401 Response
Unauthorized. The request requires user authentication.
404 Response
Not Found. The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
406 Response
Request Not Acceptable. The resource identified by the request is only capable of generating response entities which have content characteristics not acceptable according to the accept headers sent in the request.
Examples
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/assetMonitoring/clientapi/v2/assetTypes/{asset-type-name}
Example of Response Body
The following example shows the content of the response body in JSON format:
{
"actions":{
"links":[
{
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"attributes":[
{
"assetTypeId":"31f358d44dbe-497f",
"dataType":"Applicable only when 'type' is sensor. If type is sensor, then dataType must be specified.One of [STRING, NUMBER, BOOLEAN, INTEGER, DATETIME, URI, DATE].",
"deviceModel":"Applicable only when 'type' is device. If type is device, then deviceModel must be specified.",
"id":"1d35313f6d4a-7b4d",
"instructions":"A human friendly instructions on how to fill given attribute",
"kind":"Type of the asset attribute. Following types would be supported &qot;string&qot;, &qot;number&qot;, &qot;boolean&qot;, &qot;date&qot;, &qot;binary&qot;, &qot;device&qot;, &qot;asset&qot;, &qot;sensor&qot;One of [STATIC, DYNAMIC, ASSET, DEVICE, BINARY, ALERT, SENSOR, CONTROL].",
"name":"Name of the asset attribute e.g. &qot;name&qot;, &qot;manufacturer&qot;, &qot;brand&qot;, &qot;status&qot; etc. Name should be unique across asset attributes of a given type",
"partitioningByAllowedValues":false,
"properties":{
"properties_key1":"properties_value1",
"properties_key2":"properties_value2",
"properties_key3":"properties_value3"
},
"required":false,
"samplingPolicy":{
"interval":12345,
"type":"One of [NONE, LAST_VALUE, MINIMUM_VALUE, MAXIMUM_VALUE, MEAN_VALUE, THRESHOLD_VIOLATIONS]."
},
"sensorAttributes":[
{
"field":"The name of the field.",
"format":"The format asssociated with this attribute.",
"id":"369e178a3614-58c4",
"name":"The name of this attribute."
}
],
"simulation":{
"extensions":{
"extensions_key1":"extensions_value1",
"extensions_key2":"extensions_value2",
"extensions_key3":"extensions_value3"
},
"type":"Type of simulationOne of [PATTERN, FORMULA, CSV_REFERENCE]."
},
"static":false,
"type":"Type of the asset attribute. Following types would be supported &qot;string&qot;, &qot;number&qot;, &qot;boolean&qot;, &qot;date&qot;, &qot;binary&qot;, &qot;device&qot;, &qot;asset&qot;, &qot;sensor&qot;",
"unique":false,
"valuePropagation":{
"assetAttributeId":"2e8140434408-41ad",
"reverseDirection":false,
"sourceAttributeId":"1c21d9e4ffe-3dae"
}
}
],
"classes":[
"classes_1",
"classes_2",
"classes_3"
],
"description":"Description of the asset type provided by the user",
"icon":{
"links":[
{
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"id":"df736d713b7-f37",
"lastModifiedBy":"Name of the user who last modified the definition of asset type.",
"lastModifiedTime":1469184297746,
"lastModifiedTimeAsString":1469184297746,
"maintenanceActivities":[
{
"description":"Description of the asset maintenance activity",
"name":"Name of the asset maintenance activity"
}
],
"metrics":[
{
"description":"Description of the metric. This can be used in the UI.",
"displayName":"User-friendly name of the metric to be used in UI",
"frequency":"How frequently this metric would be computedOne of [HOURLY, DAILY, WEEKLY, MONTHLY].",
"name":"Name of the metric. e.g. mileage, utilization, totalUsage, efficiency, lifespan, currentLocation, energySavings, presenceInPlace, etc. Name of the metric should be unique across all the metrics defined for an asset type",
"parameters":{
"parameters_key1":"parameters_value1",
"parameters_key2":"parameters_value2",
"parameters_key3":"parameters_value3"
},
"type":"One of [STRING, NUMBER, BOOLEAN, PERCENTAGE]."
}
],
"name":"Unique mutable name of the asset type object. If name is not specified during asset creation, it will be set to the same value as generated uniqu asset type ID",
"organizationId":"1c2b459f4ab2-21e"
}
Complete cURL Example
The following example shows a complete cURL command that you can use to perform the described operation:
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/assetMonitoring/clientapi/v2/assetTypes/{asset-type-name}
Note that in the request,
https://iotserver
will be replaced by the name and port of your assigned IoT Cloud Service instance. The format of the Cloud Service instance is
https://myinstance-myidentitydomain.iot.us.oraclecloud.com
and the default port is 443.