API: (bug 19004) Add support for tags. Patch by Matthew Britton