Perform actions on assets

post

/assetMonitoring/clientapi/v2/assets/checkedOut

This operation performs a check-in or checkout of assets and returns the corresponding message if it succeeded or the reason of failure if it failed.

Request

Supported Media Types
Header Parameters
Body ()
Root Schema : AssetCheckOut_update
Type: object
Show Source
Nested Schema : failed
Type: array
Property description was not set
Show Source
Nested Schema : items
Type: array
Property description was not set
Show Source
Nested Schema : succeeded
Type: array
Property description was not set
Show Source
Nested Schema : AssetCheckOut_Failed_update
Type: object
Show Source
Nested Schema : AssetCheckOut_Item_update
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successfully processed.
Body ()
Root Schema : AssetCheckOut_receive
Type: object
Show Source
Nested Schema : failed
Type: array
Property description was not set
Show Source
Nested Schema : items
Type: array
Property description was not set
Show Source
Nested Schema : succeeded
Type: array
Property description was not set
Show Source
Nested Schema : AssetCheckOut_Failed_receive
Type: object
Show Source
Nested Schema : AssetCheckOut_Item_receive
Type: object
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.

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.

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 POST 
   -u <username>:<password>
   -H 'Accept: application/json'
   -H 'Content-Type: application/json'
   --header "X-HTTP-Method-Override: PATCH"
   https://iotserver/assetMonitoring/clientapi/v2/assets/checkedOut

Example of Request Body

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


{
"checkedOutStatus":false,
"failed":[
{
"assetName":"Property description was not set",
"reason":"Property description was not set"
}
],
"items":[
{
"assetName":"Property description was not set",
"checkedOutBy":"Property description was not set"
}
],
"succeeded":[
"succeeded_1",
"succeeded_2",
"succeeded_3"
]
}

Example of Response Body

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


{
"checkedOutStatus":false,
"failed":[
{
"assetName":"Property description was not set",
"reason":"Property description was not set"
}
],
"items":[
{
"assetName":"Property description was not set",
"checkedOutBy":"Property description was not set"
}
],
"succeeded":[
"succeeded_1",
"succeeded_2",
"succeeded_3"
]
}



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'
   -H 'Content-Type: application/json'
   --header "X-HTTP-Method-Override: PATCH"
   -d '{"checkedOutStatus":false,"failed":[{"assetName":"Property description was not set","reason":"Property description was not set"}],"items":[{"assetName":"Property description was not set","checkedOutBy":"Property description was not set"}],"succeeded":["succeeded_1","succeeded_2","succeeded_3"]}'
   https://iotserver/assetMonitoring/clientapi/v2/assets/checkedOut



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