问题标签 [yii-rest]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
yii2 - Yii2 Rest API 批量更新和过滤
我希望在我的 Yii2 Rest API 中实现批量插入和更新。
对于单个记录更新,我使用 Rest API 调用作为
https://xxxxxx.com/api/web/v1/contacts/update/1。它将更新 ID = 1 的记录
但是现在我想用一个 API 调用更新多条记录。如何为此调用 API?
对于我正在使用的数据过滤
https://xxxxxx.com/api/web/v1/contacts?filter[contact_name][like]=sa过滤联系人姓名。如果我想通过[1,2,3]中的ID之类的ID过滤数据,我该怎么做?
请让我知道解决这两个挑战的方法。
谢谢