Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: How to access Object Entries via REST API without authentication
Good Morning,
I am using DXP 7.4. I created an Object and added some entries.
Now I want to access the Objects Entries via REST API without being logged in.
I can access the endpoint but it only delivers empty fields:
{
"actions" : { },
"facets" : [ ],
"items" : [ ],
"lastPage" : 1,
"page" : 1,
"pageSize" : 20,
"totalCount" : 0
}
I tried creating a Service Access Policy but it did not seem to change anything.
How can I get the entries from the API without being authenticated?
Best Regards
Adrian
Hey Adrian,
I tried creating a Service Access Policy but it did not seem to change anything.
A. You don't need to create a SAP because it already
existsimage_1
How can I get the entries from the API without being authenticated?
A. You need to give VIEW permission for Guest role,
unauthenticated users always have this role.Under the hood when we're
requesting object entries it will check if the user has permission to
VIEW that object entry otherwise that entry won't be displayed in the
response.Request without VIEW permission: image_2 and image_3Request
with VIEW permission:image_4 and image_5In this case I gave an
individial permission for Guest users VIEW this object entry (43989)More about Role and Permissions
Thank you!
Powered by Liferay™