Create a headless API to retrieve the segments of a given site.
To try this:
- Ticket: https://issues.liferay.com/browse/LPS-93944
- Class: https://github.com/liferay/liferay-portal/blob/master/modules/apps/headless/headless-admin-user/headless-admin-user-test/src/testIntegration/java/com/liferay/headless/admin/user/resource/v1_0/test/SegmentResourceTest.java
- If the user introduces the wrong endpoint, 404 error shows up.
- If the user introduces the wrong credentials to the request, 403 error shows up.
- If the user introduces a wrong siteId, 404 error shows up with this message: Unable to get a valid site with ID 12345.
- As an admin user, I can list all the segments of a site.
- As a regular user, if I don't have permissions to see the segments lists, I can' list all the segments of a site.