In this recipe, we will export the sitemap page managed resource from the portal using the CLI.
The following are required for this recipe:
To export the sitemap page from the portal:
> ssh -p 2000 root@localhost
> mgmt connect
> export --file /tmp --filter site-name:classic;page-name:sitemap;nav-uri:sitemap /mop
/tmp
with a filename of mop_timestamp.zip
will show the following contents:Step 6 executes the export
command on the mop
managed resource, with filters on the site-name
, page-name
, and nav-uri
. Filtering on site-name
will restrict the contents of the ZIP file to the site specified, in this case classic. Filtering on page-name
and nav-uri
with the value sitemap
will restrict the content of pages.xml
and navigation.xml
to those entries related to the sitemap pages and navigation configuration.
Now we will see how to achieve the same outcome using the RESTful interface.
The CLI commands used in this recipe to export a ZIP file that contains the sitemap page and navigation are equivalent to the following REST URLs:
http://localhost:8080/rest/private/managed-components/mop/portalsites/classic.zip?filter=page-name:sitemap;nav-uri:sitemap
http://localhost:8080/rest/private/managed-components/mop.zip?filter=site-name:classic;page-name:sitemap;nav-uri:sitemap
18.117.138.178