Replace a work zone

put

/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

Path Parameters
Query Parameters
  • This parameter automatically resolves conflicts in work zone keys. If the value of this parameter is specified, then Oracle Field Service Cloud 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.
Body ()
The work zone object that needs to be updated.
Root 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 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>.etadirect.com/rest/ofscMetadata/v1/workZones/LVIV"
        },
        {
            "rel": "describedby",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/metadata-catalog/workZones"
        }
    ]
}
Back to Top