Set a resource work zone
post
/rest/ofscCore/v1/resources/{resourceId}/workZones
This operation assigns a work zone to the specified resource.
Request
Path Parameters
-
resourceId(required): string
The unique identifier of the resource in Oracle Field Service.
Root Schema : Work Zone
Type:
object
Title:
Show Source
Work Zone
-
endDate:
string
Title:
End Date
The date until when the work zone assignment is effective. Specify the date in 'YYYY-MM-DD' format. -
ratio:
integer
Title:
Ratio
Minimum Value:1
Maximum Value:100
The work zone ratio of the resource. The default value is 100. -
recurEvery:
integer
Title:
Recur Every
Minimum Value:1
Maximum Value:10000
The time between each recurrence of the work zone assignment. Depending on the value selected for 'recurrence', the value of the parameter indicates the time between recurrence in days or weeks. For example, if '4' is the value of this parameter, and the 'recurrence' is 'daily', it indicates that the time between each recurrence is four days. -
recurrence:
string
Title:
Recurrence
Allowed Values:[ "weekly", "daily" ]
The value of this parameter along with the 'Recur Every' parameter defines the time between each recurrence of the work zone assignment. For example, if you specify 'daily' as the value of this parameter and '4' as the value of the 'recurEvery' parameter, then the time between each recurrence is four days. -
startDate(required):
string
Title:
Start Date
The date when the work zone assignment takes effect. Specify the date in 'YYYY-MM-DD' format. -
type:
string
Title:
Type
Allowed Values:[ "regular", "override" ]
The type of the work zone assignment. -
weekdays:
array Weekdays
Title:
Weekdays
Unique Items Required:true
The weekdays on which the work zone is assigned to the resources. This parameter is mandatory when the recurrence is weekly. -
workZone(required):
string
Title:
Work Zone Label
Maximum Length:255
The identifier of the work zone. -
workZoneItemId:
integer
Title:
Work Zone Item ID
The identifier of the work zone assignment.
Nested Schema : Weekdays
Type:
array
Title:
Weekdays
Unique Items Required:
true
The weekdays on which the work zone is assigned to the resources. This parameter is mandatory when the recurrence is weekly.
Show Source
-
Array of:
string
Allowed Values:
[ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ]
Response
Supported Media Types
- application/json
204 Response
This section describes the 204 status response for this operation.
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 set work zones for a resource by submitting a POST request on the REST resource.
Example of Request Header
The following shows an example of the request header.
POST /rest/ofscCore/v1/resources/resource_work_zones/workZones HTTP/1.0
Example of Request Body
The following example shows the contents of the request body in JSON format.
{ "workZone": "GENEVA", "startDate": "2015-09-16", "endDate": "2015-09-18", "ratio": 100, "weekdays": [ "Tue", "Sat" ], "recurEvery": 1, "recurrence": "weekly" }
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 204 No Content