Determining which feature to use

There is no simple algorithm for determining the appropriate feature to use. In some situations, it may be possible to use multiple features, but it is easier to write the code using one particular feature. The following guidelines may help you determine the best feature to use:

  • Use request inclusion or composite requests if:
    • All subrequests must succeed or fail as a unit.
    • Information must be passed from one subrequest to another.
    • The subrequests must use endpoints from different APIs.
  • Use batch requests or composite requests if:
    • At least some of the subrequests are GETs, DELETEs, or business action POSTs

At a high level, a composite request is typically the most robust option. If there is a choice of which feature to use, it may be best or easiest to use composite requests.