Replace place by name
put
/assetMonitoring/clientapi/v2/places/{place-name}
This operation replaces place details by the provided definition for the given place name. This non-org aware REST API will be deprecated in future releases.
Request
Supported Media Types
- application/json
Path Parameters
-
place-name: string
Name of the place to be replaced
Root Schema : PlaceImpl_create
Type:
Show Source
object
-
children:
array children
Property description was not set
-
description:
string
A human friendly description
-
geoFences:
array geoFences
References (0..N) to IoT geo fences related to the place
-
id:
string
Place unique id
-
name:
string
The place name
-
organizationId:
string
The organization id of the given place
-
parent:
string
References to a place containing the place
-
tags:
array tags
User defined tags for the place. Can be used by users for quick search, logical grouping of places etc.
-
type:
string
Type of the place, e.g. GEO_ROUTE, GEO_CIRCLE, GEO_POLYGON, GEO_POINT, CITY, STATE, COUNTRY etc. Can be null.
Nested Schema : geoFences
Type:
array
References (0..N) to IoT geo fences related to the place
Show Source
Nested Schema : Place_create
Type:
Show Source
object
-
description:
string
Property description was not set
-
geoFences:
array geoFences
Property description was not set
-
id:
string
Property description was not set
-
name:
string
Property description was not set
-
organizationId:
string
Property description was not set
-
parent:
string
Property description was not set
-
tags:
array tags
Property description was not set
-
type:
string
Property description was not set
Response
Supported Media Types
- application/json
- application/vnd.oracle.resource+json;type=singular
200 Response
Successfully processed.
Root Schema : PlaceImpl_receive
Type:
Show Source
object
-
description:
string
A human friendly description
-
floorplan:
object FloorPlan_receive
-
geoFences:
array geoFences
References (0..N) to IoT geo fences related to the place
-
id:
string
Place unique id
-
name:
string
The place name
-
organizationId:
string
The organization id of the given place
-
parent:
string
References to a place containing the place
-
places:
object places
References (0..N) to places contained in the place
-
tags:
array tags
User defined tags for the place. Can be used by users for quick search, logical grouping of places etc.
-
type:
string
Type of the place, e.g. GEO_ROUTE, GEO_CIRCLE, GEO_POLYGON, GEO_POINT, CITY, STATE, COUNTRY etc. Can be null.
Nested Schema : FloorPlan_receive
Type:
Show Source
object
-
description:
string
Property description was not set
-
id:
string
Property description was not set
-
image:
object image
-
name:
string
Property description was not set
-
referencePoints:
object FloorPlanReferencePoints_receive
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
-
links(optional):
array links
The set of API navigation links.
Nested Schema : image
Type:
Show Source
object
-
links(optional):
array links
The set of API navigation links.
Nested Schema : FloorPlanReferencePoints_receive
Type:
Show Source
object
-
imageP1:
string
Property description was not set
-
imageP2:
string
Property description was not set
-
mapP1:
string
Property description was not set
-
mapP2:
string
Property description was not set
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
Nested Schema : items
Type:
Show Source
object
-
href(optional):
string
The target resource URIExample:
https://iotserver/iot/api/vX/some/API/path
-
rel(optional):
string
Relation typeExample:
canonical
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.
Examples
curl -X PUT
-u <username>:<password>
-H 'Accept: application/json'
-H 'Content-Type: application/json'
https://iotserver/assetMonitoring/clientapi/v2/places/{place-name}
Example of Request Body
The following example shows the content of the request body in JSON format:
{
"id":"7efd58dc1766-7ef6",
"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":"23f3dae3df1-1071",
"geoFences":[
"geoFences_1",
"geoFences_2",
"geoFences_3"
],
"parent":"References to a place containing the place",
"tags":[
"tags_1",
"tags_2",
"tags_3"
],
"children":[
{
"id":"53cb5f751938-257e",
"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":"1644594d2b6e-3553",
"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":"2c5e3e57ec1-2188",
"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":"7e6021ba60db-63bf",
"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":"1b8d1a5d72b4-6092",
"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'
-H 'Content-Type: application/json'
-d '{"id":"7efd58dc1766-7ef6","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":"23f3dae3df1-1071","geoFences":["geoFences_1","geoFences_2","geoFences_3"],"parent":"References to a place containing the place","tags":["tags_1","tags_2","tags_3"],"children":[{"id":"53cb5f751938-257e","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":"1644594d2b6e-3553","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}
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.