I am trying to get some data from the FDA database via the HTTP request node.
A simple request with name= search and value = device.device_report_product_code=FRN works fine, but as soon as I use brackets in the value field for the date range, I get a server 500 error code.
Error Message:
{ “error”: { “code”: “SERVER_ERROR”, “message”: “Check your request and try again”, “details”: "[parse_exception] parse_exception: Encountered " “]” "] “” at line 1, column 35.\nWas expecting:\n “TO” …\n " } }
Workflow:
{
"nodes": [
{
"parameters": {
"url": "https://api.fda.gov/device/event.json",
"options": {
"useQueryString": false
},
"queryParametersUi": {
"parameter": [
{
"name": "search",
"value": "date_received:[20130101+TO+20141231]"
},
{
"name": "limit",
"value": "1"
}
]
}
},
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
112,
144
],
"id": "0a17fb89-1320-4ed8-a554-7261b5a98ae6"
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-48,
144
],
"id": "9bc1b3bb-9bf4-49fc-ab71-128d9c889045",
"name": "When clicking ‘Execute workflow’"
}
],
"connections": {
"HTTP Request": {
"main": [
[]
]
}
},
"pinData": {},
"meta": {
"instanceId": "0f84d620e5b95f2d23c721740bdcdb03b9d37b2aecf7f99c52ae736a8a4adff4"
}
}