I am creating product attributes using rest API with the below request body.
End point rest/V1/products/attributes/
{
"attribute": {
"is_wysiwyg_enabled": false,
"is_html_allowed_on_front": false,
"used_for_sort_by": false,
"is_filterable": true,
"is_filterable_in_search": true,
"is_used_in_grid": true,
"is_visible_in_grid": false,
"is_filterable_in_grid": true,
"position": 0,
"apply_to": [],
"is_searchable": "1",
"is_visible_in_advanced_search": "1",
"is_comparable": "1",
"is_used_for_promo_rules": "0",
"is_visible_on_front": "0",
"used_in_product_listing": "1",
"is_visible": true,
"scope": "global",
"attribute_code": "text_api_attribute",
"frontend_input": "text",
"entity_type_id": "4",
"is_required": false,
"is_user_defined": true,
"default_frontend_label": "Att Label updated",
"frontend_labels": null,
"backend_type": "int",
"default_value": "",
"is_unique": "0"
}
}
it's get created successfully but how can I assign this attribute to the attribute set.tried with group: General but its not defined in interface so it throw error.
also there is an error when try to update using PUTmethod rest/V1/products/attributes/rest/V1/products/attributes/
{
"message": "%1 already exists.",
"parameters": [
"Attribute with the same code"
]
}