Is it Possible to Access the Entire Document Hierarchy Page with API?


  • How to access the entire document hierarchy page using API?


  • All environments


  • By default, the GET Documents call in the Liferay API restricts access to the root page, preventing retrieval of the complete document hierarchy. To access the entire document hierarchy lies in incorporating the recursive=true parameter into the GET request for the /documents endpoint.
  • A possible example to achieve the desired behavior is to include the following API call:
    GET /headless-delivery/v1.0/sites/{siteId}/documents?flatten=true&recursive=true
  • Replace {siteId} with the ID of the desired site.
  • The flatten=true parameter presents the documents in a flat structure, simplifying navigation.
  • The recursive=true parameter ensures the query encompasses the entire folder hierarchy.

Additional Information


Este artigo foi útil?
Utilizadores que acharam útil: 1 de 1