1

I have a GET endpoint to get a set of resources and a custom request param 'filter' to filter the said resources. This param is a stringified array of filters. Due to the length limitation in request param, I couldn't provide large filters. So, I had to opt for POST with filters in body. But, as POST requests are not idempotent, it seems highly deviating from API standards. I have searched a few sites and couldn't come up with a solution. Please assist.

1 Answers1

1

If you're concerned about hitting the length limitation, then you have to use POST. Yes, that means you lose idempotence and safety, which is unfortunate, but there aren't other good choices.

Community
  • 1
  • 1
Eric Stein
  • 13,209
  • 3
  • 37
  • 52