Skip to content

Tag.id may be empty and is not documented as such #1870

@nikclayton

Description

@nikclayton

https://docs.joinmastodon.org/entities/Tag/#id is documented as "ID of the hashtag in the database. Useful for constructing URLs for the moderation tools & Admin API." and "String (cast from an integer but not guaranteed to be a number)".

This may be the empty string, which is not documented anywhere. For example, send a request for non-existent tag (https://mastodon.social/api/v1/tags/pO8WHFw3JSGvLAt0iyQ08g) and you get back:

{
    "id": "",
    "name": "pO8WHFw3JSGvLAt0iyQ08g",
    "url": "https://mastodon.social/tags/po8whfw3jsgvlat0iyq08g",
    "history": [
        {
            "day": "1773187200",
            "accounts": "0",
            "uses": "0"
        },
// ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions