Update assigned locations

patch

/rest/ofscCore/v1/resources/{resourceId}/assignedLocations

This operation creates or updates the temporary locations assigned to the specified resource. The temporary locations include the 'start', 'end' and 'home zone center' locations.

Note: When the location is specified in the request, the location is assigned to the resource.

Permissions:

The permission 'core_api_resource' has to be set to 'ReadWrite' for this API to work.

Request

Path Parameters
Body ()
The temporary locations assigned to the resource.
Root Schema : Temporary Resource Locations Assigned
Type: object
Title: Temporary Resource Locations Assigned
Additional Properties Allowed
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.
Back to Top

Response

Supported Media Types

204 Response

This section describes the 204 status response for this operation. This response code indicates that the operation completed successfully.

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 update the locations assigned to a resource by submitting a PATCH request on the REST resource using cURL:

cURL command Example

curl -s -u "<CLIENT_ID>@<INSTANCE_NAME>:<CLIENT_SECRET>" --url "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/resources/default_technician/assignedLocations" -X PATCH -d '
{
"mon":{
            "start": 1,
            "end": 7,
            "homeZoneCenter": 7
            },
"2018-06-02":{
            "start": 1,
            "end": 3,
            "homeZoneCenter": 7
            },
"2018-06-03":{
            "start": 1,
            "end": 2,
            "homeZoneCenter": 7
            }
}'

Response Header Example

The following shows an example of the response header.

HTTP/1.1 204 No Content
Server: nginx/1.2.7
Date: Mon, 18 Dec 2017 02:20:33 GMT
Content-Type: application/json; charset=utf-8
Back to Top