Retrieve classification nodes
| /pim/nodes/retrieve Returns nodes structure with attributes. |
Resource path |
/api/core/v1/pim/nodes/retrieve |
HTTP method |
POST |
Request content type |
application/json |
Response content type |
|
| API restriction for users without admin role - endpoint is not available. |
Body parameters
Specified by NodesRequest
Return Type
PimType with filled ClassificationNodesType. Represents flatten tree structure
Responses
| Code | Message | Datatype |
|---|---|---|
200 |
PimType with list of nodes |
|
500 |
Error in ResponseType |
Samples
| Please use transform endpoint to get the JSON/compact-JSON samples from the XML one. |
Get a root node of the classification by tid/id
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/nodes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"classificationId": 18765
}'
Request body. By id
{
"classificationId": 18765
}
Request body. By tid
{
"classificationTid": "Standard"
}
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-09-27T12:41:38.795Z</itm>
<itm key="sourceEnv">web</itm>
<itm key="itemInformationType">node</itm>
</meta>
<nodes>
<node id="15270"
path="/"
tid="Standard">
<name/>
</node>
</nodes>
</pim>
Get children of node by path
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/nodes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"path": "/Root",
"level": 1
}'
Request body
{
"path": "/Standard",
"level": 1
}
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-09-27T12:41:38.795Z</itm>
<itm key="sourceEnv">web</itm>
<itm key="itemInformationType">node</itm>
</meta>
<nodes>
<node id="15271" parentId="15270" path="/Standard/Bekleidung" tid="Bekleidung">
<name/>
</node>
<node id="114740" parentId="15270" path="/Standard/Test" tid="Test">
<name/>
</node>
</nodes>
</pim>
Get nodes by ids
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/pim/nodes/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"ids": [114740]
}'
Request body
{
"ids": [114740]
}
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-09-27T12:41:38.795Z</itm>
<itm key="sourceEnv">web</itm>
<itm key="itemInformationType">node</itm>
</meta>
<nodes>
<node id="114740" parentId="15270" path="/Standard/Test" tid="Test">
<name/>
</node>
</nodes>
</pim>
Error responses
No path or id or classificationId in the request
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.apollon.de/omn">
<details>
<itm key="supportId">3de17988-a17c-4341-bf57-024753d636c8</itm>
</details>
<issues>
<itm key="code">1001</itm>
<itm key="description">Invalid input provided</itm>
<itms type="details">
<itm key="errorMessage">Path or ids array or classificationId should be provided to get nodes</itm>
</itms>
</issues>
<status>ERROR</status>
</response>
Level should not be 0
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.apollon.de/omn">
<details>
<itm key="supportId">1737617c-3718-411a-b113-5121d8b679bb</itm>
</details>
<issues>
<itm key="code">1001</itm>
<itm key="description">Invalid input provided</itm>
<itms type="details">
<itm key="errorMessage">The level should not be 0</itm>
</itms>
</issues>
<status>ERROR</status>
</response>