0

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 Answers2

3

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

Mads Hansen
  • 63,927
  • 12
  • 112
  • 147
  • 1
    To add to this, the 404 Not Found response (which is different from 401 Unauthorized) was an indicator. It is a signal that MarkLogic didn't understand the uri you were trying to access. That is something you typically see if you mistakenly hit 8001, or for instance an XCC app server, instead of a REST app server.. – grtjn Apr 17 '18 at 17:55
  • I tried with 8000 too, and double checked realm and credentials but still same error – Uzair Aslam Apr 18 '18 at 06:09
0

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.

Vinayak Singh
  • 174
  • 2
  • 5