Hi Everyone,
Thanks for looking at this. I am trying to replicate the following curl script:
curl -H “X-CDD-Token:apitoken” --form-string ‘json={“project”: “TPD”, “autoreject”:“false”, “mapping_template”: “19032”,“runs”:[{“run_date”: “2022-01-21”,“place”: “lab”}]}’ -F ‘file=@file.csv’ ‘https://app.collaborativedrug.com/api/v1/vaults/0001/slurps’
I can confirm that the syntax here works and the script is able to post the data from the file to the site successfully.
I am trying to replicate this using one of the palladium HTTPS Retriever like in this post to post data from a file to the site.
I’m getting a 404 error and unfortunately the node is not very verbose on what I did wrong. I tried to work backwards and modify the string in my curl script and I get a 404 error when I run the curl script in verbose mode. So I suspect that there is something wrong with my JSON that I’m sending. Here is what the JSON I’m trying to send over the HTTP Request node looks like:
[ {
“project” : “T”,
“mapping_template” : 19032,
“runs” : “run_date:2022-01-21”,
“autoreject” : “false”
} ]
OR
[ {
“project” : “T”,
“mapping_template” : 19032,
“runs” : “[{“run_date”:“2022-01-21”}]”,
“autoreject” : “false”
} ]
I’ve even cut out the “nested part” to simplify like this
[{
“project”: “T”,
“mapping_template”: 19032,
“autoreject”: “false”
}]
JSONlint says all of these are vaild but I can’t get it to work so I’m really stumped.
Thanks in advance for any thoughts you might have
Jason