Perform actions on classification nodes
| /pim/nodes/perform Deletes nodes. |
Available action types:
-
Delete
Resource path |
/api/core/v1/pim/nodes/perform |
HTTP method |
POST |
Request content type |
|
Response content type |
|
Body parameters
PimType with ActionTypes
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:
-
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) |
| 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. |
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with filled ResponsesType. |
|
400 |
Invalid input provided |
|
500 |
An unknown internal error occurred |
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>'
<?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>
<?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>
<?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
<?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>
<?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>
<?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>