From 5ba4252388a3dc7e60472e05e82f839e2d82ee9e Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 22 Sep 2020 14:49:49 -0400 Subject: [PATCH] Changelog for #4882 --- docs/release-notes/version-2.10.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/version-2.10.md b/docs/release-notes/version-2.10.md index cb970d304..67665ab38 100644 --- a/docs/release-notes/version-2.10.md +++ b/docs/release-notes/version-2.10.md @@ -18,6 +18,18 @@ http://netbox/api/dcim/sites/ \ --data '[{"id": 10}, {"id": 11}, {"id": 12}]' ``` +#### REST API Bulk Update ([#4882](https://github.com/netbox-community/netbox/issues/4882)) + +Similar to bulk deletion, the REST API also now supports bulk updates. Send a `PUT` or `PATCH` HTTP request to the list to the model's list endpoint (e.g. `/api/dcim/sites/`) with a list of JSON objects specifying the numeric ID of each object and the attribute(s) to be updated. For example, to set a description for sites with IDs 10 and 11, issue the following request: + +```no-highlight +curl -s -X PATCH \ +-H "Authorization: Token $TOKEN" \ +-H "Content-Type: application/json" \ +http://netbox/api/dcim/sites/ \ +--data '[{"id": 10, "description": "Foo"}, {"id": 11, "description": "Bar"}]' +``` + ### Enhancements * [#1503](https://github.com/netbox-community/netbox/issues/1503) - Allow assigment of secrets to virtual machines @@ -37,7 +49,7 @@ http://netbox/api/dcim/sites/ \ ### REST API Changes -* Added support for `DELETE` operations on list endpoints +* Added support for `PUT`, `PATCH`, and `DELETE` operations on list endpoints * dcim.Cable: Added `custom_fields` * dcim.InventoryItem: The `_depth` field has been added to reflect MPTT positioning * dcim.PowerPanel: Added `custom_fields`