Fork me on GitHub

Installing GREB API

Add Dependencies

Make sure you have the forge Maven2 repository reference and dependency definition in the root pom.xml of your project.


      <!-- SNIP -->

        <name>Hippo Maven 2 Forge repository</name>
        <snapshots />

      <!-- SNIP -->


In the main pom.xml of your project, add a new property in the properties section. For the correct version number for your project, check the Release Notes page.


Add the following dependency in the site/components/pom.xml:

Note: Since v2.0.1, the maven coordinates have been changed from com.onehippo.cms7:hippo-addon-generic-resource-entity-builder to org.onehippo.forge.greb-api:greb-api.

Now, you're ready to use the plugin!

Configure Delivery Tier Mount

Add an API mount, with hst:namedpipeline = GenericResourceEntitySitePipeline, like the following example (expressed in YAML format).

  jcr:primaryType: hst:mount
  hst:alias: grebapi
  hst:namedpipeline: GenericResourceEntitySitePipeline
  hst:nochannelinfo: true

After rebuilding the project and restarting the server, you will be able to use the GREB (Generic Resource Entity Builder) API right way.

Enabling Relevance in GREB Pipeline

By default, the Pipeline of GREB API is not configured with Relevance Module (i.e,


). If you have already installed Relevance Module in your project, you can also enable Relevance in GREP API Pipeline.

To configure Relevance in the Pipeline of GREP API, add a Spring bean assembly XML file (e.g, greb-targeting.xml) in site/components/src/main/resources/META-INF/hst-assembly/overrides/addon/com/onehippo/cms7/genericresource/entitybuilder/ folder like the following:

<?xml version="1.0" encoding="UTF-8"?>
<!-- greb-targeting.xml -->
<beans xmlns=""

  <bean class="">
    <constructor-arg value="java.lang.Void" />
    <property name="targetObject">
      <bean class="">
        <constructor-arg value="org.hippoecm.hst.core.container.Pipeline" />
        <property name="targetObject" ref="org.hippoecm.hst.core.container.Pipelines" />
        <property name="targetMethod" value="getPipeline" />
        <property name="arguments">
    <property name="targetMethod" value="addProcessingValve" />
    <property name="arguments">
        <bean class="com.onehippo.cms7.targeting.hst.container.TargetingUpdateValve"
              init-method="initialize" destroy-method="destroy">
          <property name="valveName" value="targetingUpdateValve" />
          <property name="afterValves" value="contextResolvingValve, localizationValve" />
          <property name="beforeValves" value="actionValve, resourceServingValve" />


CORS Support

If you want to add custom CORS related HTTP response headers or other security HTTP response headers on the GREB API mount, see the following pages: