Get work zones

get

/rest/ofscCore/v1/resources/{resourceId}/workZones

This operation retrieves the details of the work zones assigned to the specified resource.

Request

Path Parameters
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : Work Zones
Type: object
Title: Work Zones
The list of the existing work zones.
Show Source
Nested Schema : Items
Type: array
Title: Items
An array of objects containing the details of the work zones assigned to the resource.
Show Source
Nested Schema : Work Zone
Type: object
Title: Work Zone
Show Source
  • Title: End Date
    The date until when the work zone assignment is effective. Specify the date in 'YYYY-MM-DD' format.
  • Title: Ratio
    Minimum Value: 1
    Maximum Value: 100
    The work zone ratio of the resource. The default value is 100.
  • 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.
  • 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.
  • Title: Start Date
    The date when the work zone assignment takes effect. Specify the date in 'YYYY-MM-DD' format.
  • Title: Type
    Allowed Values: [ "regular", "override" ]
    The type of the work zone assignment.
  • 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.
  • Title: Work Zone Label
    Maximum Length: 255
    The identifier of the work zone.
  • 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
  • Allowed Values: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ]

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 get work zones for a resource by submitting a GET request on the REST resource.

Example of Request Header

The following shows an example of the request header.

GET /rest/ofscCore/v1/resources/resource_work_zones/workZones HTTP/1.0

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.

{
        "items": [
            {
                "workZone": "GENEVA",
                "startDate": "2015-09-16",
                "endDate": "2015-09-18",
                "ratio": 100,
                "recurrence": "weekly",
                "recurEvery": 1,
                "type": "regular",
                "weekdays": [
                    "Tue",
                    "Sat"
                ]
            }
        ],
        "links": [
            {
                "rel": "canonical",
                "href": "https://<instance_name>.etadirect.com/rest/ofscCore/v1/resources/resource_work_zones/workZones"
            }
        ]
    }
Back to Top