Get time slots

get

/rest/ofscMetadata/v1/timeSlots

This operation retrieves a collection of time slots.

Configuration: You must grant permissions to the Core API and must at least set Read-Only access to the timeslots entity in the Configuration, Applications (API permissions) screen.

Request

Query Parameters
  • The number of time slot records to be returned in the response. The minimum value that can be specified is 1 and the maximum value that can be specified is 100. If the specified value is greater than 100, zero, or if no value is specified, then it defaults to 100.
  • The record number from which the retrieval starts. The default value is zero. If no value is specified, then it defaults to zero. The value zero indicates that the retrieval will start from the beginning of the collection.
Back to Top

Response

Supported Media Types

200 Response

This section describes the 200 status response for this operation.
Body ()
Root Schema : TimeSlots
Type: object
The collection of time slots. It is not returned for an empty collection.
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : Time Slot
Type: object
Title: Time Slot
Show Source
  • Title: Active

    Contains one of the following values: true or false.

    If true, then the time slot is listed as an option in the Time slot drop-down list in the Oracle Field Service Cloud (OFSC) application. If false, then the time slot is not listed as an option in the drop-down list. The default value is true.

  • Title: Is All Day
    Contains one of the following values: true or false. If true, then the activities with the 'allDay' time slot can be performed at any time during the day. If false, then the activities cannot be performed at any time during the day. The default value is false.
  • Title: Label
    Minimum Length: 1
    Maximum Length: 40
    The unique label assigned to the time slot.
  • Title: Name
    Minimum Length: 1
    Maximum Length: 40
    The name of the time slot. For example, 8-10.
  • Title: Time End
    The time when the time slot ends. For example, 16:00 hours.
  • Title: Time Start
    The time when the time slot starts. For example, 14:00 hours.

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 obtain a collection of resource types by using the language parameter with the GET request on the REST resource.

Use the cURL command with the following syntax:

curl -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' \
     -H 'Accept: application/json' \
     'https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/timeSlots/?limit=2&offset=2'

Response Header Example

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 24 Jan 2018 12:28:18 GMT
Content-Type: application/json; charset=utf-8
Connection: close

Response Body Example

The following shows an example of the response body in JSON format:

{
    "hasMore": true,
    "totalResults": 10,
    "limit": 2,
    "offset": 2,
    "items": [
        {
            "label": "08-10",
            "name": "08-10",
            "active": true,
            "isAllDay": false,
            "timeStart": "08:00",
            "timeEnd": "10:00",
 
            "links": [
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/metadata-catalog/timeSlots"
                }
            ]
        },
        {
            "label": "all-day",
            "name": "All-Day",
            "active": true,
            "isAllDay": true,
            "links": [
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/metadata-catalog/timeSlots"
                }
            ]
        }
    ],
    "links": [
        {
            "rel": "canonical",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/timeSlots/?limit=2&offset=2"
        },
        {
            "rel": "prev",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/timeSlots/?limit=2&offset=0"
        },
        {
            "rel": "next",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/timeSlots/?limit=2&offset=4"
        },
        {
            "rel": "describedby",
            "href": "https://<instance_name>.etadirect.com/rest/ofscMetadata/v1/metadata-catalog/timeSlots"
        }
    ]
}
Back to Top