Creating Export Configs

Export configs can be created to customize JSON rendering.

You can create a configuration node under /apps/mobileapps/caas/exportConfigs.

Node NameName of the configuration (for rendering selector)
jcr:primaryTypent:unstructured

The following table shows the properties of Export Configs:

NameTypeDefault (if, not set)ValueDescription
includeComponentsString[]include everythingsling:resourceTypeexclude details for nodes with specified sling:resourceType from JSON export
excludeComponentsString[]exclude nothingsling:resourceTypeinclude details only for nodes with specified sling:resourceType from JSON export
excludePropertyPrefixesString[]exclude nothingProperty prefixesexclude properties that start with specified prefixes from JSON export
excludePropertiesString[]exclude nothingProperty namesexclude specified properties from JSON export
includePropertiesString[]include everythingProperty names

if excludePropertyPrefixes set
this includes specified properties despite matching the prefix being excluded,

else (exclude properties ignored) only include these properties

includeChildrenString[]include everythingchild namesexclude specified children from JSON export
excludeChildrenString[]exclude nothingchild namesinclude only specified children from JSON export, exclude other
renamePropertiesString[]rename nothing<actual_property_name>,<replacement_property_name>rename properties using replacements

Resource type export overrides

Create a configuration node under /apps/mobileapps/caas/exportConfigs.

nameresourceTypeOverrides
jcr:primaryTypent:unstructured

The following table shows the properties:

NameTypeDefault (if, not set)ValueDescription
<SELECTOR_TO_INC>String[]-sling:resourceTypeFor the following sling resource types, do not return the default CaaS json export.
Return a customer json export by rendering the resource as;
<RESOURCE>.<SELECTOR_TO_INC>.json

Existing Content Services Export Configs

Content Services include two export configurations:

  • default (no config specified)
  • page (to render site pages)

Default Export Configuration

Content Services default export configuration is applied if a config is specified in the requested URI.

<RESOURCE>.caas[.<DEPTH-INT>].json

NameValue
excludeProperties
excludePropertyPrefixesjcr:,sling:,cq:,oak:,pge-
includePropertiesjcr:text,text
jcr:title,title
jcr:description,description
jcr:lastModified,lastModified
cq:tags,tags
cq:lastModified,lastModified
includeComponents
excludeComponents
includeChildren
excludeChildren
Sling JSON Overridesfoundation/components/image
wcm/foundation/components/image
mobileapps/caas/components/data/contentReference
mobileapps/caas/components/data/assetlist

Page Export Configuration

This configuration extends the default to include grouping children under a child node.

<SITE_PAGE>.caas.page[.<DEPTH-INT>].json