Using a JSON PATCH request to update an attribute of an element
You can use a JSON PATCH request to update specific attributes of an element.
You must include Accept : application/json-patch+json
in the header of the request.
Example: The following request updates the IP address of the specified Host element to 172.20.1.72:
PATCH …/elements/host/1445 with payload [ { “op”: “replace”, “path”: “/address”, “value”:”172.20.1.72”} ]
Example: The following request updates the secondary IP addresses of the specified Host element to 1.1.1.1, 2.2.2.2:
PATCH …/elements/host/1445 with payload [ { "op": "add", "path": "/secondary", "value": ["1.1.1.1", "2.2.2.2"] } ]
Example: The following request removes the secondary IP addresses from the specified Host element:
PATCH …/elements/host/1445 with payload [ { "op": "remove", "path": "/secondary" } ]