Bulk replace work zones
put
/rest/ofscMetadata/v1/workZones
This operation replaces the entire collection of work zones in a single request. All conflicts are auto-resolved, and all the existing work zones that are not present in the request are deactivated.
The operation could be time-consuming, so do not send more than 1000 work zones, 10000 keys and shapes in a single request. If the work zone collection is too large for a single request, then replace the collection in several requests as follows:
- Bulk replace 1000 zones in a single request.
- Bulk update the next 1000 zones, and so on.
The following are the limitations for a request:
- The request can contain a maximum of 2000 work zones.
- The request can contain a maximum of 20000 keys and shapes.
- The request size must not exceed 2 MiB.
Request
The collection of work zones.
Root Schema : workZones
Type:
object
The collection of work zones.
Show Source
-
items:
array items
An array of work zone items.
-
totalResults:
integer
The total number of work zones retrieved.
Nested Schema : items
Type:
array
An array of work zone items.
Show Source
-
Array of:
object Work Zone
Title:
Work Zone
Nested Schema : Work Zone
Type:
object
Title:
Show Source
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
Nested Schema : Keys
Type:
array
Title:
Show Source
Keys
-
Array of:
string
Minimum Length:
1
Maximum Length:50
Nested Schema : Shapes
Type:
array
Title:
Show Source
Shapes
-
Array of:
string
Minimum Length:
1
Maximum Length:50
Response
Supported Media Types
- application/json
- application/schema+json
204 Response
This section describes the 204 status response for this operation. This response code indicates that the operation completed successfully. This operation does not return elements in the response body.
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 replace work zones in bulk by submitting a PUT request on the REST resource using cURL.
curl -X 'PUT' \ -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' \ -H 'Content-Type: application/json' \ --data-binary '{ "items": [ { "workZoneLabel": "SANFORD", "workZoneName": "SANFORD", "status": "active", "travelArea": "company_area", "keys": [ "32771", "32772", "32773" ], "shapes": [ "32771", "32772", "32773" ] }, { "workZoneLabel": "ALTAMONTE_SPRINGS", "workZoneName": "ALTAMONTE SPRINGS", "status": "active", "travelArea": "company_area", "keys": [ "32701" ], "shapes": [ "32701" ] }, { "workZoneLabel": "CASSELBERRY", "workZoneName": "CASSELBERRY", "status": "active", "travelArea": "company_area", "keys": [ "32707" ], "shapes": [ "32707" ] }, { "workZoneLabel": "CHULUOTA", "workZoneName": "CHULUOTA", "status": "active", "travelArea": "company_area", "keys": [ "32766" ], "shapes": [ "32766" ] }, { "workZoneLabel": "GENEVA", "workZoneName": "GENEVA", "status": "active", "travelArea": "company_area", "keys": [ "32732" ], "shapes": [ "32732" ] }, { "workZoneLabel": "HEATHROW", "workZoneName": "HEATHROW", "status": "active", "travelArea": "company_area", "keys": [ "32746" ], "shapes": [ "32746" ] }, { "workZoneLabel": "LONGWOOD", "workZoneName": "LONGWOOD", "status": "active", "travelArea": "company_area", "keys": [ "32750" ], "shapes": [ "32750" ] }, { "workZoneLabel": "OVIEDO", "workZoneName": "OVIEDO", "status": "active", "travelArea": "company_area", "keys": [ "32765" ], "shapes": [ "32765" ] }, { "workZoneLabel": "WINTER_SPRINGS", "workZoneName": "WINTER SPRINGS", "status": "active", "travelArea": "company_area", "keys": [ "32708" ], "shapes": [ "32708" ] } ] }'
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 204 No content