Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Connecting API via Download tool - "missing-required-key"

Stone_Finance
5 - Atom

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/)

Stone_Finace_11-1653606051216.png

 

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:

Stone_Finace_6-1653605663235.pngStone_Finace_7-1653605691531.pngStone_Finace_8-1653605705469.pngStone_Finace_9-1653605729248.pngStone_Finace_10-1653605747363.png

 

Can anyone help? Did anyone already have the same issue?

 

I trust on you guys! 

 

Best,

2 REPLIES 2
fvilelabr
Alteryx
Alteryx

Hi @Stone_Finance

Please, try to change the "Bearer" to "bearer", in lower case. Please, let me know if it works.

 

Stone_Finance
5 - Atom

Thanks! It worked smoothly. Just a matter of letter case / capitals.

Labels