api:tag relationships
The following includes the details of how to interface with the tag alias/implication records through the API.
Record field format
Name | Type | Details |
---|---|---|
id |
integer | >0 |
creator_id |
integer | >0 |
approver_id |
integer | >0 or null |
antecedent_name |
string | |
consequent_name |
string | |
forum_topic_id |
integer | >0 or null |
forum_post_id |
integer | >0 or null |
status |
string | includes [queued, processing, pending, active, deleted, retired] |
reason |
string | Unused |
created_at |
timestamp | |
updated_at |
timestamp |
Associated attributes
Name | Type | Number | Availability | Details |
---|---|---|---|---|
creator |
user | single | required | |
approver |
user | single | optional | |
forum_topic |
forum topic | single | optional | |
forum_post |
forum post | single | optional | |
antecedent_tag |
tag | single | required | Tag of the antecedent. |
consequent_tag |
tag | single | required | Tag of the consequent. |
antecedent_wiki |
wiki page | single | optional | Wiki page of the antecedent. |
consequent_wiki |
wiki page | single | optional | Wiki page of the consequent. |
Nomenclature
- Plural form: "tag_aliases" / "tag_implications"
- Used in the URL pathname
- Singular form: "tag_alias" / "tag_implication"
- Used for write parameters (Help:API Write Requests)
- Versions: none
Actions
These are the various actions that can be done with tag alias/implication records.
Index
The base URL is GET /tag_aliases.json
The base URL is GET /tag_implications.json
Note: The default order is ID descending.
Search attributes
All of the following are standard attributes with all of their available formats and qualifiers.
- Number syntax
id
forum_topic_id
forum_post_id
created_at
updated_at
- Text syntax
antecedent_name
consequent_name
- User syntax
creator
approver
Special search parameters
-
name_matches
- Case-insensitive wildcard search on the antecedent name or consequent name fields. -
status_matches
- Case-insensitive search on the status field. - approved will search for [active, processing, queued]
-
antecedent_tag
- Passes the sub-hash (Help:Hash syntax) to the tag search (API:Tags), and returns any aliases/implications with a matching antecedent. -
consequent_tag
- Passes the sub-hash (Help:Hash syntax) to the tag search (API:Tags), and returns any aliases/implications with a matching consequent. -
category
- Searches on the category of the consequent tag, with support for multiple categories being space-delimited. -
order
- Sets the order of results. -
created_at
- Orders by created_at descending. -
updated_at
- Orders by updated_at descending. -
name
- Alphabetical order on the antecedent, then alphabetical order on the consequent. -
tag_count
- Orders by post count of the consequent tag, then alphabetical order on the antecedent, then alphabetical order on the consequent. -
status
- Orders by the status using the status order of [queued, processing, pending, active, deleted, retired], then orders by ID descending.
Show
The base URL is GET /tag_aliases/$id.json where $id is the tag alias ID.
The base URL is GET /tag_implications/$id.json where $id is the tag implication ID.
Delete
The base URL is DELETE /tag_aliases/$id.json where $id is the tag alias ID.
The base URL is DELETE /tag_implications/$id.json where $id is the tag implication ID.
Note: Admin only.