bosari
bosari

Reputation: 2000

401 Unauthrorized response while creating a Rest API instance?

I'm trying to send a POST request on http://xyz:8002/LATEST/rest-apis using Firefox's rest client. I have added two headers Content-Type: application/xml and Authorization:Basic which I selected using the dropdown UI. The body of the request is -

<rest-api xmlns="http://marklogic.com/rest-api">
  <name>Status Dashboard</name>
  <database>r75-xyz-v11</database>
  <port>8020</port>
</rest-api>

In response I'm getting a 401 Unauthoried.

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>401 Unauthorized</title>
    <meta name="robots" content="noindex,nofollow"/>
  </head>
  <body>
    <h1>401 Unauthorized</h1>
  </body>
</html>

I have Admin rights and I gave the same credential in the UI box that came after selecting authentication basic.

Upvotes: 0

Views: 795

Answers (1)

ehennum
ehennum

Reputation: 7335

Is port 8002 configured for BASIC or DIGEST (the default) authentication?

By the way, I don't think the name of the appserver can contain a space.

Upvotes: 2

Related Questions