Perform directories

/dam/dirs/perform Perform action of the specific type on directory
Table 1. Details

Resource path

/api/core/v1/dam/dirs/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

PimType with filled ActionsType

Provided ActionTypes must have the following fields:

  • Data type: dir;

  • tid, id or path of directory;

  • Action type: delete, move, copy, createPath.

Return Type

PimType with filled ResponsesType

Responses
Table 2. Http response codes
Code Message Datatype

200

PimType with list of successful or error ResponseTypes

PimType

400

Invalid input provided

ResponseType

401

Not authorized

ResponseType

404

Not found

ResponseType

500

An unknown internal error occurred

ResponseType

Samples
Please use transform endpoint to get the JSON/compact-JSON samples from the XML one.
1. Delete directory
1.1. Delete by tid
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/dam/dirs/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?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="dir" tid="730DD2AE-3AEA-4A13-9C3A-C6EC3C94ADCE" 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="dir" tid="730DD2AE-3AEA-4A13-9C3A-C6EC3C94ADCE" 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-12-09T11:39:25.555Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir"
                tid="51F78647-63AE-4F3E-8D4B-664E070C6AA2"
                action="delete">
            <status>SUCCESS</status>
            <description>The directory has been deleted successfully</description>
        </response>
    </responses>
</pim>
2. Move directory
2.1. Move by tid
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/dam/dirs/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?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-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="dir" tid="E769ABBC-9AFC-47F2-8983-8DB40610937B" type="move">
        <meta>
            <itm key="destinationDirTid">EEB36E10-5B45-492A-BAB5-5737DDCC9B12</itm>
            <itm key="overwrite">false</itm>
        </meta>
        </action>
    </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-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="dir" tid="E769ABBC-9AFC-47F2-8983-8DB40610937B" type="move">
        <meta>
            <itm key="destinationDirTid">EEB36E10-5B45-492A-BAB5-5737DDCC9B12</itm>
            <itm key="overwrite">false</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-18T06:22:10.069Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir"
                tid="E54AC373-09D8-478D-B201-9775D046EF4F"
                id="23902"
                action="move"
                path="/MAM/dirToMove">
            <status>SUCCESS</status>
            <description>dir has been moved</description>
            <details>
                <itm key="monitorId">23955</itm>
            </details>
        </response>
    </responses>
</pim>
2.2. Move by id
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/dam/dirs/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?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-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="dir" id="23901" type="move">
        <meta>
            <itm key="destinationDirId">23900</itm>
            <itm key="overwrite">false</itm>
        </meta>
        </action>
    </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-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="dir" id="23901" type="move">
        <meta>
            <itm key="destinationDirId">23900</itm>
            <itm key="overwrite">false</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-18T06:22:10.069Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir"
                tid="E54AC373-09D8-478D-B201-9775D046EF4F"
                id="23902"
                action="move"
                path="/MAM/dirToMove">
            <status>SUCCESS</status>
            <description>dir has been moved</description>
            <details>
                <itm key="monitorId">23955</itm>
            </details>
        </response>
    </responses>
</pim>
2.3. Move by path
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/dam/dirs/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?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-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="dir" path="/MAM/dirToMove" type="move">
        <meta>
         <itm key="destinationDirPath">/MAM/destinationDir</itm>
         <itm key="overwrite">false</itm>
        </meta>
        </action>
    </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-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="dir" path="/MAM/dirToMove" type="move">
        <meta>
         <itm key="destinationDirPath">/MAM/destinationDir</itm>
         <itm key="overwrite">false</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-18T06:22:10.069Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir"
                tid="E54AC373-09D8-478D-B201-9775D046EF4F"
                id="23902"
                action="move"
                path="/MAM/dirToMove">
            <status>SUCCESS</status>
            <description>dir has been moved</description>
            <details>
                <itm key="monitorId">23955</itm>
            </details>
        </response>
    </responses>
</pim>
Error responses
Destination directory 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">2022-08-18T06:27:00.349Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir" action="move" path="/MAM/dirToMove">
            <status>ERROR</status>
            <description>The directory does not exist</description>
        </response>
    </responses>
</pim>
No access to destination directory
<?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-18T07:00:03.303Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir"
                tid="4E1D4697-5085-4BDA-80CE-8DDCEAA9E584"
                id="23905"
                action="move"
                path="/MAM/dirToMove">
            <status>ERROR</status>
            <description>Error during moving: No access to destination object '/destinationDir'</description>
        </response>
    </responses>
</pim>
Collision during move
<?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-18T06:22:10.069Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir"
                tid="E54AC373-09D8-478D-B201-9775D046EF4F"
                id="23902"
                action="move"
                path="/MAM/dirToMove">
            <status>ERROR</status>
            <description>Collision during move. Collision dir name:'dirToMove'</description>
            <details>
                <itm key="collision">true</itm>
                <itm key="monitorId">77835</itm>
            </details>
        </response>
    </responses>
