The REST Client API uses HTTP multipart to do batch inserts 
<http://docs.marklogic.com/guide/rest-dev/bulk>. You can do the same from your 
own HTTP app server too. Take a look at 
<http://docs.marklogic.com/xdmp:multipart-decode>.

Justin

--
Justin Makeig
Director, Product Management
MarkLogic


> On May 17, 2016, at 11:09 AM, Will Thompson <wthomp...@oconnors.com> wrote:
> 
> Is there a recommended method of posting multiple documents to a ML endpoint 
> in one request? Maybe this is a more general HTTP question, but I have tried 
> several permutations of curl options, and unfortunately the only one that 
> works on the ML side involves joining the documents together into a single 
> payload with multiple root elements:
> 
> curl -u user:pass -k -X POST \
>  -H "Content-Type: text/xml" \
>  -d '<Document>Document 1</Document><Document>Document 2</Document>' \
>  https://localhost:1234/my-endpoint
> 
> And in XQuery, the sequence of <Document> elements is retrieved by 
> xdmp:get-request-body()/node(). But this can't be right, can it?
> 
> -Will
> _______________________________________________
> General mailing list
> General@developer.marklogic.com
> Manage your subscription at: 
> http://developer.marklogic.com/mailman/listinfo/general





Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
General mailing list
General@developer.marklogic.com
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to