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
-
resourceId(required): string
The external identifier of the resource.
The temporary locations assigned to the resource.
Root Schema : Temporary Resource Locations Assigned
Type:
objectTitle:
Temporary Resource Locations Assigned Additional Properties Allowed
Show Source
-
object Resource Locations Assigned for a Day
Title:
Resource Locations Assigned for a DayThe locations assigned to the resource for this weekday.
Nested Schema : Resource Locations Assigned for a Day
Type:
objectTitle:
Resource Locations Assigned for a DayThe locations assigned to the resource for this weekday.
Show Source
-
end:
integer
Title:
End Location IDThe identifier of the end location for this weekday. -
homeZoneCenter:
integer
Title:
Home Zone Center Location IDThe identifier of the home zone center location for this weekday. -
start:
integer
Title:
Start Location IDThe identifier of the start location for this weekday.
Response
Supported Media Types
- application/json
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.
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 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