Replace asset type what-if event

put

/assetMonitoring/clientapi/v2/assetTypes/{asset-type-name}/whatIfs/{event-name}

This operation replaces the details by the definition that is provided for a given asset type what-if event.

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : AssetTypeWhatIfEventImpl_create
Type: object
Show Source
Nested Schema : items
Type: array
Simulation details of the asset type what-if event
Show Source
Nested Schema : SensorAttributeSimulationDetails_create
Type: object
Show Source
Nested Schema : Simulation_create
Type: object
Show Source
Nested Schema : actionStepSimulationDuration
Type: array
Property description was not set
Show Source
Nested Schema : anomalyDuration
Type: array
Property description was not set
Show Source
Nested Schema : anomalySimulation
Type: array
Property description was not set
Show Source
Nested Schema : extensions
Type: object
Additional Properties Allowed
Show Source
  • A map of the following type: Map<String, String>
Property description was not set
Show Source
Nested Schema : frequency
Type: array
Property description was not set
Show Source
Nested Schema : interval
Type: array
Property description was not set
Show Source
Nested Schema : probability
Type: array
Property description was not set
Show Source
Nested Schema : items
Type: object
Back to Top

Response

Supported Media Types

200 Response

Successfully processed.
Body ()
Root Schema : AssetTypeWhatIfEventImpl_receive
Type: object
Show Source
Nested Schema : image
Type: object
Show Source
Nested Schema : invocations
Type: array
What-if event invocation list
Show Source
Nested Schema : items
Type: array
Simulation details of the asset type what-if event
Show Source
Nested Schema : AssetWhatIfInvocation_receive
Type: object
Show Source
Nested Schema : SensorAttributeSimulationDetails_receive
Type: object
Show Source
Nested Schema : Simulation_receive
Type: object
Show Source
Nested Schema : extensions
Type: object
Additional Properties Allowed
Show Source
  • A map of the following type: Map<String, String>
Property description was not set
Show Source

400 Response

Bad Request. The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.

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.

415 Response

Unsupported Media Type. The request entity has a media type which the server or resource does not support.
Back to Top

Examples

curl -X PUT 
   -u <username>:<password>
   -H 'Accept: application/json'
   https://iotserver/assetMonitoring/clientapi/v2/assetTypes/{asset-type-name}/whatIfs/{event-name}

Example of Request Body

The following example shows the content of the request body in JSON format:


{
"assetTypeId":"1b4d601e35a4-22cf",
"description":"Description of the asset type what-if event",
"duration":12345,
"enabled":false,
"id":"77443d5c7f03-619",
"imagePartNo":12345,
"imageReference":"Property description was not set",
"items":[
{
"sensorAttributeId":"6b425f435def-4405",
"sensorAttributeName":"Asset sensor attribute name",
"simulation":{
"actionStepSimulationDuration":[
"actionStepSimulationDuration_1",
"actionStepSimulationDuration_2",
"actionStepSimulationDuration_3"
],
"anomalyDuration":[
"anomalyDuration_1",
"anomalyDuration_2",
"anomalyDuration_3"
],
"extensions":{
"extensions_key1":"extensions_value1",
"extensions_key2":"extensions_value2",
"extensions_key3":"extensions_value3"
},
"frequency":[
"frequency_1",
"frequency_2",
"frequency_3"
],
"interval":[
"interval_1",
"interval_2",
"interval_3"
],
"intervalRequired":false,
"probability":[
"probability_1",
"probability_2",
"probability_3"
],
"type":"Type of simulationOne of [PATTERN, FORMULA, CSV_REFERENCE]."
}
}
],
"name":"Unique name of the asset type what-if event"
}

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":"61275b5b713b-28b4",
"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":"2cbb31b82f11-65a3",
"lastModifiedBy":"Property description was not set",
"scenarioId":"8fa420a141b-56fe",
"startTime":1469184297746,
"startedBy":"Property description was not set",
"status":"One of [CREATED, RUNNING, COMPLETED, STOPPED, FAILED]."
}
],
"items":[
{
"sensorAttributeId":"4eaf3c3e317d-5ce3",
"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 PUT 
   -u <username>:<password>
   -H 'Accept: application/json'
   -d '{"assetTypeId":"1b4d601e35a4-22cf","description":"Description of the asset type what-if event","duration":12345,"enabled":false,"id":"77443d5c7f03-619","imagePartNo":12345,"imageReference":"Property description was not set","items":[{"sensorAttributeId":"6b425f435def-4405","sensorAttributeName":"Asset sensor attribute name","simulation":{"actionStepSimulationDuration":["actionStepSimulationDuration_1","actionStepSimulationDuration_2","actionStepSimulationDuration_3"],"anomalyDuration":["anomalyDuration_1","anomalyDuration_2","anomalyDuration_3"],"extensions":{"extensions_key1":"extensions_value1","extensions_key2":"extensions_value2","extensions_key3":"extensions_value3"},"frequency":["frequency_1","frequency_2","frequency_3"],"interval":["interval_1","interval_2","interval_3"],"intervalRequired":false,"probability":["probability_1","probability_2","probability_3"],"type":"Type of simulationOne of [PATTERN, FORMULA, CSV_REFERENCE]."}}],"name":"Unique name of the asset type what-if event"}'
   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.
Back to Top