Retrieve a list of places
get
/assetMonitoring/clientapi/v2/places
This operation returns the list of places created for your Oracle IoT Asset Monitoring Cloud Service instance. This non-org aware REST API will be deprecated in future releases.
Request
Query Parameters
-
expand(optional): string
The list of fields to be expanded in the result. Use 'all' to expand all expandable fields in result.
-
fields(optional): string
The comma-separated list of fields to be shown in response. By default all response object fields will be present.
-
limit(optional): integer
The maximum number of entries to return to the end user.
-
offset(optional): integer
The number that the first record of results is starting from.
-
orderBy(optional): string
Ordering criteria for the returned Places list
-
q(optional): string
Query to filter Places on the server (For more information on mongoDB query parameters refer to Using mongoDB Query Syntax.)
-
since(optional): integer
The starting point of the desired time interval, in milliseconds. The default is 0.
-
totalResults(optional): boolean
The total number of results suiting the request.
-
until(optional): integer
The finishing point of the desired time interval, in milliseconds. The default is 0.
Response
Supported Media Types
- application/json
- application/vnd.oracle.resource+json;type=collection
200 Response
Successfully processed.
Root Schema : PlaceImpl_receive_list
Type:
Show Source
object
-
count:
integer(int32)
-
hasMore:
boolean
-
items:
array items
-
limit:
integer(int32)
-
links:
array links
The set of API navigation links.
-
offset:
integer(int32)
Nested Schema : items
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
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
401 Response
Unauthorized. The request requires user authentication.
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.
Examples
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/assetMonitoring/clientapi/v2/places
Example of Response Body
The following example shows the content of the response body in JSON format:
{
"items":[
{
"id":"76b867b46698-1424",
"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":"28ac1f0b1ad7-70e2",
"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":"66414c415447-4916",
"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"
}
}
},
{
"id":"576065e163ee-14a",
"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":"5f367a0416f7-510d",
"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":"45bc27d965e3-1408",
"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"
}
}
}
],
"links":[
{
"rel":"self",
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path"
},
{
"rel":"canonical",
"href":"https://iotserver/assetMonitoring/clientapi/version/resource/path"
}
],
"count":2,
"limit":10,
"offset":0,
"hasMore":false
}
Complete cURL Example
The following example shows a complete cURL command that you can use to perform the described operation:
curl -X GET
-u <username>:<password>
-H 'Accept: application/json'
https://iotserver/assetMonitoring/clientapi/v2/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.