Get shifts

get

/rest/ofscMetadata/v1/shifts

This operation retrieves a collection of shifts along with all the information about each shift.

Request

Query Parameters
  • The number of shift 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 zero, greater than 100, 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 : Shifts
Type: object
The collection of shifts. It is not returned for an empty collection.
Show Source
  • Contains one of the following values: true or false.

    If true, then there are more results that can be retrieved with successive paging requests.

    If false or if the value is not present, then there are no more results or this is the final page. The default value is true.

  • items
  • The limit value specified in the request. If the value is not specified in the request or if the specified value is not accepted, then it defaults to 100.
  • The offset value specified in the request.
  • The total number of shift records in the collection.
Nested Schema : items
Type: array
Show Source
Nested Schema : Shift
Type: object
Title: Shift
The shift object.
Show Source
  • Title: Active
    Contains one of the following values: true or false.

    If true, then the shift is listed as a possible value in the 'shift' drop-down list in Manage or Mobility apps while creating an activity. If false, then the shift is not listed as a value in the drop-down list. The default value is true.

  • Title: Type
    The decoration of the shift. Mandatory for "on-call" type of shift. Possible values are ["yellow","orange","red","blue","green","purple"].
  • Title: Name
    The label of the shift.
  • Title: Points
    Points
  • Title: Type
    The type of the shift. Possible values are ["regular", "on-call"]. Cannot be changed for an existing shift.
  • Title: WorkTimeStart
    The workTimeEnd of the shift. Possible values are 00:00 - 23:59
  • Title: WorkTimeStart
    The workTimeStart of the shift. Possible values are 00:00 - 23:59

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

Use the cURL command with the following syntax:

curl -u '<CLIENT-ID>@<INSTANCE-NAME>:<CLIENT-SECRET>' \
     -H 'Accept: application/json' \
     'https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/shifts'

Response Body Example

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

{
    "hasMore": true,
    "totalResults": 294,
    "limit": 100,
    "offset": 0,
    "items": [
        {
            "label": "forActionsLinkMethods",
            "name": "ForAutoTest",
            "active": true,
            "type": "regular",
            "workTimeStart": "09:00:00",
            "workTimeEnd": "18:00:00",
            "links": [
                {
                    "rel": "canonical",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/shifts/forActionsLinkMethods"
                },
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/shifts"
                }
            ]
        },
        {
            "label": "AutoTestGroupActionDeleteOk",
            "name": "AutoTestGroupActionDeleteOk",
            "active": true,
            "type": "regular",
            "workTimeStart": "09:00:00",
            "workTimeEnd": "18:00:00",
            "links": [
                {
                    "rel": "canonical",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/shifts/AutoTestGroupActionDeleteOk"
                },
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/shifts"
                }
            ]
        },
        {
            "label": "AutoTestGroupActionDeleteCancel",
            "name": "AutoTestGroupActionDeleteCancel",
            "active": true,
            "type": "regular",
            "workTimeStart": "09:00:00",
            "workTimeEnd": "18:00:00",
            "links": [
                {
                    "rel": "canonical",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/shifts/AutoTestGroupActionDeleteCancel"
                },
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/shifts"
                }
            ]
        },
        {
            "label": "AutoTestActionActivities",
            "name": "AutoTestActionActivities",
            "active": true,
            "type": "regular",
            "workTimeStart": "09:00:00",
            "workTimeEnd": "18:00:00",
            "links": [
                {
                    "rel": "canonical",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/shifts/AutoTestActionActivities"
                },
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/shifts"
                }
            ]
        },
       
        {
            "label": "shift7608000006",
            "name": "shift7608000006",
            "active": true,
            "type": "on-call",
            "decoration": "red",
            "workTimeStart": "00:00:00",
            "workTimeEnd": "23:59:00",
            "links": [
                {
                    "rel": "canonical",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/shifts/shift7608000006"
                },
                {
                    "rel": "describedby",
                    "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/shifts"
                }
            ]
        }
    ],
    "links": [
        {
            "rel": "canonical",
            "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/shifts?limit=100&offset=0"
        },
        {
            "rel": "next",
            "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/shifts?limit=100&offset=100"
        },
        {
            "rel": "describedby",
            "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/shifts"
        }
    ]
}
Back to Top