api:wiki pages
Table of Contents
- 01. Record field format
- 02. Derived field format
- 03. Associated attributes
- 04. Index
- 05. Show
- 06. Create
- 07. Update
- 08. Delete
- 09. Revert
- 10. See also
- 11. External links
This page has details for how to interact with wiki page records through the API.
Record field format
| Name | Type | Details |
|---|---|---|
id | integer | >0 |
title | string | |
body | string | |
other_names | array | strings |
is_deleted | boolean | |
locked | boolean | |
created_at | timestamp | |
updated_at | timestamp |
Derived field format
These are values which are not part of the actual record, but instead are derived from calculations and record lookups on the fly.
| Name | Type | Details | Notes |
|---|---|---|---|
category_name | string | [0,1,3,4,5,null] | It is the category of the associated tag if it exists, otherwise it is null. |
Associated attributes
The following is the list of relations that can be included in the API results (see Help:Common URL parameters for more info):
| Name | Type | Number | Availability | Details |
|---|---|---|---|---|
tag | tag | single | optional | |
artist | artist | single | optional | |
dtext_links | dtext link | multiple | optional |
Index
Returns multiple wiki page records.
| HTTP Method | GET |
| Base URL | /wiki_pages.json |
| Type | read request |
| Description | The default order is updated at descending. |
Search attributes
Search parameters take the following format (see Help:Common URL parameters for more info):
search[FIELD]=VALUE
The following are the base fields along with their associated type. Check the syntax pages for all of the available variations.
- Number syntax
idcreated_atupdated_at- Text syntax
titlebody- Array syntax
other_names- Boolean syntax
is_deletedis_locked- Chaining syntax
tagartistdtext_links
Special search parameters
The following are additional search fields.
title_normalize- Normalized case-insensitive wildcard searching on the title text field.other_names_match- Case-insensitive wildcard search on any of the other names.linked_to- Wiki pages that have dtext links to the given wiki page.- The parameter must use the same format as the wiki title.
- I.e. all lowercase and underscores instead of spaces.
not_linked_to- Wiki pages that don't have dtext links to the given wiki page.- Needs the same format as
linked_to. hide_deleted- Hides all deleted wikis (Boolean syntax).- Shortcut for
search[is_deleted]=false other_names_present- Shows wikis based on the presence of other names (Boolean syntax).- Shortcut for
search[other_name_count]=>0(TRUE) andsearch[other_name_count]=0(FALSE) has_embedded_media- Wiki pages that have embedded media on them (Boolean syntax).
Search order
Using the search parameter order with one of the following values changes the order of the results.
title- Title descending.post_count- Post count descending.custom- Help:Common URL parameters- In order to use this order,
search[id]must also be set with a list of comma-separated IDs.
Show
Returns a single wiki page record.
| HTTP Method | GET |
| Base URL | /wiki_pages/$id.json |
| Type | read request |
| Description | $id is the wiki page ID or title. |
Create
Creates a single wiki page record.
| HTTP Method | POST |
| Base URL | /wiki_pages.json |
| Type | write request |
Create parameters
Pool parameters take the following format (see Help:API Write Requests for more info):
wiki_page[FIELD]=VALUE
- Required:
title- Optional
bodyother_names- Uses URL array parameter format.- Example:
wiki_page[other_names][]=blah&wiki_page[other_names][]=foo other_names_string- Space delimited list of post IDs.is_deletedis_locked- Only Builder users and higher.
Update
Updates a single wiki page record.
| HTTP Method | PUT/PATCH |
| Base URL | /wiki_pages/$id.json |
| Type | write request |
| Description | $id is the wiki page ID or title. |
Update parameters
Accepts the same parameters as the Create action. All parameters are optional.
Delete
Deletes a single wiki page record.
| HTTP Method | DELETE |
| Base URL | /wiki_pages/$id.json |
| Type | write request |
| Description | $id is the wiki page ID or title. |
Note: This action can also be accomplished using the Update action by setting is_deleted to true.
Revert
Reverts a single artist record to a prior version.
| HTTP Method | PUT |
| Base URL | /wiki_pages/$id/revert.json |
| Type | write request |
| Description | $id is the wiki page ID or title. |
Revert parameters
- Required:
- version_id - The wiki page version ID to revert to.
Note: The version ID may be passed along as a URL parameter instead of in the body.
