save_collection

Save collection data.

Please note that due to the nature of how the web works, it is best to POST the request for this API binding to avoid URL limits being reached.

$ref * The ID of the collection
$coldata *

JSON encoded collection data. The data should be an array containing any of the allowed collection properties:

  • keywords - CSV of keywords to be associated with this collection
  • allow_changes - to set whether other users are allowed to add/remove resources when collection is shared or is public. The allowed value is zero (ie. 0) or one (ie. 1).
  • users - to attach other users to the collection. Allowed value is a CSV of user names.
  • name - Collection name. Supports custom translations
  • public - 0 for private, 1 for public (legacy)
  • type - 0 = standard, 3 = Featured collection, 4 = public. If 3 or 4 then public should be set to 1
  • parent** ID of parent featured collection. Set to 0 to create a new root level collection (see below)
  • force_featured_collection_type** - required to be set to 1 if creating a root level featured collection (parent=0)
  • thumbnail_selection_method** 0 = no image, 1 = most popular image, 10 - most popular images, 100 - manually select image
  • bg_img_resource_ref** - resource ID to use as thumbnail. Only if thumbnail_selection_method =100

Example: {"keywords":"apitest1,apitest2","allow_changes":1,"users":"john.doe"}

Options marked ** apply to Featured collections only

Return values

Returns false if access control fails or invalid arguments have been received (e.g ref not a number), true otherwise.