Product Updates

Search by context metadata

Jan 30, 2017

You already know you can store key-value metadata with a resource in the Context object. Now you can also search for all resources with a specific context key or a key with a specific value. For example:

Finding all resources that have a key 'productType':


Copy to clipboard
// find all images that have the 'productType' key
api.resourcesByContext("productType", ObjectUtils.emptyMap());

Or more specifically, finding all resources that have a key 'productType' or finding all resources with 'productType' = 'dress':


Copy to clipboard
// find all videos that have the 'productType' key
api.resourcesByContext("productType", "dress", ObjectUtils.emptyMap());
← Back to all product updates