Retrieve asset type what-if event details by name
get
/assetMonitoring/clientapi/v2/assetTypes/{asset-type-name}/whatIfs/{event-name}
This operation returns the asset type what-if event details for the given asset type name.
Request
Path Parameters
-
asset-type-name: string
Entity description is undefined
-
event-name: string
Name of asset type what-if event 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 : AssetTypeWhatIfEventImpl_receive
Type:
Show Source
object
-
description:
string
Description of the asset type what-if event
-
duration:
integer
Duration of what-if event simulation. If duration <= 0 runs forever until manually stopped< div> =>
-
enabled:
boolean
True if asset type what-if event could be used, null or false - otherwise
-
id:
string
Unique immutable id of the asset type what-if event
-
image:
object image
-
invocations:
array invocations
What-if event invocation list
-
items:
array items
Simulation details of the asset type what-if event
-
name:
string
Unique name of the asset type what-if event
Nested Schema : image
Type:
Show Source
object
-
links(optional):
array links
The set of API navigation links.
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 : AssetWhatIfInvocation_receive
Type:
Show Source
object
-
duration:
integer
Property description was not set
-
endTime:
integer
Property description was not set
-
id:
string
Property description was not set
-
lastModifiedBy:
string
Property description was not set
-
scenarioId:
string
Property description was not set
-
startedBy:
string
Property description was not set
-
startTime:
integer
Property description was not set
-
status:
string
One of [CREATED, RUNNING, COMPLETED, STOPPED, FAILED].
Nested Schema : SensorAttributeSimulationDetails_receive
Type:
Show Source
object
-
sensorAttributeId:
string
Asset sensor attribute id
-
sensorAttributeName:
string
Asset sensor attribute name
-
simulation:
object Simulation_receive
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 : 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
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}/whatIfs/{event-name}
Example of Response Body
The following example shows the content of the response body in JSON format:
{
"description":"Description of the asset type what-if event",
"duration":12345,
"enabled":false,
"id":"324e1b383250-2505",
"image":{
"links":[
{
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path",
"rel":"self"
},
{
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path",
"rel":"canonical"
}
]
},
"invocations":[
{
"duration":12345,
"endTime":1469184297746,
"id":"734266071409-17e2",
"lastModifiedBy":"Property description was not set",
"scenarioId":"5ce546c26f5-64c2",
"startTime":1469184297746,
"startedBy":"Property description was not set",
"status":"One of [CREATED, RUNNING, COMPLETED, STOPPED, FAILED]."
}
],
"items":[
{
"sensorAttributeId":"69ee47f01ace-4a7",
"sensorAttributeName":"Asset sensor attribute name",
"simulation":{
"extensions":{
"extensions_key1":"extensions_value1",
"extensions_key2":"extensions_value2",
"extensions_key3":"extensions_value3"
},
"type":"Type of simulationOne of [PATTERN, FORMULA, CSV_REFERENCE]."
}
}
],
"name":"Unique name of the asset type what-if event"
}
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}/whatIfs/{event-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.