Hi, I had a hard time trying to convince the API endpoint to accept my curl requests. It wasn’t accepting any API credentials. The issue was caused by the wrong API endpoint stated in the docs. It looks like that EU region has its own API endpoint api.eu.newrelic.com and the api.newrelic.com doesn’t work :(.
Another issue was my timestamp format, the PUT method does not allow for timestamps with time zone information and expects the UTC time, even though the time zone is provided in the output of the list command.
So to make things easier I’ve created a small python script that works for the EU region and handles the local time to UTC conversion.
I’m sharing it here as it might be useful for others, if it is in wrong place let me know.