API Reference

Collections.addFileToCollection

Adds a file to a manual collection.

If the collection is type 2 (saved search), the media does not exist, the collection does not exist or the media is already in the collection the request will fail.

If the Automatically active field is active for the collection the media will be directly set as active. If Automatically active is not set the media item will be placed in the pending list.


Syntax

bool collections.addFileToCollection ( int collection, int id )

Arguments

NameTypeRequiredDefault valueDescription
collectionintRequirednoneThe collection ID.
idintRequirednoneThe media ID to add.

Sample Response

Sample REST Response
http://api.newspark.ca/services/rest/collections/addFileToCollection?collection=[COLLECTION_ID]&id=[MEDIA_ID]&APIKEY=[APIKEY]
<?xml version="1.0" encoding="UTF-8"?>
<result>1</result>
Sample JSON Response
{
    "status": true,
    "result": 1
}

Code examples

0 comments

Be the first to comment on addFileToCollection.

Add a Comment

  • captcha