Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Marklogic Rest Api Instance install - how can the instructions fail?

Tags:

marklogic

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.

like image 907
Ribeye Avatar asked May 18 '26 00:05

Ribeye


1 Answers

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.

like image 163
DALDEI Avatar answered May 21 '26 04:05

DALDEI