Best Practice | Oracle ADF BC REST Framework 4
  • 04 Jul 2025
  • 1 Minute to read
  • Dark
    Light

Best Practice | Oracle ADF BC REST Framework 4

  • Dark
    Light

Article summary

Introduction

This document outlines important enhancements introduced with Oracle's ADF Business Components (ADF BC) REST Framework 3 and 4, starting from JDeveloper release 12.2.1.2.0. It is designed to assist users in understanding new features, the implications of these changes, and how to adapt their applications accordingly.

Important

If you are using framework version 3 or later, please note that nested child resources are now returned as resource collections rather than simple arrays. This change may require updates to your application logic to correctly parse the new structure and handle pagination. We recommend reviewing your implementation and applying only necessary adjustments to maintain compatibility.

Table of Contents

• REST Framework Version Declaration via HTTP Header
• Detailed Exception Payload
• Nested Child Resources (Resource Collections)

Changes from Framework V2 to V4

REST Framework Version Declaration via HTTP Header

Feature Description: Users can explicitly declare framework version through HTTP headers, overriding the default application settings.
Implementation: Specify the header Rest-Framework-Version with the desired framework version.
• Example: Header: Rest-Framework-Version: 4
image.png

Reference: Oracle Documentation

Detailed Exception Payload

Feature Description: Framework version 4 significantly improves error handling by providing detailed exception payloads. Responses now include detailed error descriptions, specific error codes, and paths to pinpoint errors precisely within request payloads, enhancing debugging capabilities.

Implementation: Include Rest-Framework-Version: 4 in request headers and specify response formats as either application/json or application/vnd.oracle.adf.error+json.

{
  "title": "Bad Request",
  "status": "400",
  "o:errorDetails": [
    {
      "detail": "An instance of type oracle.jbo.domain.Date cannot be created from string not a date. The string value must be in format YYYY-MM-DDTHH:MI:SS.sss+hh:mm.",
      "o:errorCode": "26099",
      "o:errorPath": "/EmpHireDate"
    }
  ]
}

Framework Version Support: Version 4

Nested Child Resources

Feature Description: Starting from framework version 3, nested child resources are returned as collections (JSON objects) rather than arrays, providing additional metadata such as pagination information. This change enhances consistency and performance for large data sets.
Implementation: Update applications to parse nested child resources as collections rather than arrays. Implement logic to handle pagination through attributes such as

hasMore

Example:

{{CMIC_BaseUrl}}/ap-rest-api/rest/1/manualcheck?expand=PayamtChqmanViewObj

Framework Version Support: Supported from version 3 onwards
• **Reference: ** Oracle Documentation