Calling public REST API in Java

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Calling public REST API in Java

I would like to use Alfresco REST API WebScript method in my Java code.

For example there is method getNodeContent: https://api-explorer.alfresco.com/api-explorer/#!/nodes/getNodeContent 

I need to wrap Alfresco out-of-the-box WebScript with custom functionality. But I cannot find how to call Java method that is used by REST API.

1 Reply
Highlighted
Established Member

Re: Calling public REST API in Java

If all you need is the content of given node then you can refer Alfresco documentation on given link

contentService.getReader(nodeRef, ContentModel.PROP_CONTENT);

The above method will return content for the node which you pass to the method.