Get a calendar

get

/rest/ofscCore/v1/resources/{resourceId}/workSchedules/calendarView

This operation retrieves the work schedule assigned to the specified resource for the specified duration. Use this operation to render the resource's work schedule on a calendar view control, such as a monthly view or a weekly view.

Work schedules represent a resource's work calendar, which includes working hours, working and non-working days, reasons for absence, and so on.

Note: Work schedules configured for parent resources are retrieved only if Oracle Field Service Cloud supports them.

Request

Supported Media Types
Path Parameters
Query Parameters
  • The date from which the work schedule is retrieved. Specify the date in YYYY-MM-DD format.
  • The date till when the work schedule is retrieved. Specify the date in YYYY-MM-DD format.
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : Work Schedules Calendar View
Type: object
Title: Work Schedules Calendar View
Additional Properties Allowed
Show Source
  • calendarViewItem
    An object containing one calendar item. This calendar item is a data structure that contains information about the resource's work schedule.
The work schedule items of a resource in a calendar view. Each property name is date in 'YYYY-MM-DD' form.
Show Source
Nested Schema : calendarViewItem
Type: object
An object containing one calendar item. This calendar item is a data structure that contains information about the resource's work schedule.
Show Source
  • Title: Comments
    The description of the work schedule item in Oracle Field Service Cloud.
  • Title: Non-working Reason
    The reason for the non-working day (for example, holiday, vacation). These reasons are preconfigured in the Oracle Field Service Cloud UI.
  • Title: Points
    The units of labor per day when this schedule is in effect. This property may be empty because all the customers may not use it.
  • Title: Record Type
    Allowed Values: [ "schedule", "shift", "extra_shift", "working", "extra_working", "non-working", "error" ]
    The type of the work schedule item. The value 'error' is returned if the resource calendar is misconfigured for the particular date.
  • Title: Work Schedule Label
    A work schedule previously set up on Oracle Field Service Cloud UI. This property is only available if recordType= 'schedule'.
  • Title: Work Shift Label
    A work shift previously set up on Oracle Field Service Cloud UI. This property is only available if recordType is either 'shift' or 'extra_shift'.
  • Title: Work Time End
    The end time of a work day when this work schedule is in effect. The format is HH:MM. This property is not available if recordType='non-working'.
  • Title: Work Time Start
    The start time of a work day when this work schedule is in effect. The format is HH:MM. This property is not available if recordType='non-working'.

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 a calendar view by submitting a GET request on the REST resource using cURL.

curl -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' \
     -H 'Accept: application/json' \
     'https://<instance_name>.etadirect.com/rest/ofscCore/v1/resources/testResourceWorkScheFKTGUCHIOM/workSchedules/calendarView?dateFrom=2016-03-18&dateTo=2016-03-18'

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: nginx/1.2.7
Date: Fri, 18 Mar 2016 02:25:42 GMT
Content-Type: application/json; charset=utf-8
Connection: close

Example of Response Body

The following example shows the contents of the response body in JSON format.

{
    "2016-03-18": {
        "regular": {
            "recordType": "working",
            "workTimeStart": "08:00",
            "workTimeEnd": "17:00",
            "points": 100
        }
    },
    "links": [
        {
            "rel": "canonical",
            "href": "https://<instance_name>.etadirect.com/rest/ofscCore//v1/resources/workSchedules/calendarView?dateFrom=2016-03-18&dateTo=2016-03-18"
        },
        {
            "rel": "describedby",
            "href": "https://<instance_name>.etadirect.com/rest/ofscCore//v1/metadata-catalog/resources"
        }
    ]
}
Back to Top