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

Platform API authentication. Are access tokens supported?

wefsacsdf
Visitor

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!

2 REPLIES 2

GosiaMurawska
Community Team
Community Team

Hi, @wefsacsdf! Have you managed to find the answer to your question? It would be great if you share it with the Community 🙂

wefsacsdf
Visitor

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.

https://docs.dynatrace.com/docs/discover-dynatrace/platform/openpipeline/reference/openpipeline-api/...

 

 

Featured Posts