Issue
- Using Liferay's headless-delivery API, it’s not possible to retrieve Collections' (referred as ContentSets in the API) names.
-
The user wants to retrieve the collection by its name. There is a similar feature for web contents, where it is possible to search over all content structures and filter by name, via this route:
/o/headless-delivery/v1.0/sites/{0}/content-structures?filter="name eq ''{1}''" -
There isn’t a similar route for content sets. The closest seems to be this one, which requires knowing the ID already:
headless-delivery/v1.0/content-sets/{0}/content-set-elements -
Basically, the user wishes the following route existed:
headless-delivery/v1.0/content-sets/
Environment
- Liferay DXP 7.0+
Resolution
-
The user has a workaround to use the collection's ID directly. However it has the below inconvenience:
-
It is environment-dependent. While the requested approach would allow them to define an environment variable with an identical value across all environments, here instead they will need to create the collection first in each environment, find out the ID, and define an environment variable that has no business meaning, and is different in each environment.
-
If their webmasters ever delete the collection, they will need to repeat the process again and redeploy their app.
- A feature request is submitted to analyze a possible change in the future: LPD-42014. To track the status of the request, please inquire about it at Liferay Ask.
-