Replace floor plan

put

/assetMonitoring/clientapi/v2/places/{place-name}/floorplan

This resource allows to replace floor plan definition completely on Oracle IoT Cloud Service. This non-org aware REST API will be deprecated in future releases.

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : FloorPlanImpl_create
Type: object
Show Source
Nested Schema : FloorPlanReferencePoints_create
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successfully processed.
Body ()
Root Schema : FloorPlanImpl_receive
Type: object
Show Source
Nested Schema : image
Type: object
Base64 encoded string corresponding to the floor plan image
Show Source
Nested Schema : FloorPlanReferencePoints_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.

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/places/{place-name}/floorplan

Example of Request Body

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


{
"name":"Floor plan name",
"description":"A human friendly description",
"referencePoints":{
"imageP1":"Coordinates of the first point on image",
"imageP2":"Coordinates of the second point on image",
"mapP1":"Geographic coordinates of the first point",
"mapP2":"Geographic coordinates of the second point"
},
"imageFileName":"Property description was not set"
}

Example of Response Body

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


{
"id":"79f63642262-42e5",
"name":"Floor plan name",
"description":"A human friendly description",
"image":{
"links":[
{
"rel":"self",
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path"
},
{
"rel":"canonical",
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path"
}
]
},
"referencePoints":{
"imageP1":"Coordinates of the first point on image",
"imageP2":"Coordinates of the second point on image",
"mapP1":"Geographic coordinates of the first point",
"mapP2":"Geographic coordinates of the second point"
}
}



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 '{"name":"Floor plan name","description":"A human friendly description","referencePoints":{"imageP1":"Coordinates of the first point on image","imageP2":"Coordinates of the second point on image","mapP1":"Geographic coordinates of the first point","mapP2":"Geographic coordinates of the second point"},"imageFileName":"Property description was not set"}'
   https://iotserver/assetMonitoring/clientapi/v2/places/{place-name}/floorplan



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