Hi Andrei. I was not able to reproduce your 502 and 504 errors. Following your examples, I was able to successfully make those API calls. The workflow service may have been temporarily unavailable when you made those calls.
However, I am able to reproduce your key value pair issue when using colons in a query param. I have opened this bug report for you.