I want to use magento2 rest api of products to get list of details of products based on some criteria. For example -
http://localhost:8080/magento/index.php/rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=updated_at&searchCriteria[filter_groups][0][filters][0][value]=2016-06-01 10:38:52&searchCriteria[filter_groups][0][filters][0][condition_type]=gteq&fields=items[id,sku,name,price,created_at,updated_at,custom_attributes]
Above url get list of products whose updated date is after or equal to 2016-06-01 10:38:52. Here is the small part of sample output -
"items": [
{
"id": 54,
"sku": "MH01-XS-Orange",
"name": "Chaz Kangeroo Hoodie-XS-Orange",
"price": 52,
"created_at": "2016-06-01 10:38:52",
"updated_at": "2016-06-01 10:38:52",
"custom_attributes": [
{
"attribute_code": "description",
"value": "<p>Ideal for cold-weather training or work outdoors, the Chaz Hoodie promises superior warmth with every wear. Thick material blocks out the wind as ribbed cuffs and bottom band seal in body heat.</p>\n<p>• Two-tone gray heather hoodie.<br />• Drawstring-adjustable hood. <br />• Machine wash/dry.</p>"
},
{
"attribute_code": "image",
"value": "/m/h/mh01-orange_main.jpg"
},
{
"attribute_code": "small_image",
"value": "/m/h/mh01-orange_main.jpg"
},
{
"attribute_code": "thumbnail",
"value": "/m/h/mh01-orange_main.jpg"
},
{
"attribute_code": "color",
"value": "56"
},
{
"attribute_code": "options_container",
"value": "container2"
},
{
"attribute_code": "required_options",
"value": "0"
},
{
"attribute_code": "has_options",
"value": "0"
},
{
"attribute_code": "msrp_display_actual_price_type",
"value": "0"
},
{
"attribute_code": "url_key",
"value": "chaz-kangeroo-hoodie-xs-orange"
},
{
"attribute_code": "tax_class_id",
"value": "2"
},
{
"attribute_code": "size",
"value": "167"
}
]
},
I want to filter the output by some attribute code. for example i want to get Products with particular color , products with particular materials.
How can i do this?