REST Operations

Table and Form-over-Table capabilities are enabled for GET, PUT, PATCH, POST, and DELETE operations as follows:

  • Download is enabled if there is a GET operation on the collection path. Note that you must first download rows before you can perform operations on the item path. Therefore, GET on the collection path is a prerequisite for operations on the item path such as PUT, PATCH, or DELETE.
  • Existing row updates are enabled if the item path has either a PUT or PATCH operation.
  • Create new rows is enabled if the collection path has a POST operation.
  • Delete existing rows is enabled if the item path has a DELETE operation.

For more information about Download, see Download Data. For more information about Upload, see Upload Changes.

Note:

Even if the business object supports an operation, you can still choose to disable a layout's capability by deselecting it in the Layout Designer's Advanced tab.

Update Existing Rows with PUT

This section describe how to use the PUT operation to update existing rows.

This information is most relevant for ORDS since ORDS AutoREST provides only PUT (and not PATCH). Other frameworks, such as ADF REST, provide PATCH.

How it works:
  • When the add-in attempts to update an existing row, it first looks for a PATCH operation on the item path of the business object. If PATCH is available, it is preferred. If PATCH is not available, the add-in looks for a PUT operation on the item path.
  • PUT and PATCH are quite different.
  • PATCH allows for a partial update of the row. That is, the request payload may contain a subset of all the fields and only those fields get modified.
  • PUT completely replaces the current row with whatever is in the request payload. If any fields are missing, they may be set to null.
  • PUT is not compatible with certain VBAFE features.
  • Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Methods/PUT
How to use PUT:
  • In order to use PUT successfully, the table or form must include all the fields available from the REST endpoint. If any fields are omitted, the service may set those fields to null, discarding the existing data.
  • Additionally, the following VBAFE features should not be used with PUT:

Note:

if the service cannot find the previously existing row, the PUT operation will create that row. If user A is working on a update of a given row while user B deletes that row, user A's upload will recreate that row when PUT is used for the pending update.