nautobot / pynautobot

Nautobot Python SDK
https://pynautobot.readthedocs.io/en/latest/index.html
Apache License 2.0
34 stars 29 forks source link

Modify the Endpoint.update() method to support bulk updates #164

Closed tsm1th closed 5 months ago

tsm1th commented 5 months ago

Many endpoints allow for bulk update by sending in a list of dicts to the endpoint. We should allow for this feature in pynautobot.

Example usage:

import pynautobot
nautobot = pynautobot.api(
  url="http://localhost:8000", token="d6f4e314a5b5fefd164995169f28ae32d987704f",
)
devices = nautobot.dcim.devices
objects = [{"id":"db8770c4-61e5-4999-8372-e7fa576a4f65","name":"test1"},{"id":"e9b5f2e0-4f20-41ad-9179-90a4987f743e","name":"test2"}]
devices.update(objects)