GET api/v2.0/Tagging/GetTags?searchText={searchText}&communityKey={communityKey}

Returns a set of currently existing tags that have been used throughout the tenant in the past based on the search term provided. This endpoint will provide the tags within their tag groups, as well as metadata about each tag. This will also include the markup necessary to include in the body of content created via the api to properly associate the tags to the content. Important Note: Some tags are reserved for admin use only, and there is a property on each tag that specifies if the current user can use the tag or not in content.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
searchText

The search term provided to search for previously used hashtags of similar text. Minimum of 2 characters required.

string

Required

communityKey

Certain tags are reserved for members of a particular community. If you are looking for tags within a particular community context, then you should provide that community's uniqueidentifier along with the search term to get the correct set of tags. If the user isn't a member, this will be ignored.

globally unique identifier

None.

Body Parameters

None.

Response Information

Resource Description

Based on the communityKey and SearchText provided, this returns a list of topic tag groups, their respective tags and metadata.

Collection of TagGroupModel
NameDescriptionTypeAdditional information
TagGroupKey

The unique identifier of the tag group.

globally unique identifier

None.

IsTopicTagGroup

Whether or not the tags within the tag group can be used as a topic tag during the creation of a post specific to a topic community.

boolean

None.

Tags

The set of tags currently contained within the tag group. Each tag contains the meatadata for the tag as well as the necessary markup to include in a post.

Collection of TagDataModel

None.

Name

The name of the Tag Group

string

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "TagGroupKey": "658ec801-5a5e-4569-b7e6-f06c357112d6",
    "IsTopicTagGroup": true,
    "Tags": [
      {
        "Tag": "sample string 1",
        "TagGroupName": "sample string 2",
        "TagKey": "15e7b549-671c-4f5e-a0d8-6a40ca97267d",
        "CanUseTag": true,
        "IsTopicTag": true,
        "TagMarkup": "sample string 6"
      },
      {
        "Tag": "sample string 1",
        "TagGroupName": "sample string 2",
        "TagKey": "15e7b549-671c-4f5e-a0d8-6a40ca97267d",
        "CanUseTag": true,
        "IsTopicTag": true,
        "TagMarkup": "sample string 6"
      }
    ],
    "Name": "sample string 3"
  },
  {
    "TagGroupKey": "658ec801-5a5e-4569-b7e6-f06c357112d6",
    "IsTopicTagGroup": true,
    "Tags": [
      {
        "Tag": "sample string 1",
        "TagGroupName": "sample string 2",
        "TagKey": "15e7b549-671c-4f5e-a0d8-6a40ca97267d",
        "CanUseTag": true,
        "IsTopicTag": true,
        "TagMarkup": "sample string 6"
      },
      {
        "Tag": "sample string 1",
        "TagGroupName": "sample string 2",
        "TagKey": "15e7b549-671c-4f5e-a0d8-6a40ca97267d",
        "CanUseTag": true,
        "IsTopicTag": true,
        "TagMarkup": "sample string 6"
      }
    ],
    "Name": "sample string 3"
  }
]

application/xml, text/xml

Sample:
<ArrayOfTagGroupModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HigherLogic.API.Models.Enterprise.Tagging">
  <TagGroupModel>
    <IsTopicTagGroup>true</IsTopicTagGroup>
    <Name>sample string 3</Name>
    <TagGroupKey>658ec801-5a5e-4569-b7e6-f06c357112d6</TagGroupKey>
    <Tags>
      <TagDataModel>
        <CanUseTag>true</CanUseTag>
        <IsTopicTag>true</IsTopicTag>
        <Tag>sample string 1</Tag>
        <TagGroupName>sample string 2</TagGroupName>
        <TagKey>15e7b549-671c-4f5e-a0d8-6a40ca97267d</TagKey>
        <TagMarkup>sample string 6</TagMarkup>
      </TagDataModel>
      <TagDataModel>
        <CanUseTag>true</CanUseTag>
        <IsTopicTag>true</IsTopicTag>
        <Tag>sample string 1</Tag>
        <TagGroupName>sample string 2</TagGroupName>
        <TagKey>15e7b549-671c-4f5e-a0d8-6a40ca97267d</TagKey>
        <TagMarkup>sample string 6</TagMarkup>
      </TagDataModel>
    </Tags>
  </TagGroupModel>
  <TagGroupModel>
    <IsTopicTagGroup>true</IsTopicTagGroup>
    <Name>sample string 3</Name>
    <TagGroupKey>658ec801-5a5e-4569-b7e6-f06c357112d6</TagGroupKey>
    <Tags>
      <TagDataModel>
        <CanUseTag>true</CanUseTag>
        <IsTopicTag>true</IsTopicTag>
        <Tag>sample string 1</Tag>
        <TagGroupName>sample string 2</TagGroupName>
        <TagKey>15e7b549-671c-4f5e-a0d8-6a40ca97267d</TagKey>
        <TagMarkup>sample string 6</TagMarkup>
      </TagDataModel>
      <TagDataModel>
        <CanUseTag>true</CanUseTag>
        <IsTopicTag>true</IsTopicTag>
        <Tag>sample string 1</Tag>
        <TagGroupName>sample string 2</TagGroupName>
        <TagKey>15e7b549-671c-4f5e-a0d8-6a40ca97267d</TagKey>
        <TagMarkup>sample string 6</TagMarkup>
      </TagDataModel>
    </Tags>
  </TagGroupModel>
</ArrayOfTagGroupModel>