Hi Community!
I'm trying to connect to RunOPs API using Donwload tool, in order to create a task to run a database query, however it keeps returning a HTTPS 400 Bad request, no matter how I write the body message. If I change from POST to GET, I can successfully access the API and the return is perfect. But trying POST, I just can't get any kind of successful return.
Nice to know: API Docs (https://runops.io/docs/endpoints/)
1. target and script are the only required terms/params
2. I already tried to write the message considering Quotes ("), singular quote (') , no quotes, ect.
3. also tried a different syntaxes like:
{:target "read-mobydick",:script "select 1"}
target:"read-mobydick",script:"select 1"
{"target":"read-mobydick","script":"select 1"} and many others...
4. the return is always the same:
DownloadData:
{"message":"{\"error\":{\"body-params\":{\"target\":\"missing-required-key\",\"script\":\"missing-required-key\"}}}"}
DownloadHeaders: (CSV)
API Endpoint,Authorization,Accept,Content-type,query,DownloadData,DownloadHeaders
https://api.runops.io/v1/tasks,Bearer eyJh**************2VyaW5mbyJdLCJpYXQiOjE2NTM1OTY2NzQsImV4cCI6MTY1MzY4MzA3NCwiYXpwIjoiOGdxMjZFMzN1N2ptMnEwQ0lEcERZd2dIcU4zNHQ0S3kiLCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIGVtYWlsIn0.hVQ9D2I0IuF_2mdhVk5_KOYL_SPr_ZCw4IWU_r7RJXe7zVBH*************9PL9KlHgGWOtycswWChHZWI0ckckDqk5es2Wmvc3a3nK59UaEABr20TfA4mcGiSbi6kaLSmtOIBzb0Iuo4t4hua9qPYc8PzrSoRS9OM***dC***,application/json,application/json,"query {
""target"": ""read-mobydick""
script: ""select 1""
}","{""message"":""{\""error\"":{\""body-params\"":{\""target\"":\""missing-required-key\"",\""script\"":\""missing-required-key\""}}}""}","HTTP/1.1 400 Bad Request
Date: Thu, 26 May 2022 22:48:23 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Strict-Transport-Security: max-age=31536000; includeSubdomains
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Content-Security-Policy: script-src 'unsafe-inline' 'unsafe-eval' 'strict-dynamic' https: http:; object-src 'none'; frame-ancestors 'none'
"
DownloadHeaders: Alteryx Text view
HTTP/1.1 400 Bad Request
Date: Thu, 26 May 2022 22:48:23 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Strict-Transport-Security: max-age=31536000; includeSubdomains
X-Frame-Options: DENY
X-Content-Type-Opti...
5.
Also tried using Different forms of payload filling: As a formula, constants, body message, ect.
6. Images:
Can anyone help? Did anyone already have the same issue?
I trust on you guys!
Best,
Solved! Go to Solution.
Please, try to change the "Bearer" to "bearer", in lower case. Please, let me know if it works.
Thanks! It worked smoothly. Just a matter of letter case / capitals.
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |