-1

I am using rest api. I want to delete all pushes, but I don't know how to write the query. I know how to delete a specific push. delete $apiUrl/pushes/$pushId

What I want is to delete all pushes for that user.

$apiUrl/pushes?owner=$ownerId/ ???

thank you

lhyojin0821
  • 175
  • 9

1 Answers1

0

I would recommend 2 approaches

  1. Do it in a non-rest way by sending a custom JSON object containing the ID's marked for deletion. Reference

  2. Mozilla Storage Service SyncStorage API - to delete multiple records using REST. Reference

REST isn't the only way to solve any problem. “REST” is just an architectural style and you don't have to adhere to it (but you lose certain benefits of the internet if you don't). I suggest you look down this list of HTTP API architectures and pick the one that suits you.

Ankit Sanghvi
  • 467
  • 5
  • 18