API Reference

Collections.createCollection

This method creates a collection in a vhost. Pass the application Id and the array $collectionInfo in order to create the new collection. The collection can be one of two types: Manual (type 1) or Saved Search (type 2). For the Manual collection, the $collectionInfo parameters to pass are name, type, and description. For the Saved Search collection, the $collectionInfo parameters to pass are: name, type, description, sort, sortdir, channel, groupid, includeChildGroups, assignmentid, eventid, filetype, moderation, and limit.

Please note: You can only set one of the following: groupid, eventid or assignmentid; otherwise an error will result.

Syntax

int collections.createCollection ( array collectionInfo, int vhost )

Arguments

NameTypeRequiredDefault valueDescription
collectionInfoarrayRequirednoneThe collection configuration (name, type, description, etc).
vhostintRequirednoneThe vhost ID.

Sample Response

Code examples

0 comments

Be the first to comment on createCollection.

Add a Comment

  • captcha