# Want to extend schedule API to four weeks

**URL:** <https://discourse.libretime.org/t/want-to-extend-schedule-api-to-four-weeks/957>\
**Category:** Dev Talk\
**Created:** [June 26, 2021, 7:11pm UTC](https://discourse.libretime.org/t/want-to-extend-schedule-api-to-four-weeks/957 "2021-06-26T19:11:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobjonkmandj](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/bobjonkmandj/32/340_2.png) [@bobjonkmandj](https://discourse.libretime.org/u/bobjonkmandj)\
**Post date:** [June 26, 2021, 7:11pm UTC](https://discourse.libretime.org/t/want-to-extend-schedule-api-to-four-weeks/957/1 "2021-06-26T19:11:03Z")

</div>

I’d like to extend the schedule API to show four weeks instead of two. I’ve grepped the source code for “week-info”, “isApiCall” and looked at various files containing “schedule” (mostly for the calendar UI), but haven’t found where the output is generated for [http://libretime.example.org/api/week-info/](http://libretime.example.org/api/week-info/) Any hints?

Thanx,  
–Bob.

Edit: Maybe this could be a configurable setting…

---

<div class="post-metadata">

**Author:** ![paddatrapper](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/paddatrapper/32/675_2.png) [@paddatrapper](https://discourse.libretime.org/u/paddatrapper)\
**Post date:** [June 26, 2021, 7:24pm UTC](https://discourse.libretime.org/t/want-to-extend-schedule-api-to-four-weeks/957/2 "2021-06-26T19:24:30Z")

</div>

You can get the schedule for any date range from [http://libretime.example.org/api/v2/schedule/?ends\_\_range=start,end](http://libretime.example.org/api/v2/schedule/?ends__range=start,end), assuming a newish version of LibreTime (last 2 months)

Where start and end are in the format `yyyy-mm-ddTHH:MM:SSZ` (Z being UTC)

---

<div class="post-metadata">

**Author:** ![paddatrapper](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/paddatrapper/32/675_2.png) [@paddatrapper](https://discourse.libretime.org/u/paddatrapper)\
**Post date:** [June 26, 2021, 7:25pm UTC](https://discourse.libretime.org/t/want-to-extend-schedule-api-to-four-weeks/957/3 "2021-06-26T19:25:21Z")

</div>

> <https://github.com/LibreTime/libretime/blob/master/python_apps/api_clients/api_clients/version2.py#L54>

---

<div class="post-metadata">

**Author:** ![bobjonkmandj](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/bobjonkmandj/32/340_2.png) [@bobjonkmandj](https://discourse.libretime.org/u/bobjonkmandj)\
**Post date:** [June 26, 2021, 7:28pm UTC](https://discourse.libretime.org/t/want-to-extend-schedule-api-to-four-weeks/957/4 "2021-06-26T19:28:22Z")

</div>

Cool! Sadly, we’re nowhere close to a recent version. But this provides incentive to upgrade!

In the meantime, I’ll continue to search through the existing codebase (from March 2020)

–Bob.

---

<div class="post-metadata">

**Author:** ![Small-Systems](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.libretime.org/small-systems/32/780_2.png) [@Small-Systems](https://discourse.libretime.org/u/Small-Systems)\
**Post date:** [January 22, 2024, 10:49am UTC](https://discourse.libretime.org/t/want-to-extend-schedule-api-to-four-weeks/957/5 "2024-01-22T10:49:11Z")

</div>

Hi, coming back to this thread for some help, if I make a post request on my airtime server to:

[https://stream.lumpenstation.art/api/v2/schedule?ends\_\_range=2024-01-22T00:00:00Z,2024-01-25T23:59:00Z](https://stream.lumpenstation.art/api/v2/schedule?ends__range=2024-01-22T00:00:00Z,2024-01-25T23:59:00Z)

The response tells me “Authentication credentials were not provided.”. By what method am I supposed to authenticate. Neither a query parameter nor basic auth with api\_key work.

Can anyone help?  
Thanks
