Example code is provided by a community of developers. They are intended to help you get started more quickly, but are not guaranteed to cover all scenarios nor are they supported by Arc XP.
These examples are licensed under the MIT license: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Reiterated from license above, all code in this example is free to use, and as such, there is NO WARRANTY, SLA or SUPPORT for these examples.
Notes:
- pb-data is a database snapshot of PageBuilder data, taken every 12 hours.
- Mongodb Tools: https://www.mongodb.com/docs/database-tools/installation/installation-macos/
- Duckdb CLI https://duckdb.org/docs/api/cli/overview.html#installation
- Make sure you install the dependencies that
bsondump
andduckdb
commands are present in your current bash session. - First, download the pb-data from Arc XP Admin > PageBuilder > Developer Tools > PB Data screen, to your local computer.
- Unzip the downloaded tar file, and rename the folder as
pb-data
and place it in this projects root folder. - Run
sh _prepare.sh
command to create temp database file (duckdb file) that contains the simplified views that is used in different shell scripts. These views are not copying the actual data, they are just views referring to the actual JSON files converted from mongodb bson files. - Run any of the shell script. These scripts are plain and simple, you can read the code to understand what the parameters, or add
-h
argument to the scripts to see help text for each one of them (i.e:sh find-pages-by-feature-name.sh -h
)
The video and tutorial can be found in "How to check feature/content-source usage using pb-data analysis scripts" ALC documentation.
produces list of all features used in your pb-data (not bundle), in published pages and templates along with how many pages they are used in and the number of times (instances) they are used in these pages.
requires -n
parameter with a feature name that will print list of pages and templates which uses this feature.
You can open pagebuilder editor with the following url template with the page or template id in the query string: https://YOURORG.arcpublishing.com/pagebuilder/editor/curate?p=PAGEID
List of all content sources, from both global content source configurations (from resolvers) and feature configurations. This script does NOT have csv export option.
Lists all published pages with their URIs. Note: This script lists only pages and not templates. Templates are powered by dynamic URL patterns from resolvers and are not included in this script's output.
List all pages with URI containing the provided filter.
Describes contents of a page or template by it's id provided by -i
argument.
This script shows meta data of this page (uri, title), list of features, sorted by how many times used in the page/template, and the content sources configured from features.