Get resource locations
get
/rest/ofscCore/v1/resources/{resourceId}/locations
This operation retrieves the locations created for the specified resource.
Request
Supported Media Types
- application/x-www-form-urlencoded
Path Parameters
-
resourceId(required): string
The external identifier of the resource.
Response
Supported Media Types
- application/json
200 Response
This section describes the 200 status response for this operation.
Root Schema : Resource Locations
Type:
objectTitle:
Resource LocationsThe collection of resource locations.
Show Source
-
items:
array Items
Title:
ItemsAn array of objects containing the resource location details.
Nested Schema : Items
Type:
arrayTitle:
ItemsAn array of objects containing the resource location details.
Show Source
-
Array of:
object Resource Location
Title:
Resource LocationThe schema of the response body object for this operation.
Nested Schema : Resource Location
Type:
objectTitle:
Resource LocationThe schema of the response body object for this operation.
Show Source
-
address:
string
Title:
AddressThe address of the resource. -
city:
string
Title:
CityThe city in which the address is located. -
country:
string
Title:
CountryThe country in which the address is located. -
label:
string
Title:
LabelThe unique label of the resource location. -
latitude:
number
Title:
LatitudeMinimum Value:-90Maximum Value:90The geographic coordinates of the resource location. -
locationId:
integer
Title:
Location IDThe unique identifier of the resource location. -
longitude:
number
Title:
LongitudeMinimum Value:-180Maximum Value:180The geographic coordinates of the resource location. -
postalCode:
string
Title:
Postal CodeThe postal code of the resource location. -
privateLocationFlag:
boolean
Title:
Location is privateDefault Value:falseIndicates whether the location is a resource private location. -
state:
string
Title:
StateThe state in which the address is located. -
status:
string
Title:
StatusThe status of the resource location.
Default Response
This section describes the default error response for this operation.
Root Schema : Error
Type:
Show Source
object-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.
Examples
The following example shows how to get resource route for resources by submitting a GET request on the REST resource.
Example of Request Header
The following shows an example of the request header.
GET /rest/ofscCore/v1/resources/john.smith/locations HTTP/1.0 Authorization: Basic c29hcEB5YW1hdG86MQ== Host: <instance_name>.fs.ocs.oraclecloud.com
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
Example of Response Body
The following example shows the contents of the response body in JSON format.
{
"items": [
{
"label": "testloc1",
"postalCode": "",
"city": "",
"state": "",
"address": "",
"longitude": 0,
"latitude": 0,
"country": "US",
"locationId": 32
},
{
"label": "testloc2",
"postalCode": "90007",
"city": "Los Angeles",
"state": "California",
"address": "10775 Santa Monica Boulevard",
"longitude": -100,
"latitude": 34.0151468,
"status": "manual",
"country": "US",
"locationId": 33
}
],
"totalResults": 2,
"links": [
{
"rel": "canonical",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/resources/testResourceLocationWYOITSYDDH/locations"
},
{
"rel": "describedby",
"href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/metadata-catalog/resources"
}
]
}