</pim>
3. Copy directory
3.1. Copy by tid
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/dam/dirs/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?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-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="dir" tid="957836F4-840A-492B-B149-9720D177BC56" type="copy">
        <meta>
         <itm key="destinationDirTid">957836F4-840A-492B-B149-9720D177BC59</itm>
         <itm key="overwrite">false</itm>
        </meta>
        </action>
    </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-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="dir" tid="957836F4-840A-492B-B149-9720D177BC56" type="copy">
        <meta>
         <itm key="destinationDirTid">957836F4-840A-492B-B149-9720D177BC59</itm>
         <itm key="overwrite">false</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-19T11:54:34.959Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir"
                tid="957836F4-840A-492B-B149-9720D177BC56"
                id="72030"
                action="copy"
                path="/MAM/demo/copies/tempAR">
            <status>SUCCESS</status>
            <description>dir has been copied</description>
            <details>
                <itm key="monitorId">79851</itm>
            </details>
        </response>
    </responses>
</pim>
3.2. Copy by id
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/dam/dirs/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?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-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="dir" id="3221749" type="copy">
        <meta>
         <itm key="destinationDirId">2376394</itm>
         <itm key="overwrite">false</itm>
        </meta>
        </action>
    </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-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="dir" id="3221749" type="copy">
        <meta>
         <itm key="destinationDirId">2376394</itm>
         <itm key="overwrite">false</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-19T11:54:34.959Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir"
                tid="957836F4-840A-492B-B149-9720D177BC56"
                id="72030"
                action="copy"
                path="/MAM/demo/copies/tempAR">
            <status>SUCCESS</status>
            <description>dir has been copied</description>
            <details>
                <itm key="monitorId">79851</itm>
            </details>
        </response>
    </responses>
</pim>
3.3. Copy by path
curl
curl --location --request POST 'http://<OMN_SERVER>/api/core/v1/dam/dirs/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?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-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="dir" path="/MAM/demo/copies/tempAR" type="copy">
        <meta>
         <itm key="destinationDirPath">/MAM/</itm>
         <itm key="overwrite">false</itm>
        </meta>
        </action>
    </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-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="dir" path="/MAM/demo/copies/tempAR" type="copy">
        <meta>
         <itm key="destinationDirPath">/MAM/</itm>
         <itm key="overwrite">false</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-19T11:54:34.959Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir"
                tid="957836F4-840A-492B-B149-9720D177BC56"
                id="72030"
                action="copy"
                path="/MAM/demo/copies/tempAR">
            <status>SUCCESS</status>
            <description>dir has been copied</description>
            <details>
                <itm key="monitorId">79851</itm>
            </details>
        </response>
    </responses>
</pim>
Error responses
Destination directory 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">2022-08-18T06:27:00.349Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir" action="copy" path="/MAM/dirToCopy">
            <status>ERROR</status>
            <description>The directory does not exist</description>
        </response>
    </responses>
</pim>
No access to destination directory
<?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-18T07:00:03.303Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir"
                tid="4E1D4697-5085-4BDA-80CE-8DDCEAA9E584"
                id="23905"
                action="copy"
                path="/MAM/dirToCopy">
            <status>ERROR</status>
            <description>Error during moving: No access to destination object '/destinationDir'</description>
        </response>
    </responses>
</pim>
Collision during copy
<?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-19T12:46:31.213Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir"
                tid="957836F4-840A-492B-B149-9720D177BC56"
                id="72030"
                action="copy"
                path="/MAM/demo/copies/tempAR">
            <status>ERROR</status>
            <description>Collision during copy. Collision dir name:'tempAR'</description>
            <details>
                <itm key="collision">true</itm>
                <itm key="monitorId">79856</itm>
            </details>
        </response>
    </responses>
</pim>
3. Create path (multiple directories)
3.1. Create by path
Request body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="dir" path="/MAM/test2/1" type="createPath"/>
    </actions>
</pim>
Response body (Info about the last/deepest created directory only)
<?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-10-19T11:35:25.013Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response action="create" dataType="dir" tid="0E680AA4-5749-46FB-8A46-02282E37BAC1">
            <description>The directory has been saved successfully</description>
            <status>SUCCESS</status>
        </response>
    </responses>
</pim>
Common error responses
Directory 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">2022-06-04T13:36:54.983Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir"
                tid="37590039-3AEA-4A13-9C3A-C6EC3C94ADCE2"
                action="delete">
            <status>ERROR</status>
            <description>Cannot find directory with tid '37590039-3AEA-4A13-9C3A-C6EC3C94ADCE2'</description>
        </response>
    </responses>
</pim>
Wrong request data type
<?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="asset"
                tid="37590039-3AEA-4A13-9C3A-C6EC3C94ADCE2"
                action="delete">
            <status>ERROR</status>
            <description>The data type of the passed item is wrong. It must be 'dir'</description>
        </response>
    </responses>
</pim>
No access to directory
<?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-18T07:04:12.515Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir"
                tid="4E1D4697-5085-4BDA-80CE-8DDCEAA9E584"
                id="23905"
                action="move"
                path="/MAM/dirToMove">
            <status>ERROR</status>
            <description>Error during moving: No access to source objects</description>
        </response>
    </responses>
</pim>

Welcome to the AI Chat!

Write a prompt to get started...