Get a shift
get
/rest/ofscMetadata/v1/shifts/{label}
This operation retrieves the details of the specified shift.
Request
Path Parameters
-
label(required): string
Minimum Length:
1
Maximum Length:255
The unique identifier of the shift.
Response
Supported Media Types
- application/schema+json
- application/json
200 Response
This section describes the 200 status response for this operation.
Root Schema : Shift
Type:
object
Title:
Shift
The shift object.
Show Source
-
active(required):
boolean
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.
-
decoration:
string
Title:
Type
The decoration of the shift. Mandatory for "on-call" type of shift. Possible values are ["yellow","orange","red","blue","green","purple"]. -
name(required):
string
Title:
Name
The label of the shift. -
points:
integer
Title:
Points
Points -
type(required):
string
Title:
Type
The type of the shift. Possible values are ["regular", "on-call"]. Cannot be changed for an existing shift. -
workTimeEnd(required):
string
Title:
WorkTimeStart
The workTimeEnd of the shift. Possible values are 00:00 - 23:59 -
workTimeStart(required):
string
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.
Root Schema : Error
Type:
Show Source
object
-
detail:
string
The detailed description of this error.
-
status:
string
The HTTP status code of this error.
-
title(required):
string
The brief description of this error.
-
type(required):
string
The URL of the web page containing more details about this error.
Examples
The following example shows how to get a shift 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/{label}'
Response Body Example
The following shows an example of the response body in JSON format:
{ "label": "on-call", "name": "Simple On-call Shift", "active": false, "type": "on-call", "decoration": "blue", "workTimeStart": "09:00:00", "workTimeEnd": "18:00:00", "links": [ { "rel": "canonical", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/shifts/on-call" }, { "rel": "describedby", "href": "https://<instance_name>.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/metadata-catalog/shifts" } ] }