Get All Event Types

Return a list of the event types for the specified tenant.

Command

GET https://{server}/api/v1/{tenantId}/eventTypes

Parameters

Name Required Data Type Description Parameter Type
tenantId Yes String Unique identifier of the tenant. Path
filter No String

Spring Expression Language (EL) filter. Allows you to filter by a set of records (for example: name eq 'name'). The following fields are filterable:

  • name
  • label
  • timestampType
  • activeFlag
  • createTime
  • lastModifiedTime
  • createdBy
  • lastModifiedBy

For more details on using the filter query parameter, see Filtering Guidelines.

Query
offset No String The number of items to skip before starting to collect the result set. Used with limit. Query

limit

No String

The maximum number of results to return. Used with offset. Together, they determine the start index and number of records to return. For example, to return records 5 through 15 that have been sorted by name, use the following:

eventTypes?offset=5&limit=10&orderBy=name

Query
orderBy No String Order by fields, sort order. Query
select No String Select the specific fields to be returned. Query
count No String The number of records to fetch from the database. Query
groupBy No String Categorization of results (group by a field). Query

Responses

Status and Error Codes

See Common 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:

  • SUCCESS - The operation was a success.
  • ERROR - A validation error occurred.
content

Returns the specified record.

Field Description
eventTypeId The globally unique database-level identifier of the event type.
name Name of the event.
label A label for the event type.
description Description of the event.
timestampType

Type of timestamp. Valid values:

Value Description
START The start of a time event.
STOP The end of a time event.
STOP_START A time event that marks the stop of a previous event and the start of a new one. For example, a lunch start that triggers the end of a previous start work session and the beginning of a lunch break.
tenantId The ID of the tenant.
timeType The type of activity logged. For example, CLOCK_IN or CLOCK_OUT.
createTime The date and time that the record was created.
lastModifiedTime The date and time that the record was last modified.
createBy The ID of the user who created the record.
lastModifiedBy The ID of the user who updated the record.
activeFlag Indicates whether the person status is active. Boolean true or false.
readOnly Indicates whether the event type is read-only. A read-only event type can't be edited or deleted.
messages If the status is SUCCESS, this field is always blank. If the status is ERROR, a validation error occurred. For example, the event type ID in the URL is invalid.
count The number of records returned.

Examples

Sample API Call
GET http://company.com/api/v1/pX3459712f8/eventTypes
X-Application-Key: 30b5f27a684744116537882dda0e50efb8c5a6e26a7b7ad2f3fcb2c24436a840
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHB=

Successful Responses

Response Body Sample
{
    "hostId": "f671130f9791b6733606e4c0ee2dfe30",
    "status": "SUCCESS",
    "content": [
        {
            "eventTypeId": "z20050521155188205641ecf",
            "name": "CLOCK_IN",
            "label": "Event Type Clock In",
            "description": "Clock In",
            "timestampType": "START",
            "tenantId": "pX6263b269b",
            "timeType": "Attendance",
            "createdTime": "2020-05-05 21:15:51.906 +0000",
            "lastModifiedTime": null,
            "createdBy": "z201014193557239430553b2",
            "lastModifiedBy": null,
            "activeFlag": true,
            "readOnly": false
        },
        {
            "eventTypeId": "z20050521191666705811ecf",
            "name": "CLOCK_OUT",
            "label": "Event Type Clock Out",
            "description": "Clock Out",
            "timestampType": "STOP",
            "tenantId": "pX6263b269b",
            "timeType": "Attendance",
            "createdTime": "2020-05-05 21:19:16.707 +0000",
            "lastModifiedTime": null,
            "createdBy": "z201014193557239430553b2",
            "lastModifiedBy": null,
            "activeFlag": true,
            "readOnly": false
        },
        {
            "eventTypeId": "z20050521212953805943ecf",
            "name": "START_BREAK",
            "label": "Event Type Start Break",
            "description": "Start Break",
            "timestampType": "START",
            "tenantId": "pX6263b269b",
            "timeType": "Break",
            "createdTime": "2020-05-05 21:21:29.543 +0000",
            "lastModifiedTime": null,
            "createdBy": "z201014193557508431263b2",
            "lastModifiedBy": null,
            "activeFlag": true,
            "readOnly": false
        },
        {
            "eventTypeId": "z20050521215071606005ecf",
            "name": "END_BREAK",
            "label": "Event Type End Break",
            "description": "End Break",
            "timestampType": "STOP",
            "tenantId": "pX6263b269b",
            "timeType": "Break",
            "createdTime": "2020-05-05 21:21:50.754 +0000",
            "lastModifiedTime": null,
            "createdBy": "z201014193557508431263b2",
            "lastModifiedBy": null,
            "activeFlag": true,
            "readOnly": false
        },
        {
            "eventTypeId": "z20050521254616306251ecf",
            "name": "START_LUNCH",
            "label": "Event Type Start Lunch",
            "description": "Start Lunch",
            "timestampType": "START",
            "tenantId": "pX6263b269b",
            "timeType": "Lunch",
            "createdTime": "2020-05-05 21:25:46.169 +0000",
            "lastModifiedTime": null,
            "createdBy": "z201014193557239430553b2",
            "lastModifiedBy": null,
            "activeFlag": true,
            "readOnly": false
        },
        {
            "eventTypeId": "z20050521260353306259ecf",
            "name": "END_LUNCH",
            "label": "Event Type End Lunch",
            "description": "End Lunch",
            "timestampType": "STOP",
            "tenantId": "pX6263b269b",
            "timeType": "Lunch",
            "createdTime": "2020-05-05 21:26:03.539 +0000",
            "lastModifiedTime": null,
            "createdBy": "z201014193557239430553b2",
            "lastModifiedBy": null,
            "activeFlag": true,
            "readOnly": false
        },
        {
            "eventTypeId": "z20050521263546506321ecf",
            "name": "START_BUSINESS_TRIP",
            "label": "Event Start Business Trip",
            "description": "Start Business Trip",
            "timestampType": "START",
            "tenantId": "pX6263b269b",
            "timeType": "Customer Visit",
            "createdTime": "2020-05-05 21:26:35.470 +0000",
            "lastModifiedTime": null,
            "createdBy": "z201014193556940429813b2",
            "lastModifiedBy": null,
            "activeFlag": true,
            "readOnly": false
        },
        {
            "eventTypeId": "z20050521265323506329ecf",
            "name": "END_BUSINESS_TRIP",
            "label": "Event Type End Business Trip",
            "description": "End Business Trip",
            "timestampType": "STOP",
            "tenantId": "pX6263b269b",
            "timeType": "Customer Visit",
            "createdTime": "2020-05-05 21:26:53.240 +0000",
            "lastModifiedTime": null,
            "createdBy": "z201014193556940429813b2",
            "lastModifiedBy": null,
            "activeFlag": true,
            "readOnly": false
        }
    ],
    "messages": [],
    "count": 8
}