Bringing It All Together
Search criteria and filters can be combined together to create a complex search query.
Let's say for example we want all the images in the category 'corporate' that are not in the category 'logos', have keyword 'hotel', are approved, and have a star rating of 3 or more stars.
GET /assets?filters=(AssetType+EQ+Image)+AND+(AverageRating+GE+3)+AND+
(Status+EQ+0)&search=categories:corporate+NOT+logos+AND+keyword:hotel
Additional Parameters
Additional parameters of count, offset and sort can be added to any search or filter
Some sort options are:
- Date Uploaded - record.createdAt+D
- Date Approved - file.approvedAt+D
- Date Modified - record.modifiedAt+D
- Date Expired - file.expiresAt+D
- File Name - file.fileName+D
- Size - file.sizeInBytes+D
- Title - title+D
Examples:
GET /assets?count=25&offset=0&search=pyramid&sort=record.createdAt+D
will return the first 25 assets with 'pyramid' sorted by date uploaded
GET /assets?count=25&offset=25&search=pyramid&sort=record.createdAt+D
will return the next 25 assets