I need to elaborate de URL that will bring all products with certain attribute_set_id through Magento 2 Rest api, and then change though the api the attribute_set_id of all those items. My problem comes on getting the URL to work to get the list of products. I get an empty array from the following code (and for sure attribute_set_id 14 exists and I have products with that attribute_set_id in my catalog).

$ch = curl_init($url."products?searchCriteria[page_size]=&

Any clue? Thanks


There where many errors in the initial post. Here is my solution.

$ch = curl_init($url."products?searchCriteria[filter_groups][0][filters][0][field]=attribute_set_id&

It has some syntax corrections and did it ALL IN ONE LINE.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.