Perform attributes
| /pim/attributes/perform Deletes attributes. |
Allow to
-
Delete attribute definition by id
Resource path |
/api/core/v1/pim/attributes/perform |
HTTP method |
POST |
Request content type |
|
Response content type |
|
Body parameters
Accepts PimType with ActionsType.
Return Type
PimType with statuses ResponsesType about each performed attribute.
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with filled ResponsesType |
|
400 |
Invalid input provided |
|
401 |
Not authorized |
|
404 |
Not found |
|
500 |
An unknown internal error occurred |
Samples
1. Delete attribute by id
curl
curl --location 'http://<OMN_SERVER>/api/core/v1/pim/attributes/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-06-04T10:10:16.774Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<actions>
<action dataType="attribute" id="98756" type="delete"/>
</actions>
</pim>'
Request body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2022-06-04T10:10:16.774Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<actions>
<action dataType="attribute" id="98756" type="delete"/>
</actions>
</pim>
Response body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-14T11:29:11.613Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="delete" dataType="attribute" id="98756">
<description>Attribute definition has been deleted successfully</description>
<status>SUCCESS</status>
</response>
</responses>
</pim>
Error response examples
The attribute does not exist
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-14T11:37:25.990Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response action="delete" dataType="attribute" id="45260">
<description>Attribute not found with given id</description>
<status>ERROR</status>
</response>
</responses>
</pim>
The attribute id is missing in request
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
<meta>
<itm key="messageType">request</itm>
<itm key="messageTime">2023-02-14T11:37:25.990Z</itm>
<itm key="sourceEnv">web</itm>
</meta>
<responses>
<response dataType="attribute" action="delete">
<status>ERROR</status>
<description>"Attribute 'id' is required to process attribute deletion"</description>
</response>
</responses>
</pim>