Best practice method for building the PUT request body

Hewlett Packard Enterprise recommends the following procedure for building the PUT request body.

  1. Use the GET method to obtain the response body for the resource you want to change.
  2. Compare the response body from the GET request to the JSON model for the PUT request shown in the ArubaOS-CX REST API Reference, and remove all attribute value pairs that are not included in the PUT JSON model.

    The request body you send using the PUT method must match the JSON model shown for the PUT method—which is not the same as the JSON model for the POST or GET method. The JSON models for the GET and POST methods include both mutable and immutable attributes. The JSON model for the PUT method contains only the mutable attributes.

  3. Change the values of the attributes to match your desired configuration.
  4. Use the resulting JSON data as the request body for the PUT request.