Edit
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
The following includes the details of how to interface with the artist records through the API.
Record field format
Name | Type | Details |
---|---|---|
id | integer | >0 |
name | string | tag format |
group_name | string | |
other_names | array | strings |
is_banned | boolean | |
is_deleted | boolean | |
created_at | timestamp | |
updated_at | timestamp |
Associated attributes
Name | Type | Number | Availability | Details |
---|---|---|---|---|
members | artist | multiple | optional | |
urls | artist url | multiple | optional | |
wiki page | wiki page | single | optional | |
tag alias | tag alias | single | optional | |
tag | tag | single | optional |
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 Method | GET or POST [1] |
Base URL | /artists.json |
Type | read request |
Description | The 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://
orhttps://
- 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://
orhttps://
- Does a name search otherwise.
order
- Sets the order of the results.name
updated_at
post_count
Show
HTTP Method | GET or POST [1] |
Base URL | /artists/$id.json |
Type | read request |
Description | $id is the artist ID. |
Create
HTTP Method | POST |
Base URL | /artists.json |
Type | write request |
Description |
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 Method | PUT/PATCH |
Base URL | /artists/$id.json |
Type | write request |
Description | $id is the artist ID. |
Update parameters
Accepts the same parameters as the create artist action. All parameters are optional.
Delete
HTTP Method | DELETE |
Base URL | /artists/$id.json |
Type | write 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 Method | GET |
Base URL | /artists/banned.json |
Type | read request |
Description | Redirects to the index artist action with is_banned set to true. |
Revert
HTTP Method | PUT |
Base URL | /artists/$id/revert.json |
Type | write request |
Description | $id is the artist ID. |
Revert parameters
- Required:
- version_id - The artist version ID to revert to.
Ban
HTTP Method | PUT |
Base URL | /artists/$id/ban.json |
Type | write request |
Description | $id is the artist ID.Restricted to Admins only (Help:Users) |
Unban
HTTP Method | PUT |
Base URL | /artists/$id/unban.json |
Type | write request |
Description | $id is the artist ID.Restricted to Admins only (Help:Users) |
See also
No posts found.
1