I have Marklogic installed locally.
Want to set up a Rest Api Instance, so am following instructions at https://developer.marklogic.com/learn/rest/setup#create-a-rest-api-instance
I copy and paist the curl instruction, minus the backslash line continuations
curl -v -X POST --anyauth -u admin:admin --header "Content-Type:application/json" -d '{"rest-api": { "name": "TutorialServer", "port": "8011", "database": "TutorialDB", "modules-database": "Tutorial-Modules" } }' http://localhost:8002/v1/rest-apis
It runs, but the responce I get is "Your bootstrap payload caused the server to throw an error. Underlying error message: XDMP-JSONDOC: xdmp:get-request-body() -- Document is not JSON".
I cant see a json error, although no expert. Running on Windows 8.1. Am copying the text into Word doc then into dos prompt.
You likely have a dozen very nice looking glyphs that look like, but are not, what you think. Start over and don't use Word or Notepad or another plain ascii text editor as your clipboard. Double check that the encoding is 7bit ascii not 8859-1, or type it in. Double check with a hex dump like od -c.
Modern publication tool favor good typography over character encoding fidelity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With