0
  1. I am looking to implement batch insert and update in my Yii2 Rest API.

    For single record updation, I am using the Rest API call as

    https://xxxxxx.com/api/web/v1/contacts/update/1 . It wil update the record with ID = 1

    But Now I want to update multiple records with a single API call.How to call the API for that?

  2. For data filtering I am using

    https://xxxxxx.com/api/web/v1/contacts?filter[contact_name][like]=sa to filter contact name. If I want to filter the data by id like ID in [1,2,3],How can i do that?

    Please let me know the work around for these two challenges.

    Thank you

saran varma
  • 141
  • 1
  • 1
  • 6
  • This is against REST principles. If you really want to do this you will have to come up with some custom endpoint. – Bizley Apr 16 '20 at 07:10
  • What about data filtering with multiple values? – saran varma Apr 16 '20 at 08:41
  • If I'm not mistaken it should be something like `filter[id][in][]=1&filter[id][in][]=2&filter[id][in][]=3`. Don't ask more than one question at once at StackOverflow, it's harder to filter. – Bizley Apr 16 '20 at 09:03

0 Answers0