API Guide

GET
Use the GET method to retrieve a representation of a resource. The representation can either be a single resource or a collection.
Depending on the media type, the service returns the resource representation by using one of the media types specied in the Accept
header. If the Accept header is not present, the service returns the resource representations either as application/json or application/xml.
The resources support the formats dened by the Redsh standard.
The HTTP GET method is used to retrieve a resource. The service ignores the content of the body on a GET. The GET operation is
unchanged in the absence of external changes to the resource.
HEAD
All URLs support the HEAD method. This method returns the response headers.
POST
Use the POST method to invoke actions and create a resource. The POST request is submitted to the resource collection to which the new
resource belongs. Submitting a POST request to a resource that represents a collection is equivalent to submitting the request to the
Members property of that resource. Services that support adding members to a collection support both forms.
Services support the POST method for creating resources. If the resource does not support this method, status code 405 is returned. The
body of the create request contains a representation of the object to be created. The service can ignore any service-controlled properties
such as ID, forcing those properties for the service to be overridden. The service sets the Location header to the URI of the newly created
resource.
PUT
Use the PUT method to replace the property values of a resource. Properties omitted from the request body are reset to their default
value. Services support the PUT method to replace a resource completely. If a service does not support this method, status code 405 is
returned. Services may return a representation of the resource after any server-side transformations occur in the body of the response.
The PUT operation must be unchanged in the absence of external changes to the resource. The exception is that the ETag values may
change as a result of this operation.
PATCH
Use the PATCH method to update pre-existing resources. Changes to the resource are sent in the request body. This method does not
change the properties that are not specied in the request body. The response is either empty or a representation of the resource after the
update is done, or a success code if the operation is successful. Depending on the policies, the implementation may reject the update
operation on certain elds and not apply any of the requested updates.
DELETE
Use the DELETE method to remove a resource. Services support the DELETE method for resources that can be deleted. If the resource
cannot be deleted, status code 405 is returned. Services return a representation of the deleted resource in the response body.
Redsh-based
systems management 11