Best Practice | Batch Requests
  • 15 Sep 2025
  • 1 Minute to read
  • Dark
    Light

Best Practice | Batch Requests

  • Dark
    Light

Article summary

Introduction

CMIC’ s REST platform supports execution of multiple operations in a single batch request. The platform commits data at the end of the request, so that if one batch request fails all changes are rolled back and an error response is returned.

Request

  • URL
    • [BASE URL]/[Application]/rest
  • HTTP Method
    • POST
  • Content-Type
    • application/vnd.oracle.adf.batch+json

Payload

The payload structure is broken into parts, where each part represents a record created within the batch. The structure is as follows:

Parts

This is a list of part objects, and each part includes the following attributes: id, path, operation, and payload.

Notice

All of the attributes listed in this section are REQUIRED.

Following tables describes each of the required parts attribute.

AttributeDescription
pathThis is the path to the endpoint resource. As an example /1/pyemployee is used for HCM employee resource.
operationThis is the specific operation that is executed for this resource. Available values are create, update, delete, upsert, and get
idUnique id of object, this is to identify a specific request.
payloadThis section lists endpoint specific attributes.

Example

{
    "parts": [
        {
            "path": "/1/[resource]",
            "operation": "create",
            "id": "part1",            
            "payload": {
                "attribute 1" : "value",
                "attribute 2" : "value",
                "attribute 3" : "value"
            }
        }
    ]
}

Scenario: Updating multiple Employees

This request is for updating multiple employee records in CMiC HCM application.

  • URL
    • [BASE URL]/hcm-rest-api/rest
  • HTTP Method
    • POST
  • Content-Type
    • application/vnd.oracle.adf.batch+json
  • Payload
{
    "parts": [
        {
            "id": "part1",
            "path": "/1/pyemployee",
            "operation": "create",
            "payload": {
                "attribute 1" : "value",
                "attribute 2" : "value",
                "attribute 3" : "value"
            }
        }
    ]
}

Batch Requests are currently supported for:
AR Invoices
CI Inventory Issues with Requisition
PY Timesheets
PY Employees
PY Employee Securities