I notice if I list the problems for a certain entity like:
The JSON returns information like this:
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.
Solved! Go to Solution.
@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.
@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.