Hey everyone,
I'm trying to make a request to Datagran and keep getting a "Bad Parameter Input Error" as a response due to Datagran requiring the params to be '-F' (form data). Is it possible to format the request in Xano this way?
Here's the curl that Datagran provides:
curl -F "data-file=@path/to/my-file.json" -X POST 'https://api.v2.datagran.io/v2/integrations/629a213a1d8c79009dcbe988/push_data/my_stream' -H 'content-type: multipart/form-data' -H 'Authorization: GEjee09419c09Un95bMoUegadQsc5fe7acbd4ykS79G3na96U0_A28d6BSdb9dceo7t859439686735bD3Gace9050v3f720eh5fa86x5db'
This is what is produced when the curl is imported:
Here's the response:
{"request":{"url":"https://api.v2.datagran.io/v2/integrations/655bc9e2aafc0e65f9382d8c/push_data/X",
"method":"POST",
"headers":["POST /v2/integrations/655bc9e2aafc0e65f9382d8c/push_data/X HTTP/2","Host: api.v2.datagran.io","accept-encoding: gzip, deflate","authorization: g03Gf6d63grbcX0aG25L23VG617cfko4Mo678byb2dd856bx9NP97358Q5XQz69bE8k703t83e8nw51Oie935a2VaaQrx4VKaJA6aac8fec","accept: application/json","content-length: 266","content-type: multipart/form-data; boundary=------------------------c69098bdcb1715c8"],
"params":{"data-file":"https://storage.googleapis.com/x2wr-vrfp-ftf9.n7.xano.io/vault/Sd3Q1_fH/4nVOkn7Pl6HkTCIUT7ig-3wiNes/yUgpmQ../datagran.json"}},
"response":
{"headers":["HTTP/2 200","date: Tue, 21 Nov 2023 16:26:44 GMT","content-type: application/json","content-length: 171","access-control-allow-origin: *","cache-control: no-store","expires: 0","pragma: no-cache","strict-transport-security: max-age=15724800; includeSubDomains"],
"result":{"_status":"ERR","_error":{"title":"Bad Parameter Input Error","code":1040,"subcode":1018,"message":"File is missing to upload."}},"status":200}}