When I pass an Authorization header in an “HTTP Request” workflow action using the credential vault format that can be used with HTTP monitors, I get HTTP 401 errors:
The credential vault entity ID being used is valid, and the API token being referenced has the correct scope. I’m working with the /synthetic/executions/batch API in this case, but I expect the issue applies to other use cases as well.
Is there a way to use the credential vault in a workflow, the way you can with HTTP monitors? Or will this be possible in the future? I do not want to have to hard-code API tokens into workflows.
The credential vault and token values shown above are not real, BTW.
Unfortunately, there’s no way to access vault credentials (or any settings) in the `HTTP Request` action. However, there is a plan to add support for it soon.
Is this possible yet? I have the same question as it pertains to Notebooks; I’m trying to set up a Dynatrace API call in a Notebook code section. It works, but only if I hard-code the token.
Hi Michal_zawislak,
How’s the current process working? We utilize API calls within our workflow scripts, and are interested in have a finer level access control and using Dynatrace credential vault for security concerns.
Hi @michal_zawislak, thanks that works. Appreciate for the prompt response. However found it’s working on Workflow but not the Notebooks, wondering what’s the diff between those two apps? And is there a way to perform it in Notebooks.
There are a few differences between those two apps, but at this point, it’s hard to tell which one plays a role here. Could you please share an error you’re getting when running your script in Notebooks? It would help to narrow down the root cause.
I have another need for this functionality -- accessing the credential vault from a JSON payload in an HTTP Request task. Is there a way to do this yet, now that it’s about 3.5 years later? Maybe I’m looking in the wrong spot as usual, but I’m not seeing it.
“HTTP Request” action supports using credentials from the credential vault for Basic and Token authentication. This is also mentioned in the documentation you linked in the "Authentication" bullet point.
Right, thanks, that’s clear, but I misspoke. What I’m after currently is a bit different from the original ask: I’m wanting to send what is stored as a token in the credential vault not as an auth header but as a custom JSON field, in the HTTP Request task’s POST payload. Is that possible, or do I need to use a JS task to accomplish that?