Custom Events API - Missing data / troubleshooting

I’m trying to send sample data using Events API in .NET

I’m unable to create my own API Insert Key in insights (no [+] button ) so I was advised by my supervisor to try the sample API Key he created in insights. I got a success message but I couldn’t see the sample data I was sending so I had to ask for help here and one of the guys from NR Support team responded and had me informed that they’ve transitioned away from Insights over to New Relic One. Convert Sample Custom Event Data to Metrics

I’ve figured out that I might need to create a new API Key on New Relic One instead of Insights and I was able to do so. However, upon using that API Key, I am now getting an error message “403: Forbidden”.

Note: (API Key Type: User. Apparently I don’t have permission to create the other types of API Keys)

I’m wondering if this has something to do with my permissions as a user. Correct me if I’m wrong, I don’t see any issues with the sample code I made. Here’s a reference:

Any form of help would be much appreciated. Thanks!

1 Like

I am still using an insert key with no issues with regards to inserting custom events. My keys start with NRII and I believe yours should as well. That is what I would ask the boss for.


Hi Tim, you’re right. I see that our Insights Insert Key starts with NRII as well.

May I ask where am I supposed to be looking at to see the data after submitting the request? I’ve made sure that the JSON file is properly formatted and I already used a JSON validator to make sure there’s no issue with it, but after submitting it using my code above, I get a success message but I don’t see the Custom Event in New Relic One Data Explorer.

I also tried querying it with something simple just to see the data (i.e., SELECT * FROM SampleEvent) however, New Relic One Data Explorer is still unable to see the Custom Event.

There is a table that you can query that will probably say bad json or something similar, I’ll dig more to find it in a minute. But, you can send it any bad json and it will return the pass you are seeing, even though it won’t show data actually making it in. Just that it successfully “worked”.

And mind you, graphql is where they want us, so no promises on when the rest api goes away or is completely unsupported. Just want to get that disclaimer in there for you and the next reader.

But, it isn’t just a matter of good json, it has to be json with a few conditions met.

Here is how I do my json
I create an object that defines what I want, and I populate the object with all the fields I might need. Then I add the eventType field to the object. The eventType is what will be queryable in NRQL. (Select * from myEventTypeName)

Then I create a list of that object type. I add whatever events come along that I want to add to that list and then the serialization of that list becomes my json for insertion. Hopefully that makes sense, but let me know if you need me to expand or come up with a sample. I’ll look for that nrql query that will show insert errors as well.

1 Like

Found it,

Add whatever where condition you need here, but this will get you started.
SELECT message FROM NrIntegrationError WHERE newRelicFeature = ‘Event API’ AND category = ‘EventApiException’

1 Like

Cool, it’s working now. You’ve been very helpful :slight_smile: Thank you so much, Tim!

1 Like

Happy to, best of luck.

1 Like

This topic was automatically closed after 365 days. New replies are no longer allowed.