Difference between revisions of "API Collection Add Asset"
From unroole CMS wiki
Tommy.leung (Talk | contribs) (→URI) |
Tommy.leung (Talk | contribs) |
||
Line 4: | Line 4: | ||
== URI == | == URI == | ||
− | {{:API_Base_URI}} | + | {{:API_Base_URI}}collections/[collection-id]/add_items |
== HTTP Method == | == HTTP Method == | ||
Line 37: | Line 37: | ||
! Description | ! Description | ||
|- | |- | ||
− | | | + | | item_ids[] |
| | | | ||
| | | | ||
− | | Each item must be in the format [ | + | | Each item must be in the format [page OR asset]_[item-id] <br /> e.g. asset_18, page_232, asset_54 |
− | | Array of | + | | Array of item ids to add to the collection. |
|} | |} | ||
Line 54: | Line 54: | ||
|- | |- | ||
| success_items | | success_items | ||
− | | array of | + | | array of ids |
− | | List of | + | | List of item_ids that were successfully added to the collection |
|- | |- | ||
| failed_items | | failed_items | ||
− | | array of | + | | array of ids |
− | | List of | + | | List of item_ids that failed to be added to the collection |
|} | |} | ||
== Example Response == | == Example Response == |
Revision as of 16:12, 4 June 2012
Contents
Summary
Allows for adding an asset to the collection.
URI
https://api.unroole.com/collections/[collection-id]/add_items
HTTP Method
POST
Required Paramaters
Paramater | Default | Maximum Length | Accepted Values | Description |
---|---|---|---|---|
token | API Persistence Token that identifies this user and its permissions. |
Optional Paramaters
Paramater | Default | Maximum Length | Accepted Values | Description |
---|---|---|---|---|
item_ids[] | Each item must be in the format [page OR asset]_[item-id] e.g. asset_18, page_232, asset_54 |
Array of item ids to add to the collection. |
Response
Field | Type | Description |
---|---|---|
http_status | integer | API Status Code http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html |
error | Rails default | |
success_items | array of ids | List of item_ids that were successfully added to the collection |
failed_items | array of ids | List of item_ids that failed to be added to the collection |