Perform actions on peos

/peo/peos/perform Perform different types of actions on peos (delete/copy)

Available action types:

  1. Delete

  2. Copy

Table 1. Details

Resource path

/api/core/v1/peo/peos/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

Some actions require additional info that should be provided in MetaType in key/value way.

ActionType's type is required and must be provided. Possible values:

  1. delete

  2. copy

ActionType's dataType is - peo

Tip: .Tables legend "As <action> attribute" describes, that parameter is in the xml attribute of <action> tag. Otherwise, parameter should be in ItemType.

"Required groups" - one of parameter in the one group is required e.g. entity identifier (tid or id)

Table 2. Delete and Copy actions parameters
Parameter Name As <action> attribute Required Type Description Format

id

X

X G1

Long

id of the peo that should be deleted or copied

tid

X

X G1

string

tid of the peo that should be deleted or copied

Return Type

PimType with filled ResponsesType

Response types contains status information about each action passed to perform.

Responses
Actions are processed separately. Exceptions thrown during the execution of actions will be reported in ResponseType.
Table 3. Http response codes
Code Message Datatype

200

PimType with filled ResponsesType.

PimType

400

Invalid input provided

ResponseType

500

An unknown internal error occurred

ResponseType

Samples
Please use transform endpoint to get the JSON/compact-JSON samples from the XML one.
Delete
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/products/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="peo" tid="7D534991-B623-418C-A7CB-A273C877A37D" type="delete"/>
    </actions>
</pim>'
Request body. By tid
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="peo" tid="7d534991-b623-418c-a7cb-a273c877a37d" type="delete"/>
    </actions>
</pim>
Request body. By id
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="peo" id="2364684" 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">2022-06-04T13:24:53.286Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="peo" tid="7d534991-b623-418c-a7cb-a273c877a37d" action="delete">
            <status>SUCCESS</status>
            <description>PEO has been deleted successfully</description>
        </response>
    </responses>
</pim>
Error responses
No peo by identifier
<?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-04T13:36:54.983Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="peo"
                tid="7d534991-b623-418c-a7cb-a273c877a37d"
                action="delete">
            <status>ERROR</status>
            <description>There is no peo with the given tid</description>
        </response>
    </responses>
</pim>
Exception during removing
<?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-04T13:38:16.444Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="peo"
                tid="7d534991-b623-418c-a7cb-a273c877a37d"
                action="delete">
            <status>ERROR</status>
            <description>PEO is not available by access rights</description>
        </response>
    </responses>
</pim>
Copy
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/products/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="peo" tid="ab6492-bc76439a-aaaa-aaaaa" type="copy">
            <meta>
                <itm key="name">PEO copy name</itm>
            </meta>
        </action>
    </actions>
</pim>'
Request body. By tid
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="peo" tid="ab6492-bc76439a-aaaa-aaaaa" type="copy">
            <meta>
                <itm key="name">PEO copy name</itm>
            </meta>
        </action>
    </actions>
</pim>
Request body. By id
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="peo" id="2364684" type="copy">
            <meta>
                <itm key="name">PEO copy name</itm>
            </meta>
        </action>
    </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">2022-08-15T13:37:04.635Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="peo"
                tid="64467fe8-863a-4fcd-ba4e-82914affb3f8"
                id="76890"
                action="copy">
            <status>SUCCESS</status>
            <description>peo has been copied</description>
        </response>
    </responses>
</pim>
Error responses
No peo by identifier
<?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-08-15T13:37:53.018Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="peo"
                tid="64467fe8-863a-4fcd-ba4e-82914affb3f8"
                id="76890"
                action="copy">
            <status>ERROR</status>
            <description>PEO does not exist</description>
        </response>
    </responses>
</pim>
No access to the endpoint action
<?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-04T13:38:16.444Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="peo" tid="7D534991-B623-418C-A7CB-A273C877A37D" action="copy">
            <status>ERROR</status>
            <description>PEO is not available by access rights</description>
        </response>
    </responses>
</pim>

Welcome to the AI Chat!

Write a prompt to get started...