Perform actions on classification nodes

/pim/nodes/perform Deletes nodes.

Available action types:

  1. Delete

Table 1. Details

Resource path

/api/core/v1/pim/nodes/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 be provided. Possible values:

  1. delete

ActionType's dataType is - classNode

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 (e.g. tid or id or path)

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

id

X

X G1

Long

id of the node that should be deleted

path

X

X G1

string

path of the node that should be deleted

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/nodes/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="classNode" id="759365" 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="classNode" id="759365" type="delete"/>
    </actions>
</pim>
Request body. By path
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="classNode" path="/Root/Node1/Node1.1/" 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="classNode"
                id="759365"
                action="delete">
            <status>SUCCESS</status>
            <description>The node has been deleted successfully</description>
        </response>
    </responses>
</pim>
Error responses
No node 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="classNode"
                id="4444"
                action="delete">
            <status>ERROR</status>
            <description>There is no node with the given path or id</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="classNode"
                id="4444"
                action="delete">
            <status>ERROR</status>
            <description>The node could not be deleted. Reason: {errormessage}</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-10-11T12:14:28.978Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="classNode">
            <status>ERROR</status>
            <description>Nodes delete API is restricted for the user</description>
        </response>
    </responses>
</pim>

Welcome to the AI Chat!

Write a prompt to get started...