api:uploads
Table of Contents
- 01. Record field format
- 02. Associated attributes
- 03. Index
- 04. Show
- 05. Create
- 06. See also
- 07. External links
This page has details for how to interact with upload records through the API.
01 Record field format
| Name | Type | Details |
|---|---|---|
id | integer | >0 |
uploader_id | integer | >0 |
source | string | |
referer_url | string | |
media_asset_count | integer | |
status | string | |
error | string or null | |
created_at | timestamp | |
updated_at | timestamp |
02 Associated attributes
The following is the list of relations that can be included in the API results (see Help:Common URL parameters for more info):
| Name | Type | Number | Availability | Details |
|---|---|---|---|---|
uploader | user | single | required | |
upload_media_assets | upload media asset | multiple | required | |
media_assets | media asset | multiple | required | |
posts | post | multiple | optional |
03 Index
Returns multiple upload records.
| HTTP Method | GET |
| Base URL | /uploads.json |
| Type | read request |
| Description | The default order is ID descending |
Search attributes
Search parameters take the following format (see Help:Common URL parameters for more info):
search[FIELD]=VALUE
The following are the base fields along with their associated type. Check the syntax pages for all of the available variations.
- Number syntax
idmedia_asset_countcreated_atupdated_at- Text syntax
statussourcereferer_url- Post syntax
posts- User syntax
uploader- Chaining syntax
media_assetsupload_media_assets
Special search parameters
The following are additional search fields.
is_posted- Whether to show uploads that have a post or not (Help:Boolean syntax).
Search order
Using the search parameter order with one of the following values changes the order of the results.
id- ID descending.id_desc- ID descending.id_asc- ID descending.random- Random order.custom- (See Help:Common URL parameters for more details)
04 Show
Returns a single upload record.
| HTTP Method | GET |
| Base URL | /uploads/$id.json |
| Type | read request |
| Description | $id is the upload ID |
05 Create
Creates a single upload record.
| HTTP Method | POST |
| Base URL | /uploads.json |
| Type | write request |
Create parameters
Upload parameters take the following format (see Help:API Write Requests for more info):
Upload[FIELD]=VALUE
- Mandatory: One of these values must be present.
sourcefiles(Help:Hash syntax])- Optional:
referer_url
