0

While I'm executing the below code in the Query console I'm getting an "XDMP-INVAUTHMETH" error. We are using the authentication method at the application level in the HTTP app server. please help me resolve this issue.

xquery version "1.0-ml";
xdmp:http-put("http://example.com:8016/v1/documents?uri=my.xml",
     <options xmlns="xdmp:http">
       <authentication method="application-level">
         <username>xxxx</username>
         <password>yyyyy</password>
       </authentication>
       <headers>
         <Content-type>application/xml</Content-type>
         <Accept>application/xml</Accept>
       </headers>
     </options>,
     <mydata>this is xml for the PUT body</mydata>)

Error:

[1.0-ml] XDMP-INVAUTHMETH: xdmp:http-put("http://example.com:8016/v1/documents?uri=my.xml", ......, this is xml for the PUT body) -- Invalid authorization method: application-level

Jayabalan
  • 361
  • 1
  • 7
  • Can we use authentication method="application-level"? – Jayabalan Jun 09 '22 at 13:09
  • 1
    Is the MarkLogic application server set to `application-level`? Is there a default user associated with sufficient permissions to perform the insert? If so, then you can remove the authentication option completely. – Mads Hansen Jun 09 '22 at 14:15
  • In the app-server default, user is set as Admin, but even if I'm not able to insert the document, Even if i have admin access we need to give Rest-writer permission? to insert the document – Jayabalan Jun 10 '22 at 11:42

0 Answers0