Showing results for 
Show  only  | Search instead for 
Did you mean: 

V2 Problem API List Problems - What if the tag is invalid? It still returns an empty set.




I notice if I list the problems for a certain entity like:




The JSON returns information like this:


"totalCount": 10,
"pageSize": 50,
"problems": [


That total count can be 0 or greater.


Here is my question - If the tag name is invalid, totalCount will be 0. I HAVE NO WAY TO DISTINGUISH BETWEEN A GOOD TAG WITH NO PROBLEMS AND A BAD TAG.


Should I be making an API call beforehand to validate that a tag name is valid?? How do I do that? I have heard that managed tags are stored in one place and other tags in another.


Help!! I am trying to pull problems for a tag, and that works great. I just have no way to flag if the tag was actually valid.







Maybe a better way of asking this question is "What is the best way to validate that a tag (normal or custom" is valid?" through the V2 API?

Dynatrace Leader
Dynatrace Leader

@louis_gallo I do not fully understand what you would like to implement with the problems API endpoint. Can you give me more context on why the problems endpoint should verify if a given tag exists? For us the endpoint does return the list of entities that show a problem with a given tag. In case there is no entity with that given tag, the result is of course empty. On the other hand, the tag could exist on other entity types of course.


Best regards,


Dynatrace Leader
Dynatrace Leader

@louis_gallo You can use the tag endpoint to query for the number of entities of a given type and how many assignments the tag has, see here:

Hi Wolfgang. My idea, which I actually have a POC built, is to automate pulling back problems by a tag for a particular time, in most cases the time of a PVS test. Hence why I want to validate the tag beforehand as valid because both an invalid tag OR a valid tag with no problems return the same result. Hopefully that makes sense. I am going to try your idea above. Just have to get read entities privs with my token. If I am off base here, please let me know.

It works as a validator for the tags!!! Thanks Wolfgang!!

Great that it worked, have a great weekend!




Featured Posts