Get assigned locations
/rest/ofscCore/v1/resources/{resourceId}/assignedLocations
This operation retrieves the details of the locations assigned to the specified resource. The locations include the 'start', 'end', and 'home zone center' locations.
Limitations:
The value of the DateTo parameter cannot be greater than 32 days from the value of dateFrom parameter.
Permissions:
The permission 'core_api_resource' has to be set to 'ReadWrite' for this API to work.
Request
-
resourceId(required): string
The unique identifier of the resource.
-
dateFrom: string
The date from which the locations are assigned to the resource. Specify the date in 'YYYY-MM-DD' format.
-
dateTo: string
The date till when the locations are assigned to the resource. Specify the date in 'YYYY-MM-DD' format.
Response
- application/json
200 Response
object
Assigned Resource Locations
-
fri:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
mon:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
sat:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
sun:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
thu:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
tue:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday. -
wed:
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday.
object
Resource Locations Assigned for a Day
-
end:
integer
Title:
End Location ID
The identifier of the end location for this weekday. -
homeZoneCenter:
integer
Title:
Home Zone Center Location ID
The identifier of the home zone center location for this weekday. -
start:
integer
Title:
Start Location ID
The identifier of the start location for this weekday.
Default Response
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 retrieve details of the locations assigned to a resource for the specified date range by submitting a GET request on the REST resource using cURL.
cURL command Example
The following shows an example of the request header.
curl -s -u "<CLIENT_ID>@<INSTANCE_NAME>:<CLIENT_SECRET>" --url "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/resources/default_technician/assignedLocations?dateFrom=2018-06-01,dateTo=2018-06-03" -X GET
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Server: nginx/1.6.2 Date: Fri, 24 Jul 2015 08:35:48 GMT Content-Type: application/json; charset=utf-8 Connection: close
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "mon": { "start": 1, "end": 7, "homeZoneCenter": 7 }, "sun": { "start": 1, "end": 3, "homeZoneCenter": 7 }, "2018-06-03": { "start": 1, "end": 2, "homeZoneCenter": 7 }, "2018-06-01": { "start": 1, "end": 7, "homeZoneCenter": 7 }, "2018-06-02": { "start": 1, "end": 3, "homeZoneCenter": 7 }, "2018-06-04": { "start": 1, "end": 2, "homeZoneCenter": 7 }, "links": [ { "rel": "canonical", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/resources/44035/assignedLocations" }, { "rel": "describedby", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/metadata-catalog/resources" } ] }