27 May 2024 11:18 AM - last edited on 28 May 2024 08:24 AM by MaciejNeumann
Hello, Im new to Dynatrace and im currently facing problems when trying to get the logs through the API, at first i thought i was a problem with the token, but now that i have a oauth token, it's still not working.
Can anyone help?
Solved! Go to Solution.
27 May 2024 11:29 AM
Hi,
Could you share more details as which API are you using? Or which error are you getting?
Best regards
27 May 2024 11:31 AM
curl -X GET "https://{environmentid}.live.dynatrace.com/api/v2/logs/export?pageSize=5000" \
-H "Authorization: Bearer <oauth token>"
and even with Api-token it still doesnt work, this is the rror:
27 May 2024 02:57 PM
Hi,
I would raise a support ticket to confirm why token is marked as expired, if it not expired.
Best regards
27 May 2024 03:51 PM
AFAIK you need an API token for settings 2.0 , you don't need a Bearer.
27 May 2024 03:56 PM
i have oauth token already generated but my problem is with the command
27 May 2024 04:42 PM
Hello, the token he's talking about is already generated but isnt giving me access
28 May 2024 07:14 AM
To generate an access token
Select read.logs scope for the token.