Create or update floor plan

post

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

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

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
Root Schema : FloorPlanImpl_update
Type: object
Show Source
Nested Schema : FloorPlanReferencePoints_update
Type: object
Show Source
Back to Top

Response

Supported Media Types

202 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.

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'
   --header "X-HTTP-Method-Override: PATCH"
   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":"57197e2c779b-c0b",
"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 POST 
   -u <username>:<password>
   -H 'Accept: application/json'
   --header "X-HTTP-Method-Override: PATCH"
   -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