All posts · VBCS Applications

VBCS Service Connections: Connecting to REST APIs

Service connections are how VBCS applications consume REST APIs from Oracle Fusion, OIC, and external systems. Here is the complete guide to configuring and using them.

Anurag Jangra · December 22, 2025 · 6 min read · ... views

How service connections work

graph LR
    VBCS[VBCS Application] -->|Service Connection| SC{Connection Type}
    SC -->|Oracle Cloud Applications| FUSION[Oracle Fusion
REST APIs]
    SC -->|REST| OIC[OIC Integration
Endpoints]
    SC -->|REST| EXT[External REST APIs]
    SC -->|ADF Business Components| ADF[ADF BC Services]

    VBCS -->|Variables| DATA[Page Variables
Bound to Components]
    DATA <-->|Data binding| UI[UI Components
Tables, Forms, Charts]

    style VBCS fill:#1e3a5f,stroke:#3B82F6,color:#e2e8f0
    style DATA fill:#0f2d1f,stroke:#22C55E,color:#e2e8f0

Creating a service connection to OIC

  1. In VBCS Designer: Services → + Service Connection
  2. Select Define by Specification (for OIC, use the OpenAPI spec from OIC)
  3. Enter the OIC endpoint base URL
  4. Configure authentication: Oracle Cloud Account (uses current user’s IDCS token)

For a VBCS → OIC REST trigger:

// OIC integration endpoint (configure in VBCS service connection)
{
  "baseUrl": "https://your-oic.integration.ocp.oraclecloud.com",
  "paths": {
    "/ic/api/integration/v1/flows/rest/CREATE_PO/1.0/createPO": {
      "post": {
        "summary": "Create Purchase Order",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/CreatePORequest" }
            }
          }
        }
      }
    }
  }
}

Using a service connection in an action chain

// Action: Call REST (configured in action chain designer)
// Service: OIC_CREATE_PO
// Endpoint: POST /createPO
// Request body mapping:

{
  "poType": "{{ $page.variables.poForm.poType }}",
  "supplierId": "{{ $page.variables.selectedSupplier.id }}",
  "lines": "{{ $page.variables.orderLines }}",
  "requestedDate": "{{ $page.variables.poForm.requestedDate }}",
  "orgId": "{{ $application.user.orgId }}"
}

// Response mapping (success path):
// response.body.poNumber → $page.variables.createdPONumber
// response.body.status   → $page.variables.poStatus

Handling pagination in service connections

For Fusion REST APIs that return paginated data:

// Page function: loadAllEmployees
async function loadAllEmployees() {
  var allEmployees = [];
  var offset = 0;
  var limit = 500;
  var hasMore = true;

  while (hasMore) {
    var result = await $page.functions.callGetEmployees({
      limit: limit,
      offset: offset,
      q: "ActiveStatus='ACTIVE'"
    });
    
    allEmployees = allEmployees.concat(result.items);
    hasMore = result.hasMore;
    offset += limit;
  }
  
  $page.variables.employees = allEmployees;
  return allEmployees.length;
}

Common service connection errors

ErrorCauseFix
401 UnauthorizedToken expired or wrong scopeRe-test connection, check IDCS client scopes
403 ForbiddenUser lacks Fusion roleCheck Fusion data roles assigned to user
404 Not FoundWrong endpoint URLCheck OIC endpoint path with Postman first
429 Too Many RequestsRate limit hitAdd delay between bulk calls
CORS error in browserMissing CORS headersOIC requires specific CORS config for VBCS

Think Beyond the Implementation

Questions worth sitting with after reading this

01

Why is this architecture appropriate for this specific context — and where would it be the wrong choice?

02

What assumptions did we make that aren't stated explicitly? What happens if those assumptions are wrong?

03

What would break first if the requirements changed — volume doubled, a third system was added, or the deadline halved?

04

What alternatives did we reject, and why? Was the decision made on evidence — or habit?

AJ
Anurag Jangra
Oracle Cloud PaaS Consultant · OIC & VBCS Specialist

4.5+ years delivering enterprise Oracle Cloud integrations and VBCS applications across manufacturing, IT services, and financial sectors. OCI Certified — writes about real-world OIC, VBCS, SQL, and BI Publisher patterns from production experience.

Chat on WhatsApp