However, the tags are all coming out lowercase and contains unwanted spaces at the beginning. Although those white spaces can be trimmed, the all lowercase tag names is posing a big challenge. Is this a problem with Alfresco API itself or am i missing a parameter?
Re: Document Tags from API Explorer yields all lowercase values with unwanted beginning spaces
Tags are always lower-cased by the default Alfresco APIs for handling tags. The "unwanted spaces" thing is definitely not part of the standard and I would expect this to be an input issue, i.e. whatever client / interface is providing or extracting the tags to begin with. Alfresco by itself does not add a whitespace anywhere.