Skip to content

The Tag Object

An object that represents a tag in a space.

Each space can have separate tags with the same name. The Management API can retrieve all of them with the all_tags parameter. The response then includes two properties that represent different data points.

PropertyCounts
taggings_countThe number of tags with this name that exist in the space, or
The number of draft or published stories with this tag, or
The number of deleted stories with this tag
tag_on_storiesThe number of draft or published stories with this tag

The following scenarios illustrate possible property values, depending on the number of stories associated with each tag and the status of the stories (draft/published, deleted):

  • For tags assigned to draft or published stories, taggings_count and tag_on_stories return the same number of tagged stories.

  • For tags assigned only to deleted stories, taggings_count returns the number of tagged stories, and tag_on_stories returns 0.

  • For unassigned tags, taggings_count returns 1, and tag_on_stories returns 0.

For example, when you assign a tag to five stories and then delete all five stories, taggings_count returns 5, but tag_on_stories returns 0. If you delete only four stories, both properties return 1.

  • name string

    The name of the tag.

  • taggings_count number
    • The number of tags with this name that exist in the space, or - The number of draft or published stories with this tag, or - The number of deleted stories with this tag The minimum value of taggings_count is 1, not 0.
  • tag_on_stories number

    Only visible when passing the all_tags parameter. The number of stories currently associated with the tag, corresponding to the Assigned items column in the Tags tab.

Example Object
{
"name": "Editor's choice",
"taggings_count": 1,
"tag_on_stories": 1
},
{
"name": "test-tag",
"taggings_count": 1,
"tag_on_stories": 0
}

Was this page helpful?

What went wrong?

This site uses reCAPTCHA and Google's Privacy Policy. Terms of Service apply.