Perform attributes

/pim/attributes/perform Deletes attributes.

Allow to

  1. Delete attribute definition by id

Table 1. Details

Resource path

/api/core/v1/pim/attributes/perform

HTTP method

POST

Request content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Response content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Body parameters

Accepts PimType with ActionsType.

Return Type

PimType with statuses ResponsesType about each performed attribute.

Responses
Table 2. Http response codes
Code Message Datatype

200

PimType with filled ResponsesType

PimType

400

Invalid input provided

ResponseType

401

Not authorized

ResponseType

404

Not found

ResponseType

500

An unknown internal error occurred

ResponseType

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>

Welcome to the AI Chat!

Write a prompt to get started...