Create and update directory in XML format

Request

The endpoint POST /dam/dirs/persist should contain the following XML body:

  • To create a directory in the given RNC:

<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <dirs>
        <dir rnc="MAM">
            <name>New Directory</name>
        </dir>
    </dirs>
</pim>
  • To create a directory (sub-directory) in the parent directory:

<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <dirs>
        <dir parent="483AAC0B-57F2-4B70-95F9-FF1DAD9AA9C6">
            <name>New Directory</name>
        </dir>
    </dirs>
</pim>
  • To update a directory in the given RNC:

<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <dirs>
        <dir tid="7D534991-B623-418C-A7CB-A273C877A37D" rnc="MAM">
            <name>Updated Directory</name>
        </dir>
    </dirs>
</pim>
  • To update a directory (sub-directory) in the parent directory:

<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <dirs>
        <dir tid="41A7CF7F-60DA-4F76-8288-D9721389812A" parent="778B4AFD-6EC5-45D8-95B4-DA2213243B77">
            <name>Updated Directory</name>
        </dir>
    </dirs>
</pim>

Response

  • It should be in OMN XML format;

  • It should contain "responses" tag. You can check it here: OMN XML: General.

  • To create a directory in the given RNC:

<?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-05-13T16:20:23.420Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir" tid="7D534991-B623-418C-A7CB-A273C877A37D" action="create">
            <status>SUCCESS</status>
            <description>The directory has been saved successfully</description>
       </response>
    </responses>
</pim>
  • To create a directory (sub-directory) in the parent 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-05-13T16:20:23.420Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir" tid="41A7CF7F-60DA-4F76-8288-D9721389812A" action="create">
            <status>SUCCESS</status>
            <description>The directory has been saved successfully</description>
      </response>
    </responses>
</pim>
  • To update a directory in the given RNC:

<?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-05-13T16:25:28.200Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir" tid="7D534991-B623-418C-A7CB-A273C877A37D" action="update">
            <status>SUCCESS</status>
            <description>The directory has been saved successfully</description>
       </response>
    </responses>
</pim>
  • To update a directory (sub-directory) in the parent 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-05-13T16:25:28.200Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="dir" tid="41A7CF7F-60DA-4F76-8288-D9721389812A" action="update">
            <status>SUCCESS</status>
            <description>The directory has been saved successfully</description>
      </response>
    </responses>
</pim>

HTTP response codes
200 - Persist successfull
401 - Not authorized
404 - Not found
400 - Invalid input
500 - Internal server error

Welcome to the AI Chat!

Write a prompt to get started...