Expand my Community achievements bar.

SOLVED

map.publish nodes update/create using curl command

Avatar

Level 2

Hi Everyone,

I am writing curl command to create nodes ("http")  inside "etc/map.publish" but it's always updating the inside of "etc/map/".

Can someone help to create/update nodes inside of etc/map.publish both author & publish.

Publish

===========

curl -u admin:admin -F'sling:match=localhost.4503/xyz' -F'sling:internalRedirect=/content/abc/cde/xyz'  -F'jcr:primaryType=sling:Mapping' 'http://localhost:4503/etc/map.publish/http/xyz'

Response

===========

<html>

<head>

    <title>Content modified /etc/map/http/xyz</title>

</head>

    <body>

    <h1>Content modified /etc/map/http/xyz</h1>

    <table>

        <tbody>

            <tr>

                <td>Status</td>

                <td><div id="Status">200</div></td>

            </tr>

            <tr>

                <td>Message</td>

                <td><div id="Message">OK</div></td>

            </tr>

            <tr>

                <td>Location</td>

                <td><a href="https://forums.adobe.com/etc/map/http/xyz" id="Location">/etc/map/http/xyz</a></td>

            </tr>

            <tr>

                <td>Parent Location</td>

                <td><a href="https://forums.adobe.com/etc/map/http" id="ParentLocation">/etc/map/http</a></td>

            </tr>

            <tr>

                <td>Path</td>

                <td><div id="Path">/etc/map/http/xyz</div></td>

            </tr>

            <tr>

                <td>Referer</td>

                <td><a href="" id="Referer"></a></td>

            </tr>

            <tr>

                <td>ChangeLog</td>

                <td><div id="ChangeLog">&lt;pre&gt;modified(&quot;/etc/map/http/xyz/sling:match&quot;);&lt;br/&gt;modified(&quot;/etc/map/http/xyz/sling:internalRedirect&quot;);&lt;br/&gt;&lt;/pre&gt;</div></td>

            </tr>

        </tbody>

    </table>

    <p><a href="">Go Back</a></p>

    <p><a href="https://forums.adobe.com/etc/map/http/xyz">Modified Resource</a></p>

    <p><a href="https://forums.adobe.com/etc/map/http">Parent of Modified Resource</a></p>

    </body>

</html>

Above curl command is not working for author & publish environments and it's always updating the etc/map/http.

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi Sreekanth,

  Make sure the node "/etc/map.publish/http/xyz" exists to update the property.  Since node does not exist it is resolving to /etc/map.

Thanks,

View solution in original post

1 Reply

Avatar

Correct answer by
Level 9

Hi Sreekanth,

  Make sure the node "/etc/map.publish/http/xyz" exists to update the property.  Since node does not exist it is resolving to /etc/map.

Thanks,