RPC API
The RPC (remote procedure call) API allows you to perform 'actions' via the API, just as the admin panel does
Each entity exposes a number of 'actions' that can be completed via the API
Examples of actions are 'cancel', 'invoice', 'autocommit' etc
RPC actions correspond, mainly, to the 'action buttons' that can be seen on entity record drilldown pages in the admin panel
Use the admin panel to test RPC actions and observe the required payloads and response shapes
Resource intensive operations, like report generation, can be run via a dedicated 'high resource' route that will automatically engage more CPU and RAM to complete the action
Bulk RPCs
Many RPCs also support bulk operations, where you can perform an action on many records at once. You can see which actions support bulk RPC operations by inspecting list views in the admin panel. On some list views you'll notice a 'Select Bulk Action' at the top of list views. Try executing bulk actions in the admin panel and observing the request and response to get a feel for how they work.
Bulk RPCs use filter objects (see Generic Entity API) to specify which records on which to operate
Parameters for the action can be applied either to all records or on a record-by-record basis (override the main parameter).
Sometimes only record-by-record parameter arguments make sense
POST {root}/rpc/{entityname}/{actionname}/{id}
Performs an update action on a single entity
Take a JSON payload body argument (see the admin panel)
Returns the updated record
POST {root}/rpc-highresource/{entityname}/{actionname}/{id}
Identical to regular RPC call
Automatically directs the request to a higher CPU/RAM instance
POST {root}/rpc/{entityname}/{actionname}
Performs a bulk RPC action on all records matching the
filter
argument.General parameters should be set in the
params
fieldRecord-by-record (override) parameters should be set in the
entityParams
field (which is an array of objects containingentityID
andparams
fields)
POST {root}/rpc-highresource/{entityname}/{actionname}
Identical to regular bulk RPC call
Automatically directs the request to a higher CPU/RAM instance
Last updated