AniworldAI
Login Posts Comments Notes Artists Tags Pools Wiki Forum More »
Search Changes Help | Posts (0) History
  • Help
guro
scat
furry -rating:g

Recent Changes (all)

  • nvwa (chinese mythology)
  • wu gang
  • madolche chouxvalier
  • alternate headwear color
  • hua mulan
  • playing video games
  • mizuki tsukimori
  • wangzhe rongyao
  • hua mulan (wangzhe rongyao)
  • corrupted mynah (signalis)
  • spitting blood
  • coughing blood
  • vomiting blood
  • rope anklet
  • rwo bauta
  • pandano kankan
  • otonose shiki
  • crelly parfait
  • crelly
  • muto miruru
  • kohaku gao
  • hakanau miu
  • amekuma mashiro
  • draco centauros (miracle charmy)
  • lu shu

Options

  • Wiki History
  • Discussions
  • What Links Here

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

NameTypeDetails
idinteger>0
titlestring
bodystring
other_namesarraystrings
is_deletedboolean
lockedboolean
created_attimestamp
updated_attimestamp

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.

NameTypeDetailsNotes
category_namestring[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):

NameTypeNumberAvailabilityDetails
tagtagsingleoptional
artistartistsingleoptional
dtext_linksdtext linkmultipleoptional

Index

Returns multiple wiki page records.

HTTP MethodGET
Base URL/wiki_pages.json
Typeread request
DescriptionThe 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
    • id
    • created_at
    • updated_at
  • Text syntax
    • title
    • body
  • Array syntax
    • other_names
  • Boolean syntax
    • is_deleted
    • is_locked
  • Chaining syntax
    • tag
    • artist
    • dtext_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) and search[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 MethodGET
Base URL/wiki_pages/$id.json
Typeread request
Description$id is the wiki page ID or title.

Create

Creates a single wiki page record.

HTTP MethodPOST
Base URL/wiki_pages.json
Typewrite request
Create parameters

Pool parameters take the following format (see Help:API Write Requests for more info):

wiki_page[FIELD]=VALUE
  • Required:
    • title
  • Optional
    • body
    • other_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_deleted
    • is_locked - Only Builder users and higher.

Update

Updates a single wiki page record.

HTTP MethodPUT/PATCH
Base URL/wiki_pages/$id.json
Typewrite 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 MethodDELETE
Base URL/wiki_pages/$id.json
Typewrite 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 MethodPUT
Base URL/wiki_pages/$id/revert.json
Typewrite 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.


See also

  • API:Wiki page versions
  • Help:Common URL Parameters
  • Help:API

External links

Controllerhttps://github.com/danbooru/danbooru/blob/master/app/controllers/wiki_pages_controller.rb
Modelhttps://github.com/danbooru/danbooru/blob/master/app/models/wiki_page.rb
Policyhttps://github.com/danbooru/danbooru/blob/master/app/policies/wiki_page_policy.rb
Terms / Privacy / Upgrade / Автор зеркала /