Danbooru
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)

  • nekoyashiki yuki (cat)
  • automaton (object)
  • colonel olcott (fate)
  • white len (cat) (tsukihime)
  • tenranmeziro
  • helena blavatsky (fate)
  • mecklenburg (azur lane)
  • zess (zestyjesus)
  • aphrodite (uchihime)
  • ball gown
  • zesty jesus
  • saxton hale
  • merasmus
  • administrator (tf2)
  • chudjak
  • mahou shoujo prism shirley
  • kohinata saori
  • akiyama mizuki
  • nyantasia
  • kamen rider kuuga (mighty form)
  • kougami rei
  • ganbare! nakamura-kun!! cover parody
  • ganbare! nakamura-kun!!
  • kirara (ryuu-kuu no aces)
  • ryuu-kuu no aces

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. Banned
  • 09. Revert
  • 10. See also
  • 11. External links

The following includes the details of how to interface with the 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

NameTypeNumberAvailabilityDetails
membersartistmultipleoptional
urlsartist urlmultipleoptional
wiki_pagewiki pagesingleoptional
tag_aliastag aliassingleoptional
tagtagsingleoptional

Nomenclature

  • Plural form: "artists"
    • Used in the URL pathname
  • Singular form: "artist"
    • Used for write parameters (Help:API Write Requests)
  • Versions: API:Artist versions

Index

HTTP MethodGET
Base URL/artists.json
Typeread request
DescriptionThe 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
    • created_at
    • updated_at
  • Text syntax
    • name
    • group_name
  • Boolean syntax
    • is_deleted
    • is_banned
  • Array syntax
    • other_names
Special search parameters
  • 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.
  • order - Sets the order of the results.
    • name
    • updated_at
    • post_count

Show

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

Create

HTTP MethodPOST
Base URL/artists.json
Typewrite request
Create parameters
  • 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

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 artist action. All parameters are optional.

Delete

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

Note: The action can be accomplished using the update artist action by setting is_deleted to true.

Banned

HTTP MethodGET
Base URL/artists/banned.json
Typeread request
DescriptionRedirects to the index artist action with is_banned set to true.

Revert

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.

Ban

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

Unban

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

See also

  • 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 / Contact /