0

I am new to magento2 and learning using rest API of magento2.

I want all products to attribute that is present in the database. I searched in the database and I found that the table eav_attribute contains all attrs.

I would like to retrieve all these attributes using rest API. I have tried the following endpoints:

rest/V1/products/attribute-sets//attributes
rest/V1/eav/attribute-sets/list?searchCriteria... field attribute_set_name
rest/V1/eav/attribute-sets/list?searchCriteria... field entity_entry_id

and more others but I am not able to find.

I have tried this too. rest/V1/products/attribute-sets/9/attributes but I don't get all attributes. I.e the color attribute available in Magento admin but I can't get using rest api.

Please, can you help me?

  • are you working with Default Attribute set ? – Pawan Nov 5 '18 at 3:48
  • no, but I got what I wanted lol. – Phoenix404 Nov 5 '18 at 9:25
0

What I wanted I achieved by this endpoint /rest/V1/products/attributes

and using this search Criteria

$params= ['searchCriteria' => 
               ['filterGroups' => 
                        [0 => [
                             'filters' => [ 
                                         0 => [ 
                                            'field' => 'attribute_id', 
                                            'value' => 1, 
                                            'condition_type' => 'gteq' 
]
        ]]]]];

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.