Update places within a place

post

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

This operation updates the place details with the definition that is provided for all the places within the given place name. This non-org aware REST API will be deprecated in future releases.

Request

Supported Media Types
Path Parameters
Header Parameters
Body ()
Root Schema : PlaceImpl_update
Type: object
Show Source
Nested Schema : children
Type: array
Property description was not set
Show Source
Nested Schema : geoFences
Type: array
References (0..N) to IoT geo fences related to the place
Show Source
Nested Schema : tags
Type: array
User defined tags for the place. Can be used by users for quick search, logical grouping of places etc.
Show Source
Nested Schema : Place_update
Type: object
Show Source
Nested Schema : geoFences
Type: array
Property description was not set
Show Source
Nested Schema : tags
Type: array
Property description was not set
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successfully processed.
Body ()
Root Schema : PlaceImpl_receive
Type: object
Show Source
Nested Schema : FloorPlan_receive
Type: object
Show Source
Nested Schema : geoFences
Type: array
References (0..N) to IoT geo fences related to the place
Show Source
Nested Schema : places
Type: object
References (0..N) to places contained in the place
Show Source
Nested Schema : tags
Type: array
User defined tags for the place. Can be used by users for quick search, logical grouping of places etc.
Show Source
Nested Schema : image
Type: object
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.

405 Response

Method Not Allowed. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

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

Example of Request Body

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


{
"id":"75b72d83355e-60f6",
"name":"The place name ",
"type":"Type of the place, e.g. GEO_ROUTE, GEO_CIRCLE, GEO_POLYGON, GEO_POINT, CITY, STATE, COUNTRY etc. Can be null.",
"description":"A human friendly description",
"organizationId":"531f1ff76a35-596f",
"geoFences":[
"geoFences_1",
"geoFences_2",
"geoFences_3"
],
"parent":"References to a place containing the place",
"tags":[
"tags_1",
"tags_2",
"tags_3"
],
"children":[
{
"id":"40538fd650e-69b9",
"name":"The place name ",
"type":"Type of the place, e.g. GEO_ROUTE, GEO_CIRCLE, GEO_POLYGON, GEO_POINT, CITY, STATE, COUNTRY etc. Can be null.",
"description":"A human friendly description",
"organizationId":"3d7360085549-3d42",
"geoFences":[
"geoFences_1",
"geoFences_2",
"geoFences_3"
],
"parent":"References to a place containing the place",
"tags":[
"tags_1",
"tags_2",
"tags_3"
]
}
]
}

Example of Response Body

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


{
"id":"53886569fff-3d2c",
"name":"The place name ",
"type":"Type of the place, e.g. GEO_ROUTE, GEO_CIRCLE, GEO_POLYGON, GEO_POINT, CITY, STATE, COUNTRY etc. Can be null.",
"description":"A human friendly description",
"organizationId":"32477fab52bd-11be",
"geoFences":[
"geoFences_1",
"geoFences_2",
"geoFences_3"
],
"parent":"References to a place containing the place",
"places":{
"links":[
{
"rel":"self",
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path"
},
{
"rel":"canonical",
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path"
}
]
},
"tags":[
"tags_1",
"tags_2",
"tags_3"
],
"floorplan":{
"id":"3ded5ba92940-142c",
"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'
   -H 'Content-Type: application/json'
   --header "X-HTTP-Method-Override: PATCH"
   -d '{"id":"75b72d83355e-60f6","name":"The place name ","type":"Type of the place, e.g. GEO_ROUTE, GEO_CIRCLE, GEO_POLYGON, GEO_POINT, CITY, STATE, COUNTRY etc. Can be null.","description":"A human friendly description","organizationId":"531f1ff76a35-596f","geoFences":["geoFences_1","geoFences_2","geoFences_3"],"parent":"References to a place containing the place","tags":["tags_1","tags_2","tags_3"],"children":[{"id":"40538fd650e-69b9","name":"The place name ","type":"Type of the place, e.g. GEO_ROUTE, GEO_CIRCLE, GEO_POLYGON, GEO_POINT, CITY, STATE, COUNTRY etc. Can be null.","description":"A human friendly description","organizationId":"3d7360085549-3d42","geoFences":["geoFences_1","geoFences_2","geoFences_3"],"parent":"References to a place containing the place","tags":["tags_1","tags_2","tags_3"]}]}'
   https://iotserver/assetMonitoring/clientapi/v2/places/{place-name}/places



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