Get Specified Time Event
Return a specific time event object for the specified tenant.
Command
GET https://{server}/api/v1/{tenantId}/timeEvents/{id}
Parameters
| Name | Required | Data Type | Description | Parameter Type |
|---|---|---|---|---|
| tenantId | Yes | String | Unique identifier of the tenant. | Path |
| id | Yes | String | Unique identifier of the time event. | Path |
Responses
Status and Error Codes
Successful Response Body
| Field | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| hostId | The identifier of the host instance that is returning the request. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| status |
The status of the request. Valid values:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| content |
Returns an array of records.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| messages | If the status is SUCCESS, this field is always blank. If the status is ERROR, a validation error occurred. For example, the time event ID in the URL is invalid. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| count | The number of records returned. |
Examples
| Sample API Call |
|---|
GET http://company.com/api/v1/pX3459712f8/timeEvents/z20051220374253690192cca X-Application-Key: 30b5f27a684744116537882dda0e50efb8c5a6e26a7b7ad2f3fcb2c24436a840 Content-Type: application/json Authorization: Bearer eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHB= |
Successful Responses
| Response Body Sample |
|---|
{
"hostId": "1c0a7eab876a94ed104627933178f064",
"status": "SUCCESS",
"perfs": {
"count": 1,
"duration": 53,
"sqlDuration": 23,
"sqlCount": 12,
"ruleDuration": 0,
"ruleCount": 0,
"methodCount": 0,
"methodDuration": 0,
"sqlPerfs": null,
"methodPerfs": null,
"duplicates": null
},
"content": {
"timeEventId": "z210125193615255885660bf",
"timestampType": "STOP",
"timestamp": "2020-06-04 16:45:00.000 +0000",
"timeRecordId": "z210125193616617887330bf",
"timeEventChunkId": "z210125181919519751250bf.DAILY.2020-06-04+0000",
"rawTimeEventId": null,
"sourceId": "TPS",
"status": "PAIRED",
"statusDetail": [],
"syntheticFlag": false,
"parentTimeEventId": null,
"timeType": null,
"template": "TE_TO_TB_BusinessRules_No_Default_Mandatory",
"type": "CLOCK_OUT",
"personId": "z210125181919519751250bf",
"attributes": {
"WorkSchedule": "workSchedule[workScheduleId eq 'z21100117235568525021105'].",
"CorporateCalendar": "corporateCalendar[corporateCalendarId eq 'z21100117235582624017850']."
},
"rawTimestamp": "2020-06-04 16:45:00.000 +0000",
"createdTime": "2020-06-04 16:46:15.383 +0000",
"lastModifiedTime": "2020-06-04 16:46:17.240 +0000",
"createdBy": "z20030311085894036443d2d",
"lastModifiedBy": "synthetic-person-object",
"resourceDetailId": "z21101521380050230939008",
"chunkStatus": "OK"
},
"messages": [],
"count": 1
} |
Error Responses
| Response Body Sample Error - Invalid Time Event ID in URL |
|---|
{
"hostId": "a5101d932c370bf3e36da6b7bafb0aab",
"status": "ERROR",
"content": null,
"messages": [
{
"type": "ERROR",
"message": "Failed to Load Resource of Type TimeEvent with Arguments [z20040717473911feg075486154]",
"code": "error.resourceNotFound",
"arguments": {
"type": "TimeEvent",
"id": "z20040717473911feg075486154"
},
"key": "TimeEvent"
}
],
"count": -1
} |