A new API for Time Attendance has been added with BioStar 2.8.13.
Just like BioStar 2 New Local API there’s no need to install anything for the TA API. You can just install or upgrade to BioStar 2.8.13 to use TA API.
How to access TA API Swagger
The way to access the Swagger of the new API is a bit different than of the New Local API. Please refer to the instructions below.
- [BioStar 2 address] + ':’ + (your TNA https port) + ‘/docs/#'
eg,) BioStar 2 address> https://192.168.13.36
TNA https port> 3002
New BioStar 2 API Swagger> https://192.168.13.36:3002/docs/#
- ‘localhost’ + ':’ + (your TNA https port) + ‘/docs/#'
TNA https port is usually set to ‘3002'. TA API swagger UI looks similar to the old API(v2) swagger.
Also, the way it works for logging in is the same as the old API(v2); there is no need to save cookie information.
1. How to log in
> There are 2 ways of logging in.
- [POST] /login
- [POST] /login/sso
*Login by using bs-session-id made from the New Local API’s log-in function.
*You must use the USER_ID. You can not use ‘User_Name’ for the ‘user_id’ parameter.
Once you are successfully logged in, you’ll see the logged-in user’s information in the ‘Response Body’ and ‘200’ in the ‘Response Code’.
* If you’d like to know about the New Local API’s bs-session-id, please check the link below
[BioStar 2 API] How to use and start BioStar 2 New Local API
2. Login via Postman
This is how to log in to your TA API via using Postman.
[Request Example]
[Response Example: body]
[Response Example: Headers]
*You do not need to copy and paste the ‘be-session-id’ value for other API calls. It gets set automatically.
3. Expanded available features with TA API
Now you can use API to create, retrieve, edit, delete data: Time Code, Shift, Schedule Template, Rules, Leave, Punch Log and more.