REST api filter on tag

I’m using the api to get a list of all my applications and their status.
I want to specify the applications category or more specifically on tag.

So my get URL would be https://api.newrelic.com/v2/applications.json?filter[category]=team&filter[tag]=myteamname

But this does not work.

How would I be able to ask for all applications that are tagged with team:myteamname?

Hi @nick.vanhoof - I think you have to approach this from a different direction. The label API lists the application id’s which are attached to that label. You can then fetch the application status using the application id’s.

1 Like

Allright that’s indeed usefull. I will use that to acquire my result.

As I understand from the api explorer I cannot specify a filter, is that correct
e.g. https://api.newrelic.com/v2/labels.json?filter[category]=Alerts

In my results I see applications with “category”:“Application” and “category”:“Application-cluster”. But I cannot see tags (Category:Value) that I created myself e.g. “Team”:“Myteamname”.
What is the possible reason for this?

1 Like

Correct, you cannot specify a filter on the labels api. You will have to get all the labels then narrow down to the label you require and then finally the application ids for that label.

1 Like