Replace a work zone
/rest/ofscMetadata/v1/workZones/{label}
This operation updates the specified work zone with the attributes provided in the request. If the specified work zone already contains attributes, this operation replaces them with the values specified in the request.
The following criteria applies while replacing a work zone:
- Fields must not have any blank spaces at the end, for example 'a '. All white spaces are ignored.
- Values in the keys arrays must be unique.
- Same key may be present only once across all the active work zones (inactive work zones are ignored).
- Values in the shapes arrays must be unique.
- Same shape may be present only once across the all active work zones (inactive work zones are ignored).
- Validation is not case sensitive, that is 'a' is the same as 'A'.
Request
-
label(required): string
Minimum Length:
1
Maximum Length:255
-
autoResolveConflicts: boolean
This parameter automatically resolves conflicts in work zone keys. If the value of this parameter is specified, then Oracle Field Service automatically removes the specified work zone keys from other active work zones. This parameter applies only if the work zone being created or updated is active.
object
Work Zone
-
keys:
array Keys
Title:
Keys
-
organization:
string
Title:
The organization label
Minimum Length:1
Maximum Length:255
-
shapes:
array Shapes
Title:
Shapes
-
status:
string
Title:
Status
Allowed Values:[ "active", "inactive" ]
-
travelArea(required):
string
Title:
Travel Area
Allowed Values:[ "sunrise_enterprise", "New" ]
-
workZoneLabel(required):
string
Title:
Work Zone Label
Minimum Length:1
Maximum Length:255
-
workZoneName(required):
string
Title:
Work Zone Name
Minimum Length:1
Maximum Length:255
array
Keys
-
Array of:
string
Minimum Length:
1
Maximum Length:50
array
Shapes
-
Array of:
string
Minimum Length:
1
Maximum Length:50
Response
- application/schema+json
- application/json
204 Response
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 replace a work zone by submitting a PUT request on the REST resource.
Example of Request Header
The following shows an example of the request header.
PUT /rest/ofscMetadata/v1/workZones/LVIV
Example of Request Body
The following example shows the contents of the request body in JSON format.
{ "workZoneLabel": "LVIV", "workZoneName": "LVIV CITY", "status": "active", "travelArea": "sunrise_enterprise", "keys": [ "LVIV" ], "shapes": [ "13549", "13570", "13571" ] }
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 Ok
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "workZoneLabel": "LVIV", "workZoneName": "LVIV CITY", "status": "active", "travelArea": "sunrise_enterprise", "keys": [ "LVIV" ], "shapes": [ "13549", "13570", "13571" ], "links": [ { "rel": "canonical", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/workZones/LVIV" }, { "rel": "describedby", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/workZones" } ] }