HI. I would use curl in verbose mode (as suggested by Christopher) so that you can see the details.
Furthermore, I would use --anyauth for the auth type. If one auth type fails, it will re-post the request again. This, combined with verbose output can be very helpful to troubleshoot these issues. Regards, David Ennis Kind Regards, David Ennis David Ennis *Content Engineer* [image: HintTech] <http://www.hinttech.com/> Mastering the value of content creative | technology | content Delftechpark 37i 2628 XJ Delft The Netherlands T: +31 88 268 25 00 M: +31 63 091 72 80 [image: http://www.hinttech.com] <http://www.hinttech.com> <https://twitter.com/HintTech> <http://www.facebook.com/HintTech> <http://www.linkedin.com/company/HintTech> On 16 April 2015 at 14:38, Puneet makwana <[email protected]> wrote: > Hi All, > I have been struggling with a basic authentication error and I know it is > something simple. I am using Marklogic 8 on Win8 and I am trying to create > a REST API instance using Curl CLI. The command that I am using is > curl -s -X POST --digest --user admin:admin -d"{\"rest-api\" : > {\"name\":\"5minguide\",\"database\":\"5minguide\",\"port\":8010}}" -H > "Content-type: application/json" "http://localhost:8002/v1/rest-apis" > I am using admin:admin to authenticate to the http://localhost:800 > <http://localhost:8002>1 (admin console) but everytime I run the above > command I get the following error > > <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> > > can anyone confirm if I am user the right user? or role required to create > REST API instance? > Thanks in advance. > regards, > Puneet > > _______________________________________________ > General mailing list > [email protected] > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general > >
_______________________________________________ General mailing list [email protected] Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general
