r = requests.put(
url_test,
headers=headers,
data={'prefix': cidr, 'description': 'test'})
--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/23f4cd4c-9b47-4770-9060-d5c9cac98d06%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
{ "id": 2083, "family": 4, "prefix": "10.220.82.0/23", "site": null, "vrf": null, "tenant": null, "vlan": null, "status": { "value": 2, "label": "Reserved" }, "role": { "id": 6, "url": "http://xxxx/api/ipam/roles/6/", "name": "AWS-CLIENT-VPC-OPTIONS", "slug": "aws-client-vpc-options" }, "is_pool": false, "description": "", "custom_fields": {} }
Yes, this is correct. PUT requests require a full representation of the object. To make a partial update, use PATCH.Jeremy
On Thu, Apr 4, 2019 at 3:27 PM sreeram haridas <sreera...@gmail.com> wrote:
This is the code im trying to use for updating description for an existing prefix--url_test = /api/ipam/prefixes/{id}r = requests.put(
url_test,
headers=headers,
data={'prefix': cidr, 'description': 'test'})and im receiving the following<Response [400]>{'prefix': ['This field is required.']}Is this correct?
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-...@googlegroups.com.