Hi,
In order to get the list of all tags under the given tag path, we need to resolve the respective path as "Tag" using "TagManager", followed by listChildren() or listAllSubTags() for immediate/direct child tags or tags of utmost depth respectively.
Tag tag = tagManager.resolve("/content/cq:tags/we-retail");
Iterator<Tag> tagItr = tag.listChildren();
Below line that you have used in your code will return all the tags set on the given resource (not the child tags from the given tag path)
Eg. Tags set on page or asset resource.
Tag[] tags=tagManager.getTags(tagpath);