29 Nov 2024 04:41 PM - edited 29 Nov 2024 04:53 PM
According to the docs I should be able to call the platform API (specifically the openpipeline API) using an access token with the correct scope:
curl --request GET --url https://{environmentid}.apps.dynatrace.com/platform/openpipeline/v1/configurations --header 'Authorization: Api-Token dt0c01.xxxxxx.xxxxxxxxxxxx
But when I do that it returns
{"error":{"code":401,"message":"Unsupported authorization scheme 'Api-Token'. Dynatrace platform APIs require the authorization scheme 'Bearer' [....] }
I believe this implies it only supports OAuth client authentication, which is not what the documentation seems to suggest.
Am I missing anything? I would really prefer to not create OAuth clients at this point if possible.
For reference, the docs I'm referring to are here https://docs.dynatrace.com/docs/discover-dynatrace/platform/openpipeline/reference/openpipeline-api/...
Thanks!
Solved! Go to Solution.
02 Jan 2025 04:20 PM
Hi, @wefsacsdf! Have you managed to find the answer to your question? It would be great if you share it with the Community 🙂
02 Jan 2025 04:59 PM
Hi @GosiaMurawska,
I had to create an OAuth client in the end, and authenticate that way.
It seems the docs have been updated to reflect that now, so hopefully others will no longer be as thoroughly confused as I was!
Although I see they've left the 'also' in there, implying there definitely was another authentication method listed in the docs and I'm definitely not just going mad 😄 :
You can execute this request also with an OAuth2 client with openpipeline:configurations:read permission.