0

I want to get a list of all attributes.

I know that domain.com/rest/V1/products/attributes/{{ATTRIBUTE_ID}}/options will grab an the attribute options, but how do i get a list of all attributes so I can know what all of the attribute_ids are?

(I don't really want to grab by attribute-set, I want all eav attributes, including all attributes that are not product attributes).

Edit: /rest/V1/products/attributes/?searchCriteria gets me close

Edit2: A quick look at /Magento/Eave/etc/webapi.xml is leaving me thinking this is not something that can be done out of the box.

1

All Category Attributes

https://example.com/rest/V1/categories/attributes?searchCriteria[sortOrders][0][field]=attribute_id&searchCriteria[sortOrders][0][direction]=ASC

All Product Attributes

https://example.com/rest/V1/products/attributes?searchCriteria[sortOrders][0][field]=attribute_id&searchCriteria[sortOrders][0][direction]=ASC

(Note: you will get attribute options within list API.no need to call for single attribute)

For Remaining you have to create custom there is no API for getting all EAV attributes

Eav

GET    /V1/eav/attribute-sets/list
GET    /V1/eav/attribute-sets/:attributeSetId

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.