0
votes

I am trying to create new instance but I get error below

500: Internal Server Error
REST-INVALIDREQUEST: (rest:INVALIDREQUEST) Invalid request: Host does not match origin or inferred origin, or is otherwise untrusted.
In /MarkLogic/appservices/utils/rest-impl.xqy on line 1077
In rest-impl:check-csrf((<rest:request uri="^/admin/(v1)/timestamp(/)?$" endpoint="/endpoints/timestamp.xqy" xml:id="timestamp" xmlns:rest="http://marklogic.com/appservices/rest"><rest:uri-param name="version">$1</rest:uri-param><rest:http met...</rest:request>, <rest:request uri="^/admin/(v1)/init(/)?$" endpoint="/endpoints/init.xqy" xml:id="init" xmlns:rest="http://marklogic.com/appservices/rest"><rest:uri-param name="version">$1</rest:uri-param><rest:http met...</rest:request>, <rest:request uri="^/admin/(v1)/instance-admin(/)?$" endpoint="/endpoints/instance-admin.xqy" xml:id="instance-admin" xmlns:rest="http://marklogic.com/appservices/rest"><rest:uri-param name="version">$1</rest:uri-param><rest:http met...</rest:request>, ...), map:map(<map:map xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:map="http://marklogic.com/xdmp/map"><map:entry key="uri"><map:value xsi:type="xs:string">/v1/rest-ap...</map:map>))
1
What version of MarkLogic are you using? Can you update your question with what you tried that resulted in this error (for instance, the curl command, or other procedure)?Dave Cassel
@DaveCassel I used sprintapi.com/dhcs.html - chrome extension .. and exact command @ docs.marklogic.com/guide/rest-dev/service#id_15309Rockyboy_ruby
Because I love CURL so much [sarcasm], I started github.com/paul-hoehne/MarkLogic_Python so I can script stuff in python.ipaul

1 Answers

1
votes

The system is preventing you from executing that request from a foreign browser page (or, in this case, Chrome extension). You can use curl, some other non-browser client side script, or the MarkLogic user interface, though.