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

mixed collections.addFileToCollection ( mixed collection, mixed id )

Arguments

NameTypeRequiredDefault valueDescription
collectionmixedRequirednone
idmixedRequirednone

Response

The response will be 1 if the update was a success.

NameTypeDescriptionDefault Values
idINTThe success result will be 1 if the update was completed.1, error message

Sample Response

Sample REST Response
http://api.filemobile.com/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