api:artists
Table of Contents
Record field format
[table]
[thead]
[tr]
[th]Name[/th]
[th]Type[/th]
[th]Details[/th]
[/tr]
[/thead]
[tbody]
[tr]
[td]
id[/td][td]integer[/td]
[td]>0[/td]
[/tr]
[tr]
[td]
name[/td][td]string[/td]
[td]tag format[/td]
[/tr]
[tr]
[td]
group_name[/td][td]string[/td]
[td][/td]
[/tr]
[tr]
[td]
other_names[/td][td]array[/td]
[td]strings[/td]
[/tr]
[tr]
[td]
is_banned[/td][td]boolean[/td]
[td][/td]
[/tr]
[tr]
[td]
is_deleted[/td][td]boolean[/td]
[td][/td]
[/tr]
[tr]
[td]
created_at[/td][td]timestamp[/td]
[td][/td]
[/tr]
[tr]
[td]
updated_at[/td][td]timestamp[/td]
[td][/td]
[/tr]
[/tbody]
[/table]
Associated attributes
[table]
[thead]
[tr]
[th]Name[/th]
[th]Type[/th]
[th]Number[/th]
[th]Availability[/th]
[th]Details[/th]
[/tr]
[/thead]
[tbody]
[tr]
[td]
members[/td][td]artist[/td]
[td]multiple[/td]
[td]optional[/td]
[td][/td]
[/tr]
[tr]
[td]
urls[/td][td]artist url[/td]
[td]multiple[/td]
[td]optional[/td]
[td][/td]
[/tr]
[tr]
[td]
wiki_page[/td][td]wiki page[/td]
[td]single[/td]
[td]optional[/td]
[td][/td]
[/tr]
[tr]
[td]
tag_alias[/td][td]tag alias[/td]
[td]single[/td]
[td]optional[/td]
[td][/td]
[/tr]
[tr]
[td]
tag[/td][td]tag[/td]
[td]single[/td]
[td]optional[/td]
[td][/td]
[/tr]
[/tbody]
[/table]
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
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]GET[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/artists.json[/td][/tr]
[tr]
[td]Type[/td]
[td]read request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]The default order is ID descending.[/td]
[/tr]
[/tbody]
[/table]
Search attributes
All of the following are standard attributes with all of their available formats and qualifiers.
- Number syntax
idcreated_atupdated_at- Text syntax
namegroup_name- Boolean syntax
is_deletedis_banned- Array syntax
other_names
Special search parameters
- Search for artists that have an other name matching this value. Supports wildcards.any_other_name_like
- Search for artists that have a matching name, group name, or other name. Supports wildcards and regexes.any_name_matches
- Search for artists with a matching URL.url_matches- 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
orhttp://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.
- Searches for the artist by name or URL.any_name_or_url_matches- Does a URL search if the value is prefaced by
orhttp://https:// - Does a name search otherwise.
- Sets the order of the results.ordernameupdated_atpost_count
Show
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]GET[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/artists/$id.json[/td][/tr]
[tr]
[td]Type[/td]
[td]read request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the artist ID.[/td][/tr]
[/tbody]
[/table]
Create
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]POST[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/artists.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[/tbody]
[/table]
Create parameters
- Required:
- The artist tag name.name- Must be tag format (API:tags).
- Optional
- The name of the group this artist belongs to.group_name
- List of alternative names for this artist.other_names- Space delimited. Replace spaces within names with underscores.
- List of URLs associated with this artisturl_string- Whitespace or newline delimited.
- Set the artist entry as deleted or not.is_deleted
Update
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]PUT/PATCH[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/artists/$id.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the artist ID.[/td][/tr]
[/tbody]
[/table]
Update parameters
Accepts the "same parameters":[#dtext-create-parameters] as the "create artist action":[#dtext-create]. All parameters are optional.
Delete
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]DELETE[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/artists/$id.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the artist ID.[/td][/tr]
[/tbody]
[/table]
Note: The action can be accomplished using the "update artist action":[#dtext-update] by setting
is_deleted to true.
Banned
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]GET[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/artists/banned.json[/td][/tr]
[tr]
[td]Type[/td]
[td]read request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]Redirects to the "index artist action":[#dtext-index] with
is_banned set to true.[/td][/tr]
[/tbody]
[/table]
Revert
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]PUT[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/artists/$id/revert.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the artist ID.[/td][/tr]
[/tbody]
[/table]
Revert parameters
- Required:
- version_id - The artist version ID to revert to.
Ban
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]PUT[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/artists/$id/ban.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the artist ID.Restricted to Admins only (Help:Users)[/td]
[/tr]
[/tbody]
[/table]
Unban
[table]
[tbody]
[tr]
[td]HTTP Method[/td]
[td]PUT[/td]
[/tr]
[tr]
[td]Base URL[/td]
[td]
/artists/$id/unban.json[/td][/tr]
[tr]
[td]Type[/td]
[td]write request[/td]
[/tr]
[tr]
[td]Description[/td]
[td]
$id is the artist ID.Restricted to Admins only (Help:Users)[/td]
[/tr]
[/tbody]
[/table]
See also
External links
[table]
[tbody]
[tr]
[td]Controller[/td]
[td]
[td][/td]
[/tr]
[tr]
[td]Model[/td]
[td]
[/tr]
[tr]
[td]Policy[/td]
[td]
[/tr]
[/tbody]
[/table]