Hello All,
I called http://hostname/rest/api/resourceIndex using REST Client in the following way, using Basic Auth
WebResource webResource = restClient.resource(URL);
ClientResponse response = webResource.accept("application/json") .header("Authorization", "Basic " + authStringEnc).get(ClientResponse.class);
The above service returns array of links, one of which is related to search collection
I modified the URL, startIndex=0&q=oracle and kept utoken as same
URL - http://hostname/rest/api/searchcollection?startIndex=0&q=oracle&utoken=IEwLCLvSnDFwO9ZL1t7g9tmqD-yPHskQQojfKfmkIYsz_w** (modified the template)
When i make the second call with search collection url like below
WebResource webResource = restClient.resource(URL);
ClientResponse response = webResource.accept("application/json") . get(ClientResponse.class);
It always returns 403 error. I tried adding Basic Auth header, but the same error.
But the same url woks fine in Postman and browser.
How to make the REST Call with utoken, should i deploy the application and run in context of portal.
Or can i run as independent application or java class.
Thanks
Praveen