Thanks Christopher,

In fact, I forgot the 'Content-type' header that's in the sample but
not in the spec. Your example yields :

HTTP/1.1 401 Unauthorized
Server: MarkLogic
WWW-Authenticate: Digest realm="public", qop="auth",
nonce="c9495b7076aa21720a327f8e7ecd8d6c", opaque="2719618aff95bbc2"
Content-Type: text/html; charset=utf-8
Content-Length: 209
Connection: Keep-Alive
Keep-Alive: timeout=5

HTTP/1.1 303 See Created Transaction
Set-Cookie: HostId=1336823232052247898
Location: /v1/transactions/17924941496894007215
Server: MarkLogic
Content-Length: 0
Connection: Keep-Alive
Keep-Alive: timeout=5

Thanks a lot...


2015-10-21 18:46 GMT+02:00 Christopher Hamlin <[email protected]>:
> This worked for me on v8:
>
> curl -i -H 'Content-Type: text/plain' -d '' -X POST --anyauth --user
> admin:admin http://localhost:8000/v1/transactions
>
> Can you retry with -i?
>
>
> On Wed, Oct 21, 2015 at 12:40 PM, Gilles Lenfant
> <[email protected]> wrote:
>>
>> Hi,
>>
>> Experimenting the transactions does not work for me as described in
>> http://docs.marklogic.com/REST/POST/v1/transactions in my dev server.
>>
>> curl -X POST -d "" --anyauth --user admin:admin
>> http://localhost:8000/v1/transactions
>>
>> yields this JSON response...
>>
>> {"errorResponse":{"statusCode":500, "status":"Internal Server Error",
>> "messageCode":"INTERNAL ERROR", "message":"XDMP-AS: (err:XPTY0004)
>> $txid as xs:unsignedLong -- Invalid coercion: () as xs:unsignedLong .
>> See the MarkLogic server error log for further detail."}}
>>
>> This suggests that a "txid" should be provided when this REST query is
>> supposed to provide a new "txid".
>>
>> Did I miss something ? Many thanks in advance for any hint !
>>
>> --
>> Gilles Lenfant
>> _______________________________________________
>> 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
>
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to