Hi All,
I am trying to fetch logs data from Dynatrace using GET API using bearer authentication, but I am not able to do so. It is always throwing some error:
I have already provided required access to user, IAM polices and oauth client Scope required to get the logs from Dynatrace.
Scope access provided:
logs.ingest
logs.read
storage:logs:read
storage: buckets:read
API URL:
curl -k -L -X GET “https://{environmentid}.live.dynatrace.com/api/v2/logs/query” -H “Authorization: Bearer Access_token” -H “Accept: application/json” – d ‘{“query”: “fetch logs | limit 10”}’