Hello Babynus,
I probably missed a point on the way I'm using the API or the tool itself, but I'm still not able to have the off-days of a 80% work week.
So I will try to show what are the steps I've used
First I'm taking the "CalendarDefinition" as below:
$fullUrl="https://url/api/CalendarDefinition/all";
$curl = curl_init($fullUrl);
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $user);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$curl_response = curl_exec($curl);
echo $curl_response;
curl_close($curl);
With the following result:
{"identifier":"id", "items":[{"id":"1", "name":"default", "idle":"0"},
{"id":"2", "name":"CH - Part-time 80% - No Wednesday", "idle":"0"},
{"id":"3", "name":"CH", "idle":"0"},
{"id":"4", "name":"Belgique", "idle":"0"},
{"id":"5", "name":"Italy", "idle":"0"}] }
After that I'm taking the data from the calendar 2 - the one that has a 80% week working time.
So on the code above I'm using the following url
$fullUrl="https://url/api/Calendar/search/idCalendarDefinition=2/calendarDate>='2022-01-01'";
And the result is :
{"identifier":"id", "items":[{"id":"386", "name":"Jour de l'an", "idCalendarDefinition":"2", "nameCalendarDefinition":"Bern - Part-time 80% - No Wednesday", "calendarDate":"2022-01-01", "isOffDay":"1"},
{"id":"387", "name":"Christmas", "idCalendarDefinition":"2", "nameCalendarDefinition":"Bern - Part-time 80% - No Wednesday", "calendarDate":"2022-12-25", "isOffDay":"1"},
{"id":"388", "name":"Saint Berchtold", "idCalendarDefinition":"2", "nameCalendarDefinition":"Bern - Part-time 80% - No Wednesday", "calendarDate":"2022-01-02", "isOffDay":"1"},
{"id":"389", "name":"Easter", "idCalendarDefinition":"2", "nameCalendarDefinition":"Bern - Part-time 80% - No Wednesday", "calendarDate":"2022-04-18", "isOffDay":"1"},
{"id":"390", "name":"Ascension", "idCalendarDefinition":"2", "nameCalendarDefinition":"Bern - Part-time 80% - No Wednesday", "calendarDate":"2022-05-26", "isOffDay":"1"},
{"id":"391", "name":"Pentecost", "idCalendarDefinition":"2", "nameCalendarDefinition":"Bern - Part-time 80% - No Wednesday", "calendarDate":"2022-06-06", "isOffDay":"1"},
{"id":"392", "name":"Swiss Federal", "idCalendarDefinition":"2", "nameCalendarDefinition":"Bern - Part-time 80% - No Wednesday", "calendarDate":"2022-08-01", "isOffDay":"1"},
{"id":"393", "name":"Saint Etienne", "idCalendarDefinition":"2", "nameCalendarDefinition":"Bern - Part-time 80% - No Wednesday", "calendarDate":"2022-12-26", "isOffDay":"1"},
{"id":"394", "name":"Holy Friday", "idCalendarDefinition":"2", "nameCalendarDefinition":"Bern - Part-time 80% - No Wednesday", "calendarDate":"2022-04-02", "isOffDay":"1"}] }
This corresponds to the same dates as the calendar 3, so no Wednesday are present on the list.
On the tool - calendar definition part - the Wednesday is indicated as day-off (see picture)
Could you please let me know what is the code needed or what I should do on the tool for having the Wednesday off days indicated through the API?
Thank you,