api:uploads
The following includes the details of how to interface with the upload records through the API.
Note: Only upload records created by oneself are visible, unless you are an Admin (Help:Users). Upload records get pruned after a day.
Record field format
Name | Type | Details |
---|---|---|
id |
integer | >0 |
uploader_id |
integer | >0 |
post_id |
integer or null | >0 |
tag_string |
string | |
rating |
string or null | includes [s, q, e] |
parent_id |
integer or null | >0 |
source |
string | |
referer_url |
string | |
md5 |
string | |
file_ext |
string | |
file_size |
integer | |
image_width |
integer | |
image_height |
integer | |
include_artist_commentary |
boolean or null | |
artist_commentary_title |
string | |
artist_commentary_desc |
string | |
translated_commentary_title |
string | |
translated_commentary_desc |
string | |
status |
string | |
md5_confirmation |
string or null | |
server |
string | |
backtrace |
string or null | |
context |
string or null | |
filepath |
string or null | Unused |
content_type |
string or null | Unused |
created_at |
timestamp | |
updated_at |
timestamp |
Associated attributes
Name | Type | Number | Availability | Details |
---|---|---|---|---|
uploader |
user | single | required | |
post |
post | single | optional |
Nomenclature
- Plural form: "uploads"
- Used in the URL pathname
- Singular form: "upload"
- Used for write parameters (Help:API Write Requests)
- Versions: none
- See API:Post versions instead
Actions
These are the various actions that can be done with upload records.
Index
HTTP Method | GET or POST [1] |
Base URL | /uploads.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
post_id
parent_id
file_size
image_width
image_height
created_at
updated_at
- Text syntax
rating
rating
source
referer_url
file_ext
md5
server
- User syntax
uploader
Special search parameters
-
post_tags_match
- The post query of the search term matches the post of the post flag. -
source_matches
- Case-insensitive wildcard search on the source field. -
has_post
- Whether to show uploads that have a post or not (Help:Boolean syntax). -
tag_string
- Case-sensitive wildcard search on the tag_string field. -
status
- Case-sensitive wildcard search on the status field. -
backtrace
- Case-sensitive wildcard search on the backtrace field.
Show
HTTP Method | GET or POST [1] |
Base URL | /uploads/$id.json |
Type | read request |
Description |
$id is the upload ID |
Create
HTTP Method | POST |
Base URL | /uploads.json |
Type | write request |
Description |
Create parameters
- Required:
tag_string
- Mandatory: One of these values must be present.
source
file
- Optional:
rating
- If this is missing, then the rating must be in the tag string.
artist_commentary_title
artist_commentary_desc
translated_commentary_title
translated_commentary_desc
md5_confirmation
referer_url
See also
[1] See Help:API read requests for more information.