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/
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
- Is it mandatory to provide a Default Value for URL Pattern parameters?
- If yes, how can runtime values override the default?
- Is this a known limitation/bug in APEX REST Data Sources?
- 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