创建Rest API实例时,401 Unauthrorized响应?

时间:2017-12-04 10:01:04

标签: rest marklogic

我正在尝试使用Firefox的其余客户端在http://xyz:8002/LATEST/rest-apis上发送 POST 请求。我添加了两个标题 Content-Type:application / xml 授权:基本 ,我使用下拉列表选择了UI。请求正文是 -

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

作为回应,我获得了401 Unauthorizedied。

<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>

我拥有管理员权限,并且在选择基本身份验证后的UI框中提供了相同的凭据。

1 个答案:

答案 0 :(得分:1)

端口8002是否配置为BASIC或DIGEST(默认)身份验证?

顺便说一下,我认为appserver的名称不能包含空格。