Skip to main content

update

if you want to update, so here you have to use PUT method. For updating data you have to pass updating data with Json in Body. and where caluse will be pass as String query.

Update all record#

PUT | api.example.com/users?all=true

Update Specific#

For updating specific record there where clause will pas as string query. like you want to update name of user who have id=1.

PUT | api.example.com/users?id=1

Body

{  "name":"Rohit Chouhan"}

Response

{  "status":true,  "message":"Update successfully"}

It will update new name where id=1, which is passed on url. you can pass multiple string query also.