Get resource 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
Query Parameters
  • The work zones, which are active starting from the specified date, are retrieved in the response. Specify the date in YYYY-MM-DD format.
  • The work zones, which are active starting from the date in the dateFrom parameter till the specified date, are retrieved in the response. Specify the date in YYYY-MM-DD format. If you specify the dateTo parameter, then you must also specify the dateFrom parameter.
  • Indicates if the records related to inactive work zones should be returned in the response.

    If onlyActiveWorkZones=true parameter is specified, the resource work zone assignments related to inactive work zones will be skipped.

    Default Value: false
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
  • Items
    Title: Items
    An array of objects containing the details of the work zones assigned to the resource.
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.
  • Title: Work zone status
    Allowed Values: [ "active", "inactive" ]
    Status of the work zone. Note that this is not a status of this workzone assignment to a resource. To modify this parameter use "Work Zones" functions in Metadata API.
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
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.

cURL command Example

curl -X GET \
  https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/resources/SUNRISE/workZones'\
  -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' \
  -H 'content-type: application/json' \

Response Header Example

HTTP/1.1 200 OK Server: nginx/1.2.7 Date: Mon, Wed, 02 Jun 2021 11:53:49 GMT Content-Type: application/json; charset=utf-8

Response Body Example

{
    "items": [
        {
            "workZoneItemId": 11,
            "workZoneStatus": "active",
            "workZone": "ALTAMONTE SPRINGS",
            "startDate": "2008-03-27",
            "ratio": 100,
            "recurrence": "none",
            "recurEvery": 0,
            "type": "regular"
        },
        {
            "workZoneItemId": 12,
            "workZoneStatus": "active",
            "workZone": "CASSELBERRY",
            "startDate": "2008-03-27",
            "ratio": 100,
            "recurrence": "none",
            "recurEvery": 0,
            "type": "regular"
        },
        {
            "workZoneItemId": 13,
            "workZoneStatus": "active",
            "workZone": "CHULUOTA",
            "startDate": "2008-03-27",
            "ratio": 100,
            "recurrence": "none",
            "recurEvery": 0,
            "type": "regular"
        }
    ],
    "totalResults": 3,
    "links": [
        {
            "rel": "canonical",
            "href": "https:// <instance_name>.fs.ocs.oraclecloud.com /rest/ofscCore/v1/resources/SUNRISE/workZones"
        },
        {
            "rel": "describedby",
            "href": "https:// <instance_name>.fs.ocs.oraclecloud.com/rest/ofscCore/v1/metadata-catalog/resources"
        }
    ]
}

Back to Top