Liferay Admin Sites Headless API return badrequest error

Hi Team,

I am using Liferay DXP 2026 Q1. I am trying to get site pages of a particular site

http://localhost:8080/o/headless-admin-site/v1.0/sites/INSUREDIGITA/site-pages
curl -X 'GET' \
  'http://localhost:8080/o/headless-admin-site/v1.0/sites/INSUREDIGITA/site-pages' \
  -H 'accept: application/json' \
  -H 'x-csrf-token: ClbtCadp'

I have used ERC from site setting of the site, anything that I am missing ??, one thing I noted all API are still in beta .

Thanks

2 Answers

2

Hello @yogesh.chandra

Have you enabled Page Management API (LPD-35443) feature flag [Instance Settings > Feature Flags (Beta)]?

Regards,

Arun

Thanks Arun, After enabling feature flag it worked.

Hi Yogesh,

You need to enable the feature flag Page Management API (LPD-35443) to use this Headless API.

Otherwise, you can use the following API to retrieve all site pages:

curl -X GET
‘``http://localhost:8080/o/headless-delivery/v1.0/sites/{siteId}/site-pages’``
-u ``test@liferay.com``:a
-H ‘accept: application/json’

Please review and let us know if you have any questions.