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:

  1. Bulk replace 1000 zones in a single request.
  2. 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

Body ()
The collection of work zones.
Root Schema : workZones
Type: object
The collection of work zones.
Show Source
Nested Schema : items
Type: array
An array of work zone items.
Show Source
Nested Schema : Work Zone
Type: object
Title: Work Zone
Show Source
Nested Schema : Keys
Type: array
Title: Keys
Show Source
Nested Schema : Shapes
Type: array
Title: Shapes
Show Source
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. This operation does not return elements in the response body.

Default Response

This section describes the default error response for this operation.
Body ()
Root Schema : Error
Type: object
Error response
Show Source
Back to Top

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
Back to Top