api:tags
Table of Contents
- 01. Record field format
- 02. Associated attributes
- 03. Nomenclature
- 04. Index
- 05. Show
- 06. Update
- 07. See also
- 08. External links
The following includes the details of how to interface with the tag records through the API.
Record field format
Name | Type | Details |
---|---|---|
id | integer | >0 |
name | string | |
category | integer | includes [0,1,3,4,5] |
post_count | integer | >=0 |
is_locked | boolean | |
is_deprecated | boolean | |
created_at | timestamp | |
updated_at | timestamp |
Category
Value | Description |
---|---|
0 | General |
1 | Artist |
3 | Copyright |
4 | Character |
5 | Meta |
Associated attributes
Name | Type | Number | Availability | Details |
---|---|---|---|---|
wiki_page | wiki page | single | optional | Wiki page whose title matches the tag name. |
artist | artist | single | optional | Artist whose name matches the tag name. |
antecedent_alias | tag alias | single | optional | Alias where the tag is the antecedent. |
consequent_aliases | tag alias | multiple | optional | Aliases where the tag is the consequent. |
antecedent_implications | tag implication | multiple | optional | Implications where the tag is the antecedent. |
consequent_implications | tag implication | multiple | optional | Implications where the tag is the consequent. |
dtext_links | dtext link | multiple | optional | Dtext links to the page whose title matches the tag name. |
Nomenclature
- Plural form: "tags"
- Used in the URL pathname
- Singular form: "tag"
- Used for write parameters (Help:API Write Requests)
- Versions: none
Index
HTTP Method | GET or POST* |
Base URL | /tags.json |
Type | read request |
Description | The default order is ID descending. * Accepts POST under certain circumstances. See Help:API read requests. |
Search attributes
All of the following are standard attributes with all of their available formats and qualifiers.
- Number syntax
id
category
post_count
created_at
updated_at
- Text syntax
name
- Boolean syntax
is_locked
is_deprecated
- Chaining syntax
wiki_page
artist
antecedent_alias
consequent_aliases
antecedent_implications
consequent_implications
consequent_implications
dtext_links
Special search parameters
fuzzy_name_matches
- Shows tags with names that are within a certain percentage of similarity.name_matches
- Normalized wildcard search on the name field.name_normalize
- Normalized wildcard search on the name field that supports multiple tags split by a comma ",".name_or_alias_matches
- Normalized wildcard search on the name field that also checks for aliases where the search term is the antecedent.hide_empty
- Shows only tags that have a post count greater than 0 (Help:Boolean syntax).
Search order
Using the search parameter order
with one of the following values changes the order of the results.
name
- Alphabetical order on the name.date
- Orders by ID descending.count
- Orders by post count.similarity
- Orders by similarity to the search term.- Only when the
fuzzy_name_matches
parameter is used.
Show
HTTP Method | GET or POST* |
Base URL | /tags/$id.json |
Type | read request |
Description | $id is the tag ID.* Accepts POST under certain circumstances. See Help:API read requests. |
Update
HTTP Method | PUT/PATCH |
Base URL | /tags/$id.json |
Type | write request |
Description | $id is the tag ID. |
Update parameters
- Optional:
is_deprecated
- can only be set to
false
by admins - can only be set to
true
if the tag has a wiki page, and either its post count is zero or the user is an admin category
Restricted by user level- Member+: < 50 posts
- Builder+: < 1000 posts
- Admin+: No limit
Restricted to Moderator+
- Optional:
is_locked