Using the content hall API to look for a document type throughout the entire CMS

At a client where I’m currently working there is a use-case where they want an overview of all their articles. These articles are all of a custom type called “articleDocument”.

Using the content hall API to query for these documents ex:

<CMS_URL>/site/<CHANNEL_NAME>/halapi/common:articledocument

The problem is that these articleDocuments that are returned only exist within that specific CHANNEL_NAME.

I want to know: “Is there a way to use a single query to retrieve ALL the articledocuments throughout the entire CMS in one ContentHall API call?”.

" “Is there a way to use a single query to retrieve ALL the articledocuments throughout the entire CMS in one ContentHall API call?”."

You can create a HST site which has documents as a root node, and create a REST mount pointing to that site. That will have a scope of all documents…

Hi Machak,

Could you correct me if I followed your suggestion the wrong way?

I introduced a new HST site called “documents” which has /content/documents as a root node. This HST site has a HAL api configured. The hst:mountsite value is the hst:root’s hst:alias.

As expected, the HAL api results with documents that reside in hst:root channel generate the correct self-link and site-link. However, the document results that reside in other channels cannot generate a site-link, only a self-link.

I’m assuming this is by design and we are trying to build something against the CMS architectural principles. Or am I doing something wrong?

Many thanks!

Greetings,
Eric Theunissen