26 Mar 2026 09:46 AM
Hi,
I use the grail service api to run DQL query from java client.
When i do a POST on
platform/storage/query/v1/query:execute
I received a requestToken that I reuse in a query GET platform/storage/query/v1/query:poll (while state is Running).
It works excepted when the requestToken received contains a "+".
I got the error "The supplied request-token parameter (xxxxxxxxxxx xxxxxx==) is invalid".
I try to encode it but I got an error too: The supplied request-token parameter (xxxxxxxxxxx%2Bxxxxxx==) is invalid.
How to fix it?
Solved! Go to Solution.
26 Mar 2026 11:17 AM
Hello @Celine ,
This usually happens because the request-token is being treated as a URL query parameter, and in query strings a + is often interpreted as a space if it isn’t handled correctly.
So when Dynatrace returns a token containing +, you should make sure the token is passed as a properly encoded query parameter in the query:poll call, and that it is encoded only once.
What to check on the Java side:
The safest approach is to use a URI/query parameter builder and pass the original token value to it, so the client handles encoding correctly.
In practice, the problem is often this:
So the fix is:
Maybe something like:
URI uri = new URIBuilder(baseUrl + "/platform/storage/query/v1/query:poll")
.addParameter("request-token", requestToken)
.build();I got the same problem when I was making a n8n automation, not with Java ofc, I suffered a little to got the solution 😅
Let me know if helped, please
26 Mar 2026 11:31 AM
Thank you so much Maximiliano, it's working! 🙂
26 Mar 2026 11:33 AM
My pleasure, @Celine !
Featured Posts