This article will guide you through creating a new TA schedule via BioStar 2 TA API. 


In order to create a schedule via BioStar 2 TA API, you need to call the following API: 


POST            /schedules/schedule/create 


[Body Parameters]

ParametersTypeRequiredDescription
nameString
Yname of schedule
descriptionStringYdescription of schedule
rule
Nrule to be added to schedule
:idString
Nid of rule
:nameString
Nname of rule 
start_datetimeStringYschedule START datetime in UTC using ISO-8601 format
ex: 2024-01-01T00:00:00.000Z
or 2024-01-01 (Time will be set to 00:00:00)
end_datetimeStringYschedule END datetime in UTC using ISO-8601 format
ex: 2024-01-01T00:00:00.000Z
or 2024-01-01 (Time will be set to 23:59:59) 
holiday_listArrayNlist of holiday_list to be added to schedule
:nameStringNname of holiday_list
:idStringNid of holiday_list
schedule_template:idStringYid of schedule_template to be added to schedule
user_listArrayYlist of users to be added to schedule
:idStringYid of user



[Postman Example of Request Body]

This example only includes the mandatory fields.


[Postman Example of Response]

After running the API successfully, you'll receive a 201 (Created) HTTP status code and a response body with the new schedule's ID. 


You can also check the results of running the API on the BioStar 2 Web UI.