Dear Apex community,
Application Express 5.1.4.00.08
ORDS 17.4.1
Database 12c Standard Edition 12.2.0.1.0
We are trying to create a RESTful service via the Apex builder that is intended to be a webhook for our mailing platform that informs us of any bounces. The issue we are facing is that it seems, by default, the service parses the received JSON and it is here that we are getting the following error:
400 Bad Request
Expected a value but got: START_OBJECT
I was reading somewhere that the parser can only handle simple JSON? This was an old article, is this true for version 5.1.4? I tried the exact same service setup under 19.1 on apex.oracle.com and it worked as expected. Below is the sample JSON supplied by our mailing platform to test the webhook. Is there anything we can do to successfully receive this (other than upgrade to 19.1 that is)?
{
"event": "accepted",
"id": "jxVuhYlhReaK3QsggHfFRA",
"timestamp": 1529692198.641821,
"log-level": "info",
"method": "smtp",
"flags": {
"is-authenticated": false
},
"message": {
"headers": {
"to": "team@example.org",
"message-id": "20180622182958.1.48906CB188F1A454@exmple.org",
"from": "sender@example.org",
"subject": "Test Subject"
},
"attachments": [],
"recipients": [
"team@example.org"
],
"size": 586
},
"storage": {
"url": "https://se.api.mailgun.net/v3/domains/example.org/messages/eyJwI...",
"key": "eyJwI..."
},
"recipient": "team@example.org",
"recipient-domain": "example.org",
"campaigns": [],
"tags": [],
"user-variables": {}
}