Invoke what-if scenario
post
/assetMonitoring/clientapi/v2/assets/{asset-id}/whatIfInvocations
Request
Supported Media Types
- Method was not annotated with @Consumes
Path Parameters
-
asset-id: string
Entity description is undefined
Root Schema : AssetWhatIfInvocation_create
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].
Response
Supported Media Types
- application/json
200 Response
Successfully processed.
Root 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].
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.
403 Response
Forbidden. The server understood the request, but is refusing to fulfill it. Authorization will not help and the request SHOULD NOT be repeated.
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.
405 Response
Method Not Allowed. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
Examples
curl -X POST
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/assetMonitoring/clientapi/v2/assets/{asset-id}/whatIfInvocations
Example of Request Body
The following example shows the content of the request body in JSON format:
{
"duration":12345,
"endTime":1469184297746,
"id":"7d7554f1e8-2188",
"lastModifiedBy":"Property description was not set",
"scenarioId":"77dd2a563433-2710",
"startTime":1469184297746,
"startedBy":"Property description was not set",
"status":"One of [CREATED, RUNNING, COMPLETED, STOPPED, FAILED]."
}
Example of Response Body
The following example shows the content of the response body in JSON format:
{
"duration":12345,
"endTime":1469184297746,
"id":"205b357a7c-2626",
"lastModifiedBy":"Property description was not set",
"scenarioId":"79e32bfb281c-4440",
"startTime":1469184297746,
"startedBy":"Property description was not set",
"status":"One of [CREATED, RUNNING, COMPLETED, STOPPED, FAILED]."
}
Complete cURL Example
The following example shows a complete cURL command that you can use to perform the described operation:
curl -X POST
-u <username>:<password>
-H 'Accept: application/json'
-d '{"duration":12345,"endTime":1469184297746,"id":"7d7554f1e8-2188","lastModifiedBy":"Property description was not set","scenarioId":"77dd2a563433-2710","startTime":1469184297746,"startedBy":"Property description was not set","status":"One of [CREATED, RUNNING, COMPLETED, STOPPED, FAILED]."}'
https://iotserver/assetMonitoring/clientapi/v2/assets/231d52bc1182-5fee/whatIfInvocations
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.