Skip to main content

Data Modification Requests

Clients create, modify, and delete resources by issuing the appropriate Create, Update, Replace or Delete operation, or by invoking an Action on the resource. All the data modification requests will be validated in the following order.

  1. Validation for valid-URI → 404 “StatusCode for Invalid URI’S”

  2. Validation for valid Method → 405 “StatusCode for Invalid Method”

  3. Validation for valid request body → 415 “StatusCode for Invalid RequestBody Type”

  4. Authorization → 401 “StatusCode for Invalid Redfish Credentials”

  5. User Privilege → 403 “StatusCode for Insufficient Redfish Privileges for the given Redfish Account in Authorization”

Note
  • The maximum request size set for the request body in Redfish is 20KB.

  • In the request body, if the given property value is a number and it ends with a dot (.), then it will be considered as an integer. For example, if the input value is 6. Or 6.0, then it will be saved as 6 only.

MethodDescription

Update (PATCH)

The PATCH method is the preferred method used to perform updates on pre-existing resources. Changes to the resource are sent in the request body. Properties not specified in the request body are not directly changed by the PATCH request. The response is either empty or a representation of the resource after the update was done. The implementation may reject the update operation on certain fields based on its own policies and, if so, shall not apply any of the updates requested.

Note
  • From RTP 1.5 and onwards all PATCH request requires a valid precondition header (If-Match or If-None-Match) with the request as per Redfish 1.5 Specification. Any request without a precondition header will be rejected with HTTP-428-PreConditionRequired, and requests with failed precondition header will be rejected with HTTP-412-PreConditionFailed.

  • The size of individual properties of type "string" is by default limited to 500B. But it can be changed in the"property-size" table during build time if required.

Replace (PUT)

The PUT method is used to completely replace a resource. Properties omitted from the request body are reset to their default value.

Note
From RTP 1.5 and onwards all PUT request requires a valid precondition header (If-Match or If-None-Match) with the request as per Redfish 1.5 Specification. Any request without a precondition header will be rejected with HTTP-428-PreConditionRequired, and requests with failed precondition header will be rejected with HTTP-412-PreConditionFailed.

Create (POST)

The POST method is used to create a new resource. The POST request is submitted to the resource collection in which the new resource is to belong. Submitting a POST request to a resource representing a collection is equivalent to submitting the same request to the Members property of that resource.

Delete(DELETE)

The DELETE method is used to remove a resource. Services shall support the DELETE method for resources that can be deleted.

Actions(POST)

The POST method is used to initiate operations on the object (such as Actions). Services shall support the POST method for sending actions. The POST operation may not be idempotent.