# API request help

**URL:** <https://community.vikunja.io/t/api-request-help/2961>\
**Category:** Support\
**Created:** [31 October 2024 12:15 UTC](https://community.vikunja.io/t/api-request-help/2961 "2024-10-31T12:15:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![oskharrr](https://community.vikunja.io/user_avatar/community.vikunja.io/oskharrr/32/1724_2.png) [@oskharrr](https://community.vikunja.io/u/oskharrr)\
**Post date:** [31 October 2024 12:15 UTC](https://community.vikunja.io/t/api-request-help/2961/1 "2024-10-31T12:15:46Z")

</div>

Hi together,  
i am trying to build an api request to get all tasks which have a duedate and which arent done…

The “done-part” is working like this:

[https://server/api/v1/tasks/all?filter=done%20%3D%20false](https://server/api/v1/tasks/all?filter=done%20%3D%20false)

But i cant get the filter of the duedate working.  
Any ideas how i have to build it?

I first tried to get all tasks and filter later but as the amount can be to big and the limit of 50 objects per call makes it even harder a filter by duedate would be great for my scenario.

Many thanks

---

<div class="post-metadata">

**Author:** ![oskharrr](https://community.vikunja.io/user_avatar/community.vikunja.io/oskharrr/32/1724_2.png) [@oskharrr](https://community.vikunja.io/u/oskharrr)\
**Post date:** [31 October 2024 14:18 UTC](https://community.vikunja.io/t/api-request-help/2961/2 "2024-10-31T14:18:42Z")

</div>

Hm… have found posts from last year where the syntax is very different:

```auto
http://localhost:3456/api/v1/tasks/all?
sort_by[]=id
&order_by[]=desc
&filter_by[]=due_date
&filter_value[]=now+30d
&filter_comparator[]=less
&filter_concat=and
&filter_include_nulls=false

```

but using this syntax isnt realy working for me too as the example above shows all items and doesnt filter anything…

---

<div class="post-metadata">

**Author:** ![Grim73](https://community.vikunja.io/user_avatar/community.vikunja.io/grim73/32/1659_2.png) [@Grim73](https://community.vikunja.io/u/Grim73)\
**Post date:** [31 October 2024 14:19 UTC](https://community.vikunja.io/t/api-request-help/2961/3 "2024-10-31T14:19:26Z")

</div>

You _could_ create a saved filter for the due date, then use the [Gets one saved filter](https://try.vikunja.io/api/v1/docs#tag/filter/paths/~1filters~1%7Bid%7D/get) call to get the data you want, I will start testing this for a better solution though.

---

<div class="post-metadata">

**Author:** ![oskharrr](https://community.vikunja.io/user_avatar/community.vikunja.io/oskharrr/32/1724_2.png) [@oskharrr](https://community.vikunja.io/u/oskharrr)\
**Post date:** [31 October 2024 14:52 UTC](https://community.vikunja.io/t/api-request-help/2961/4 "2024-10-31T14:52:55Z")

</div>

@Grim73 many thanks for your help, would be great to understand how the syntax is 😉

---

<div class="post-metadata">

**Author:** ![kolaente](https://community.vikunja.io/user_avatar/community.vikunja.io/kolaente/32/5_2.png) [@kolaente](https://community.vikunja.io/u/kolaente)\
**Post date:** [31 October 2024 14:57 UTC](https://community.vikunja.io/t/api-request-help/2961/5 "2024-10-31T14:57:31Z")

</div>

The filter syntax is described in detail here: [Filter Syntax](https://vikunja.io/docs/filters)

Note that you need to snake\_case the values when using the api directly.

This filter query should work: `done = false && due_date > 0001-01-01`

---

<div class="post-metadata">

**Author:** ![oskharrr](https://community.vikunja.io/user_avatar/community.vikunja.io/oskharrr/32/1724_2.png) [@oskharrr](https://community.vikunja.io/u/oskharrr)\
**Post date:** [31 October 2024 15:12 UTC](https://community.vikunja.io/t/api-request-help/2961/6 "2024-10-31T15:12:51Z")

</div>

This is working! Many thanks
