Operations

An operation is a verb that refers to the action being performed on a target resource or resource class. Operations are mapped from inbound HTTP request methods and query strings. They’re also carried forward on events that are triggered through these requests as well as similar requests that are invoked through scripts.

The following table maps HTTP request parameters to operations supported by Appirator.

Operation HTTP method Query String Parameters
CREATE POST -
READ GET -
UPDATE PUT, PATCH -
DELETE DELETE -
SEARCH GET term

When a PUT is used in an HTTP request, the entire object is replaced with the exception of array properties where the property type is a resource class. When a PATCH is used in an HTTP request, RFC7396 rules apply, Thus the object is patch updated using the following rules:

  • If a property is present in the payload and it has a value, that property’s value will be updated accordingly (access permitting).
  • If a property is present in the payload and its value is null, it acts as a delete on the property and the property itself will be removed from the underlying resource object.
  • If a property is not present in the payload, no change is made the property on the underlying resource object.

These rules only apply to changes being made over HTTP. When changes are made to resource objects directly through scripts, the resource object being manipulated is saved as the entire object.

Currently support is not available for RFC6902 patching.

In all cases, the object’s class validation is run in its entirety.