Get assigned locations

get

/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

Path Parameters
Query Parameters
  • The date from which the locations are assigned to the resource. Specify the date in 'YYYY-MM-DD' format.
  • The date till when the locations are assigned to the resource. Specify the date in 'YYYY-MM-DD' format.
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : Assigned Resource Locations
Type: object
Title: Assigned Resource Locations
The locations assigned to the resource for a week.
Show Source
Nested Schema : Resource Locations Assigned for a Day
Type: object
Title: Resource Locations Assigned for a Day
The locations assigned to the resource for this weekday.
Show Source
  • Title: End Location ID
    The identifier of the end location for this weekday.
  • Title: Home Zone Center Location ID
    The identifier of the home zone center location for this weekday.
  • Title: Start Location ID
    The identifier of the start location for this weekday.

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Show Source
Back to Top

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"
            }
        ]
 }
Back to Top