0
votes

I am trying to test simple api hit with marklog following this tutorial

https://help.marklogic.com/Knowledgebase/Article/View/453/17/using-postman-to-work-with-marklogic-rest-endpoints

This is my http request http://localhost:8000/LATEST/config/properties

the response is 404 unauthorized

I have uninstalled and installed again marklogic server still no help. I doubled check with every online material but of no use.

2
just to confirm, you actually replace 'latest' with a value, right? like 'v1' - Tamas
also, to confirm, do you use a valid username/password combination? - Tamas
@Tamas: latest works too.. - grtjn
@grtjn wow, really? :-) - Tamas
Correction, it has to be LATEST. But yes, that does work.. - grtjn

2 Answers

3
votes

You are making requests to the admin server port 8001, which is used for the UI but does not have the REST services installed/enabled.

Try making the request to a REST server, such as port 8000, as the article suggests: http://localhost:8000/LATEST/config/properties

0
votes

By Default

  • Port 8000 is used by Queryconsole in Marklogic.
  • Port 8001 is used by admin console in Marklogic.

For developing REST end point, you need to create new http app server in Marklogic. Follow this simple tutorial: https://developer.marklogic.com/learn/tutorials/web-services

Then while calling the webservice from POSTMAN, you need to put PORT Number which you used while creating web server.