Miyuu's Image Board

api:uploads

Table of Contents* 1. "Record field format":#dtext-record
* 2. "Associated attributes":#dtext-associations
* 3. "Nomenclature":#dtext-nomenclature
* 4. "Actions":#dtext-actions
** 4.01 "Index":#dtext-index
** 4.02 "Show":#dtext-show
** 4.03 "Delete":#dtext-delete
* 5. "See also":#dtext-see-also
* 6. "External links":#dtext-external-links

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


h4#record. 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]
uploader_id
[/td]

[td]integer[/td]

[td]>0[/td]

[/tr]

[tr]

[td]
source
[/td]

[td]string[/td]

[td][/td]

[/tr]

[tr]

[td]
referer_url
[/td]

[td]string[/td]

[td][/td]

[/tr]

[tr]

[td]
media_asset_count
[/td]

[td]integer[/td]

[td][/td]

[/tr]

[tr]

[td]
status
[/td]

[td]string[/td]

[td][/td]

[/tr]

[tr]

[td]
error
[/td]

[td]string or null[/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]


h4#associations. 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]

uploader
[/td]

[td]user[/td]

[td]single[/td]

[td]required[/td]

[td][/td]

[/tr]

[tr]

[td]
upload_media_assets
[/td]

[td]upload media asset[/td]

[td]multiple[/td]

[td]required[/td]

[td][/td]

[/tr]

[tr]

[td]
media_assets
[/td]

[td]media asset[/td]

[td]multiple[/td]

[td]required[/td]

[td][/td]

[/tr]

[tr]

[td]
posts
[/td]

[td]post[/td]

[td]multiple[/td]

[td]optional[/td]

[td][/td]

[/tr]

[/tbody]

[/table]


h4#nomenclature. Nomenclature


* Plural form: "uploads"

** Used in the URL pathname

* Singular form: "upload"

** Used for write parameters (Help:API Write Requests)

* Versions: none


h4#actions. Actions


These are the various actions that can be done with upload records.


h5#index. Index


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]GET[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/uploads.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]


h6#search-attributes. Search attributes


All of the following are standard attributes with all of their available formats and qualifiers.


* Number syntax

**

id


**
media_asset_count


**
created_at


**
updated_at


* Text syntax

**
status


**
source


**
referer_url


* Post syntax

**
post


* User syntax

**
uploader


* Chaining syntax

**
media_assets


**
upload_media_assets


h6#special-search-parameters. Special search parameters


*

is_posted
- Whether to show uploads that have a post or not (Help:Boolean syntax).


h5#show. Show


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]GET[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/uploads/$id.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]read request[/td]

[/tr]

[tr]

[td]Description[/td]

[td]
$id
is the upload ID[/td]

[/tr]

[/tbody]

[/table]


h5#Create. Create


[table]

[tbody]

[tr]

[td]HTTP Method[/td]

[td]POST[/td]

[/tr]

[tr]

[td]Base URL[/td]

[td]

/uploads.json
[/td]

[/tr]

[tr]

[td]Type[/td]

[td]write request[/td]

[/tr]

[/tbody]

[/table]


h6#create-parameters. Create parameters


* Mandatory: One of these values must be present.

**

source


**
files
(array file format)

* Optional:

**
referer_url


h4#see-also. See also


* Help:Common URL Parameters

* Help:API


h4#external-links. External links


[table]

[tbody]

[tr]

[td]Controller[/td]

[td][/td]

[td][/td]

[/tr]

[tr]

[td]Model[/td]

[td][/td]

[/tr]

[tr]

[td]Policy[/td]

[td][/td]

[/tr]

[/tbody]

[/table]