api:wiki pages
The following includes the details of how to interface with the wiki page records through the API.
Record field format
- id: integer, > 0
- title: string
- body: string
- other_names: array, string
- category_name: integer, includes [0,1,3,4,5]
- is_deleted: boolean
- is_locked: boolean
- created_at: timestamp
- updated_at: timestamp
Associated attributes
- tag - The tag with the same name if it exists.
- artist - The artist with the same name if it exists (API:Artists).
- dtext_links - All of the DText link entries for that wiki.
Endpoints
Endpoint refers to the various actions that can be done with wiki page records.
Index
The base URL is GET /wiki_pages.json
Search parameter format
All search parameters use URL hash format where "search" is the base object.
Example: search[PARAMETER]
Search attributes
All of the following are standard attributes with all of their available formats and qualifiers.
- Number syntax
id
created_at
updated_at
- Text syntax
title
body
- Array syntax
other_names
- Boolean syntax
is_deleted
is_locked
Special search parameters
-
body_matches
- Case-insensitive wildcard searching on the body text field. -
title_normalized
- Normalized case-insensitive wildcard searching on the title text field. -
other_names_match
- Case-insensitive wildcard search on any of the other names. -
tag
Sub-hash parameters get passed to the tag model. - Example:
search[tag][post_count]=>100
- The resulting names from the tag search get passed to the wiki search.
-
linked_to
- All wiki pages that link to the given wiki title. -
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) -
order
- Sets the order of results. -
title
- Alphabetical order on the title. -
post_count
- Orders by post count.
Note: The default order is updated at descending.
Show
The base URL is GET /wiki_pages/$id.json where $id is the wiki page ID [1].
Create
The base URL is POST /wiki_pages.json
Create parameter format
All create parameters use URL hash format where "wiki_page" is the base object.
Example: wiki_page[PARAMETER]
Create parameters
- Required:
title
- Optional
body
-
other_names
- Uses URL array parameter format. -
other_names_string
- Space delimited list of post IDs. is_deleted
is_locked
Update
The base URL is PUT /wiki_pages/$id.json where $id is the wiki page ID [1].
Update parameters
Accepts the same parameters as the create wiki page action. All parameters are optional.
Delete
The base URL is DELETE /wiki_pages/$id.json where $id is the wiki page ID [1].
Note: This action can also be accomplished using the update wiki page action by setting is_deleted
to true.
Revert
The base URL is PUT /wiki_pages/$id/revert.json where $id is the wiki page ID [1].
- Required:
- version_id - The wiki page version ID to revert to.
Other notes
[1] Wiki pages can also be updated by their title, replacing $id with the title of the wiki page.