A new API for Time Attendance has been added with BioStar 2.8.13.
For ‘How to use TA API swagger’, please refer to the link below:
[BioStar 2 TA API] How to use and start BioStar 2 TA API
How to Search for Punch Logs
BioStar 2 TA punch logs can be searched by using TA API.
You can search for your logs and click on them to add/edit punch logs.
Let’s find out how to search for the modified punch logs as seen in the above screenshot..
You can find the /tna/punch_logs/modified API in your TA Swagger.
Part 1. Search for the Punch Logs
[POST]: /tna/punch_logs/modified
[Parameters]
Name | Type | *M/O | Explanation | Value |
Date | String | M | Date of the log that holds the punch logs | YYYY-MM-DD |
Day_start_time | Long | M | Day start time used for searching punch logs in minutes using 24 hour clock | Ex. ‘60’, ‘480’ |
Retrieve_only_modified | Boolean | O | Indicates if only modified records should be retrieved |
|
User_id | String | M | User ID of the logs |
|
* M – Mandatory, O – Optional
[Example Value/Parameters Model]
{ "date": "2022-04-06", "day_start_time": 0, "retrieve_only_modified": true, "user_id": "1" } |
[Response: successful]
{ "message": "Processed Successfully", "message_key": "SUCCESSFUL", "language": "en", "status_code": "SUCCESSFUL", "total": 3, "records": [ { "modified_log": { "id": 7, "device_datetime": "2022-04-06 08:00:00", "type": "PUNCH_TYPE_CHECK_IN", "user": { "user_id": "1", "name": "Administrator" }, "device_datetime_format_string": "2022/04/06 08:00:00" }, "device_datetime": "2022-04-05T23:00:00.000Z", "device_datetime_long": 1649199600000, "type": "PUNCH_TYPE_CHECK_IN", "modified_by_user": { "user_id": "1", "name": "Administrator" } }, { "modified_log": { "id": 9, "device_datetime": "2022-04-06 12:00:00", "type": "PUNCH_TYPE_BREAK_START", "user": { "user_id": "1", "name": "Administrator" }, "device_datetime_format_string": "2022/04/06 12:00:00" }, "device_datetime": "2022-04-06T03:00:00.000Z", "device_datetime_long": 1649214000000, "type": "PUNCH_TYPE_BREAK_START", "modified_by_user": { "user_id": "1", "name": "Administrator" } }, { "modified_log": { "id": 8, "device_datetime": "2022-04-06 17:00:00", "type": "PUNCH_TYPE_CHECK_OUT", "user": { "user_id": "1", "name": "Administrator" }, "device_datetime_format_string": "2022/04/06 17:00:00" }, "device_datetime": "2022-04-06T08:00:00.000Z", "device_datetime_long": 1649232000000, "type": "PUNCH_TYPE_CHECK_OUT", "modified_by_user": { "user_id": "1", "name": "Administrator" } } ] } |
The above response represents the results same as the screenshot below.
Part 2. Search for Punch Logs via POSTMAN