REST API - CRUD operations on bulk of objects -


i designing restful api , understand how perform crud operations on bulk of objects.

for example, delete 30 users @ once. how design such option in terms of rest api? or may not good practice?

thoughts?

you can design in way.

@path("/users") @delete @consumes(mediatype.application_json) public response deleteusers(args) { ......... } 

you can pass list of users in json (forexample user ids) part of request.

or can use matrix params pass list of user ids (if number of users less).


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -