GetTimeOff
Returns a time off request, including its current status and validation results.
Request Syntax
GET /scheduling/instances/InstanceId/users/UserId/timeoffs/TimeOffId HTTP/1.1
URI Request Parameters
The request uses the following URI parameters.
- InstanceId
-
The identifier of the Connect Customer instance. This can be the ID or the ARN of the instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
Length Constraints: Minimum length of 1. Maximum length of 250.
Pattern:
(arn:(aws|aws-us-gov):connect:[a-z]{2}(-[a-z]+){1,2}-[0-9]{1}:[0-9]{1,20}:instance/)?[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}Required: Yes
- TimeOffId
-
The identifier of the time off request. If the time off request doesn't belong to
UserId, the operation returnsResourceNotFoundException.Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[a-z0-9-]+Required: Yes
- UserId
-
The identifier of the user who the time off request belongs to. This can be the ID or the ARN of the user.
Length Constraints: Minimum length of 1. Maximum length of 255.
Required: Yes
Request Body
The request does not have a request body.
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"CreatedAt": number,
"CreatedBy": { ... },
"Description": "string",
"EndAt": number,
"ShiftActivityId": "string",
"StartAt": number,
"Status": "string",
"TimeOffId": "string",
"UpdatedAt": number,
"UpdatedBy": { ... },
"UserId": "string",
"ValidationResults": [
{
"Code": "string",
"Severity": "string"
}
]
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- CreatedAt
-
The timestamp when the time off request was created.
Type: Timestamp
- CreatedBy
-
The identity that created the request. Immutable for the life of the request.
Type: ActorInfo object
Note: This object is a Union. Only one member of this object can be specified or returned.
- Description
-
The description of the time off request.
CreateTimeOffsets it, andCancelTimeOffreplaces or removes it. An edit in the Connect Customer admin website can also change it.GetTimeOffdoesn't return descriptions sent withApproveTimeOfforRejectTimeOff.Type: String
Length Constraints: Minimum length of 1. Maximum length of 500.
- EndAt
-
The end of the time off window, exclusive, as sent to
CreateTimeOff.Type: Timestamp
- ShiftActivityId
-
The identifier of the shift activity for the time off request.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
- StartAt
-
The start of the time off window, inclusive, as sent to
CreateTimeOff.Type: Timestamp
- Status
-
The status of the time off request.
-
PENDING: Connect Customer is processing a change to the request, which then changes to another status. An edit in the Connect Customer admin website can also make a requestPENDING, so anAPPROVEDrequest can becomePENDINGand then endAPPROVEDorREJECTED. -
AWAITING_APPROVAL: the request is waiting for anApproveTimeOfforRejectTimeOffcall.
Type: String
Valid Values:
PENDING | APPROVED | REJECTED | CANCELLED | AWAITING_APPROVAL -
- TimeOffId
-
The identifier of the time off request.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[a-z0-9-]+ - UpdatedAt
-
The timestamp when the time off request was last modified.
Type: Timestamp
- UpdatedBy
-
The identity that made the most recent
ApproveTimeOff,RejectTimeOff, orCancelTimeOffcall on the request, or took the same action in the Connect Customer admin website. Absent until one of those actions is taken, including after Connect Customer decides anAUTOMATICrequest.UpdatedAtalso changes when aPENDINGrequest changes to another status and for other edits, which don't setUpdatedBy.Type: ActorInfo object
Note: This object is a Union. Only one member of this object can be specified or returned.
- UserId
-
The identifier of the user the time off is for.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 255.
- ValidationResults
-
Warnings or failures produced while processing the time off request.
Type: Array of TimeOffValidationResult objects
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AccessDeniedException
-
You do not have sufficient permissions to perform this action.
HTTP Status Code: 403
- InternalServerException
-
The request processing failed because of an error or failure with the service.
- RetryAfterSeconds
-
The number of seconds to wait before retrying.
HTTP Status Code: 500
- ResourceNotFoundException
-
The specified resource was not found.
- ResourceId
-
The identifier or ARN of the resource that was not found.
- ResourceType
-
The type of the resource that was not found.
HTTP Status Code: 404
- ThrottlingException
-
The request was denied due to request throttling.
- QuotaCode
-
The code of the quota that was throttled, for use with the Service Quotas API.
- RetryAfterSeconds
-
The number of seconds to wait before retrying.
- ServiceCode
-
The code of the service that owns the quota.
HTTP Status Code: 429
- ValidationException
-
The input fails to satisfy the constraints specified by an AWS service.
- FieldList
-
The specific input fields that failed validation, when
ReasonisFIELD_VALIDATION_FAILED. - Reason
-
The reason the input failed validation. Branch on this value rather than on the message wording.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: