0

I want asana tag id if i provide tag name via asana api call. Is there any method from which i can directly achieve this?

Alternative, i can get all the tags in workspace and filter through it matching with my id but this will be long process.

Any method like getTagID(tagName) ?? yes i can get reverse of this getTag(tagId)

FYI, i am using php wrapper for asana api (https://github.com/ajimix/asana-api-php-class)

Thanks.

Zeeshan
  • 165
  • 1
  • 13

2 Answers2

1

Try the Typeahead API - it lets you search of items in Asana (like tags) by text. (Since you could have multiple tags with the same name, we can't just do getTagID(tagName) but this is pretty close.)

agnoster
  • 3,744
  • 2
  • 21
  • 29
  • Awesome!! This i never noticed in Asana api documentation..And in my workspace i don't have multiple tags with same name so this solution is perfect for me. Thanks @agnoster :) – Zeeshan Jul 21 '15 at 10:19
0

Typeahead is the obvious answer, but when I'm doing bulk transforms of tasks, I find it easier to build a dictionary of known tags and their ids in the workspace with tags.find_by_workspace() which I can then just look up whenever required.

I have a fairly small number of tags, a lot of tasks, and no duplicate tag names, so that seems to be more efficient.

zaump
  • 147
  • 2
  • 12