REST API Working with Tags (Active Tags per project)

Hello I looked for the project_tags API however it does not seem to work as expected…

Once i created tags for a specific project, it will show up as an option for all other projects… also it is not clear how to get the current tags that are active by using something like

api/project_tags/search it will return a list of all tags and not the tags that are active in the project.

Also it seems there is no way to delete a tag once it is created… what am i missing? Is the tags API working as expected? Because it seems it is not scoped to the project. At least it is returning a series of tags that are not active any more in that specific project, it seems to completely ignore the project parameter. Is there another way to obtain the list of active tags for a specific project ?

Hi,

Yes, that’s normal.

The project_tags API docs don’t indicate a project parameter. It is simply a search of all project tags in the system.

That’s just not a use case we thought of.

Tagging projects was just intended as a simple categorization.

The tags currently used on a project are part of the response to: api/components/show

Would you mind sharing what you’re trying to accomplish?

 
Ann

I think @webmutation is trying to accomplish to end the existance of a (used or unused) formerly created tag :nerd_face:

To give you an example: Getting rid of a misspelled tag (and now i hope that changing a created tag is not possible :innocent: )

cheers,
Daniel

1 Like

Thanks for the help @daniel!

I’m going to forward the use case internally.

 
Ann

Hi,

From what I see, a tag shows up as an option only if it’s assigned to a project. In other words, a tag which is no longer used for any project doesn’t really exist anymore.
I would also be interested to better understand the use-case.

Chris

Hi,

today i was able to check for myself … Christophe, i can confirm what you mentioned. Once a tag is not used anymore it “vanishes”. (this would be a usable workaround for my example of “correcting a misspelling”)

I wanted to stop commenting here (as i, kinda, hijacked a bit here) but then i looked up the Web API and only found search and set

If i would like to do the following i would have to “massage” that into using the two beforementioned commands:

  • i would like to change the spelling of an existing tag without removal
  • i would like to remove an existing tag completely
  • i would like to remove an existing tag from a selection of projects

I hope i do not need to qualify these userstories in more detail :sweat_smile:

Also: @webmutation, please chime in! (Afterall it was your O(riginal)P(ost))