# Using filter query on HTTP delete

**URL:** <https://discuss.jsonapi.org/t/using-filter-query-on-http-delete/2513>\
**Category:** Uncategorized\
**Created:** [September 12, 2022, 1:25pm UTC](https://discuss.jsonapi.org/t/using-filter-query-on-http-delete/2513 "2022-09-12T13:25:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spyralehandr0s](https://avatars.discourse-cdn.com/v4/letter/s/73ab20/32.png) [@spyralehandr0s](https://discuss.jsonapi.org/u/spyralehandr0s)\
**Post date:** [September 12, 2022, 1:25pm UTC](https://discuss.jsonapi.org/t/using-filter-query-on-http-delete/2513/1 "2022-09-12T13:25:58Z")

</div>

Is it a valid JSON API technique to delete a resource using the filter query?

ie  
`DELETE /orders?filter[userId]=1`

ONE user has MANY orders here.

---

<div class="post-metadata">

**Author:** ![fdrake](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/fdrake/32/654_2.png) [@fdrake](https://discuss.jsonapi.org/u/fdrake)\
**Post date:** [September 12, 2022, 11:06pm UTC](https://discuss.jsonapi.org/t/using-filter-query-on-http-delete/2513/2 "2022-09-12T23:06:37Z")

</div>

Seems like that’s up to the application. If that’s a reasonable request, there’s no reason not to support it as far as I can tell. Whether the risks of deleting too much (think if there’s no `filter` provided) are too great is a question for the application designers.

-Fred

---

<div class="post-metadata">

**Author:** ![jelhan](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/jelhan/32/822_2.png) [@jelhan](https://discuss.jsonapi.org/u/jelhan)\
**Post date:** [November 16, 2022, 9:30pm UTC](https://discuss.jsonapi.org/t/using-filter-query-on-http-delete/2513/3 "2022-11-16T21:30:30Z")

</div>

This is a valid pattern for REST APIs in general. But it is not standardized by JSON:API specification. I’m also not aware of an extension, which standardizes it.
