Splunk AppDynamics

Unable to query Events Api.

Justin_Pienaar
Engager

Hi there everyone.

I am struggling to get the Events Api to accept a query for some metrics I want to query.
I followed the instructions on https://docs.appdynamics.com/appd/21.x/21.6/en/extend-appdynamics/appdynamics-apis/analytics-events-... and have setup the postman request with the required fields.
I have made sure to give the api_key the correct permissions but I when querying the fra-ana controller I am hit with a 403. 

I cannot see why I am being hit with his error or find any documentation to help me debug it.

`My query looks like the following:
curl -X POST "http://fra-ana-api.saas.appdynamics.com/events/query"
-header "X-Events-API-AccountName: <global_account_name>" 
-header "X-Events-API-Key: <api_key>" 
-header "Content-Type: application/vnd.appd.events+text;v=2" 
-header "Accept: application/vnd.appd.events+json;v=2" 
-data "SELECT * FROM logs"


I have tried this command in postman and in Powershell both returning the same 403.

Labels (1)
Tags (2)
0 Karma
1 Solution

Justin_Pienaar
Engager

Figured out the issue.

It had to do with the permissions of the API keys.
I was so focused on the event service permissions, I never stop to realise that the query needed the permissions to access the logs.


View solution in original post

0 Karma

iamryan
Community Manager
Community Manager

Hi @Justin.Pienaar,

Thanks for following up and sharing the solution! I love to see it! 

0 Karma

Justin_Pienaar
Engager

Figured out the issue.

It had to do with the permissions of the API keys.
I was so focused on the event service permissions, I never stop to realise that the query needed the permissions to access the logs.


0 Karma
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...