7.4.3 GA88 - REST APIs definitions of a Object as .json or .yaml format.

thumbnail
Ivano Carrara, modified 1 Year ago. Expert Posts: 350 Join Date: 7/3/05 Recent Posts

Please can you tell me why if I request the <some-rest-service>.json file from the /o/api page I receive the <Forbidden/> response even if I'm logged in?

I can use all the other REST methods from this page but I cannot request the swagger-like definition of a REST service.

I have generated an Object and I can use the REST API but I cannot find the definitions of these APIs in the form of .json or .yaml files.

​​​​​​​I'm testing using Liferay Portal CE 7.4.3 GA88.



​​​​​​​

Ivano Carrara, modified 11 Months ago. New Member Posts: 24 Join Date: 6/13/23 Recent Posts

Hello carrara,

Being authenticated doesn't make you authorized to access the objects.

Try using an API client like postman and use GET method for your URL and make an authenticated request, You will receive a JSON format response if the role has permissions to access that specific object.

(OR)

Go to your Role > Define Permissions > Site and Asset Library Administration > Application > CLICK_ON_YOUR_OBJECT, Check and Define permissions for the object for that particular role and Try above step again from your API client.

Thanks,

Vinoth Kumar

thumbnail
Ivano Carrara, modified 1 Year ago. Expert Posts: 350 Join Date: 7/3/05 Recent Posts

Hello Vinoth, thank you very much for your help.