Difference between revisions of "API Assets Upload"
From unroole CMS wiki
Tommy.leung (Talk | contribs) |
Tommy.leung (Talk | contribs) |
||
Line 5: | Line 5: | ||
== URI == | == URI == | ||
− | {{:API_Base_URI}}[account-id]/assets | + | {{:API_Base_URI}}accounts/[account-id]/assets |
== HTTP Method == | == HTTP Method == |
Revision as of 12:10, 4 June 2012
Contents
Summary
Allows for uploading a new asset.
URI
https://api.unroole.com/accounts/[account-id]/assets
HTTP Method
POST
Required Paramaters
Paramater | Default | Maximum Length | Accepted Values | Description |
---|---|---|---|---|
token | API Persistence Token that identifies this user and its permissions. | |||
asset[asset][] | List of files. Not required if asset[video_id][] is specified. | |||
asset[video_id][] | List of youtube videos. The unique video id or url provided by youtube. ex: (LADHwoN2LMM, http://www.youtube.com/watch?v=LADHwoN2LMM). Not required if asset[asset][] is specified. |
Optional Paramaters
Paramater | Default | Maximum Length | Accepted Values | |
---|---|---|---|---|
name | Filename with spaces replaced with underscores. | 255 characters | string | The name of the asset. |
description | MySQL TEXT UTF-8 | string | The description of the asset. | |
tag_list | ∞, but each tag is 255 characters | string | List of comma separated tags (e.g. Ruby, HTML5, css3). | |
private | false | boolean | Public accessibility of an asset determines if its links can be shared or bookmarked. | |
sharable | false | boolean | Asset can be shared through the Mobile Briefcase | |
editable | false | boolean | Asset can be opened in other applications through the Mobile Briefcase | |
printable | false | boolean | Asset can be printed through the Mobile Briefcase | |
url_time_limit | 60 | The length of time (in seconds) that the asset url will be accessible for if the asset is private. This only applies to the response. |
Response
Field | Type | Description |
---|---|---|
http_status | integer | API Status Code http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html |
error | Rails default | |
success_files | array of API Asset Fields | List of files that were successfully uploaded |
failed_files | array of files names | List of file names that failed to uploaded |