Is there any way to assign attribute to attribute group through REST API(http://devdocs.magento.com/swagger/index_20.html)?
I can assign attribute group to attribute set, but did not find way assign attribute to attribute group. Any ideas?
I know this is old, but i thought I'd share my answer for fellow googler's. I stumbled across this question when searching for a way to check if an attribute has already been assigned to a group. If anybody has an answer I'd love to hear it!
The Endpoint, CatalogProductAttributeManagementV1 (https://yourmagentohost.com/rest/{all|default}/V1/products/attribute-sets/attributes), is described in Magento 2 Swagger Doc as having a POST'ing method that will assign an attribute to an attribute set.
However, it fails to mention that it also assigns the attribute to a group at the same time using the attributeGroupId property:
Implementation Notes
Assign attribute to attribute set
Body (Content in POST)
{
"attributeSetId": 0,
"attributeGroupId": 0,
"attributeCode": "string",
"sortOrder": 0
}
Response
"integer as string?"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With