Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

APEX REST Data Source (Simple HTTP) with URL Pattern parameter always uses default value, runtime value ignored (MS Graph API

Bappa Nayak2 days ago — edited 2 days ago

Hi All,

I am facing an issue with Oracle APEX REST Data Source (Simple HTTP) when using URL Pattern parameters with Microsoft Graph API.

Requirement

I want to call the MS Graph endpoint dynamically:

GET https://graph.microsoft.com/v1.0/sites/:site-id/drives

The :site-id should be passed at runtime from a page item.

REST Data Source Configuration

Shared Components → REST Data Sources

  • REST Data Source Type: Simple HTTP
  • Remote Server: MS Graph v1
  • Base URL:

https://graph.microsoft.com/v1.0/

  • URL Path Prefix:

sites/:site-id/drives

Authentication is working correctly (OAuth2 with MS Graph).

REST Source Operation

  • HTTP Method: GET
  • Database Operation: Fetch Rows
  • URL Pattern: .
  • Caching: Disabled

REST Data Source Parameter

  • Type: URL Pattern
  • Name: site-id
  • Static: No
  • Data Type: String

⚠️ Important behavior:

  • If I leave Default Value empty, APEX does not allow saving or throws HTTP 400 Bad Request
  • If I provide a Default Value, the REST source works but ALWAYS returns data for the default site-id
  • At runtime, even if I pass a different value, APEX ignores it and uses the default

Page Process

  • Page Process Type: Invoke API
  • REST Source: GRAPH_SITE_DRIVES
  • Operation: GET
  • Parameter Mapping:

site-id = :P4_SP_SITE_ID

Despite this, the REST call always uses the default site-id.

Errors Observed

  • ORA-20999: REST Data Source returned an HTTP error: HTTP 400: Bad Request
  • Happens when Default Value is empty
  • With Default Value → works but runtime value ignored

What I Have Verified

✅ Authentication works
✅ Endpoint works in Postman
✅ REST Source caching is Disabled
✅ URL Pattern parameter is not static
✅ Page item contains correct site-id

Questions

  1. Is it mandatory to provide a Default Value for URL Pattern parameters?
  2. If yes, how can runtime values override the default?
  3. Is this a known limitation/bug in APEX REST Data Sources?
  4. What is the correct way to pass dynamic path parameters like :site-id?

Any guidance, working example, or documentation reference would be highly appreciated.

Thanks in advance 🙏
Bappa Nayak

Comments
Post Details
Added 2 days ago
5 comments
79 views