Resource functions
Collection functions
Search functions
IIIF
Metadata functions
User functions
System
Message functions
Plugin functions
Share functions
Tab functions
Dash functions

collection_add_resources

Add resources to a collection.

NOTE: Only available via the native API auth mode. 

Variable Description Data type
$collection
The ID of the collection. integer
$resources Resource ID/s to add to the collection. Can be a single resource ID, a comma separated list of IDs or an array of IDs.  mixed
$search Specify a search query for the desired resources. string
$selected Set to true to add all the resources that have currently been "selected" on the search results page. bool

Return values

True on operation success or an error message on failure.