cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sample API-call that worked in Swagger doesn't work in PowerShell after pasted in PowerShell terminal

I executed DQL query over Dynatrace API, using Swagger UI (even the DQL used, is exactly the example provided in swagger there)

So, of course it rans successfully and return HTTP 2xx status, and of course I copied the curl-command from 'cURL (PowerShell)' tab instead of the other two tabs.

Output from Swagger.png

 

But when pasted the command into PowerShell, it just couldn't work.

  1. So, I try removed all line breaks to make this multi-line curl command into one-liner
  2. Doesn't work, so I removed the backtick seen.
  3. Doesn't work, so I try making into 2 liner. One line is everything before the content (i.e all the -H parts) then another line the part of curl commands from -d.
  4. Doesn't work, so I try remove the '@"' and '"@'seen after the -d.
  5. Doesn't work, so I try any combination of the above 4 steps.

Still, no use. What am I missing here?

But When I Try in PS.png

 

My expectation is that, once I copy and paste it should just work (because since nowadays Dynatrace is very kind enough to split out the curl-command into the 3 flavors automatically, I assume Dynatrace is also kind enough to let us just copy-and-paste without the needs to amend them. 😂 LOL)

 

Best Regards,

Wai Keat

0 REPLIES 0

Featured Posts