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)

  • ellen fuwafuwaatama aureus
  • bordfunker133
  • messer (bordfunker133)
  • rapture queen (nikke)
  • list of nijisanji official costumes
  • higuchi kaede
  • higuchi kaede (caroler)
  • d.e.e.p. (nikke)
  • cobblestone
  • higurashi no naku koro ni
  • gingham vest
  • photek
  • good looking records
  • caramel arrow cookie
  • dilute tortoiseshell
  • sumeramu riima
  • ninomae ina'nis
  • ninomae ina'nis (nu udra)
  • koseki bijou
  • koseki bijou (gore magala)
  • nijisanji
  • shoutmon x7
  • liber legis
  • forte gigas
  • king squasher

Options

  • Wiki History
  • Discussions
  • What Links Here

api:artists

Table of Contents
  • 01. Record field format
  • 02. Associated attributes
  • 03. Index
  • 04. Show
  • 05. Create
  • 06. Update
  • 07. Delete
  • 08. Revert
  • 09. Ban
  • 10. Unban
  • 11. See also
  • 12. External links

This page has details for how to interact with artist records through the API.


Record field format

NameTypeDetails
idinteger>0
namestringtag format
group_namestring
other_namesarraystrings
is_bannedboolean
is_deletedboolean
created_attimestamp
updated_attimestamp

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
membersartistmultipleoptional
urlsartist urlmultipleoptional
wiki_pagewiki pagesingleoptional
tag_aliastag aliassingleoptional
tagtagsingleoptional

Index

Returns multiple artist records.

HTTP MethodGET
Base URL/artists.json
Typeread request
DescriptionThe default order is ID 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
    • name
    • group_name
  • Boolean syntax
    • is_deleted
    • is_banned
  • Array syntax
    • other_names
  • Chaining syntax
    • urls
    • wiki_page
    • tag_alias
    • tag
Special search parameters

The following are additional search fields.

  • any_other_name_like - Search for artists that have an other name matching this value. Supports wildcards.
  • any_name_matches - Search for artists that have a matching name, group name, or other name. Supports wildcards and regexes.
  • url_matches - Search for artists with a matching URL.
    • Does a regex match when the query starts and ends with a forward slash "/".
      • Regexes must follow the Ruby's format.
    • Does a wildcard match when there are asterisks "*" present.
    • Uses the artist URL finder when the value is prefaced by http:// or https://
      • This does a recursive search on URLs stripping the pathname one level at a time to search for matches.
      • It will keep searching until it finds an exact match or 10 similar entries.
    • Otherwise it does a wildcard search with wildcard placed at the start and end.
  • any_name_or_url_matches - Searches for the artist by name or URL.
    • Does a URL search if the value is prefaced by http:// or https://
    • Does a name search otherwise.
Search order

Using the search parameter order with one of the following values changes the order of the results.

  • name - Name descending.
  • updated_at - Updated at 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 artist record.

HTTP MethodGET
Base URL/artists/$id.json
Typeread request
Description$id is the artist ID.

Create

Creates a single artist record.

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

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

artist[FIELD]=VALUE
  • Required:
    • name- The artist tag name.
      • Must be tag format (API:tags).
  • Optional
    • group_name - The name of the group this artist belongs to.
    • other_names - List of alternative names for this artist.
      • Space delimited. Replace spaces within names with underscores.
    • url_string - List of URLs associated with this artist
      • Whitespace or newline delimited.
    • is_deleted - Set the artist entry as deleted or not.

Update

Updates a single artist record.

HTTP MethodPUT/PATCH
Base URL/artists/$id.json
Typewrite request
Description$id is the artist ID.
Update parameters

Accepts the same parameters as the Create action. All parameters are optional.


Delete

Deletes a single artist record.

HTTP MethodDELETE
Base URL/artists/$id.json
Typewrite request
Description$id is the artist ID.

Note: The action can 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/artists/$id/revert.json
Typewrite request
Description$id is the artist ID.
Revert parameters
  • Required:
    • version_id - The artist version ID to revert to.

Note: The version ID may be passed along as a URL parameter instead of in the body.


Ban

Bans a single artist record.

HTTP MethodPUT
Base URL/artists/$id/ban.json
Typewrite request
Description$id is the artist ID.
Restricted to Admins only (Help:Users)

Unban

Unbans a single artist record.

HTTP MethodPUT
Base URL/artists/$id/unban.json
Typewrite request
Description$id is the artist ID.
Restricted to Admins only (Help:Users)

See also

  • API:Artist versions
  • Help:Common URL Parameters
  • Help:API

External links

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