Invoking a REST Operation Programmatically

You can invoke a REST Data Source operation programmatically, treating it like a function call instead of a row set.

Consider a company selling books that offers a REST API at the following endpoint URL:

https://example.com/ords/cloudcompanion/orders/singleBookCreate

It lets a caller POST a JSON payload like the following to order some quantity of a single book:

{
   "isbn": "978‐1565926912",
   "quantity": 1
}

The API responds with an order confirmation payload containing:

{
    "orderNumber": 12345,
    "estimatedDelivery": "2025-07-06T00:00:00"
}

After configuring a REST Data Source with appropriate Data Profile columns and a POST operation having the required Request Body Template, you invoke it programmatically using the EXECUTE_REST_SOURCE procedure in the APEX_EXEC package.