I have been trying to create a transaction via the MarkLogic REST API (/v1/transactions) using the Developer guidance here: https://docs.marklogic.com/REST/POST/v1/transactions
When I try to call the transaction REST service to create a new transaction (I am using CURL), then I receive the following HTTP Response:
curl -X POST -d "" -i --anyauth --user user:password http://localhost:7010/v1/transactions
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Digest realm="public", ...
Content-type: application/xml
Server: MarkLogic
Content-Length: 211
Connection: Keep-Alive
Keep-Alive: timeout=5
HTTP/1.1 400 Bad Request
Content-type: application/xml
Server: MarkLogic
Content-Length: 316
Connection: Keep-Alive
Keep-Alive: timeout=5
<rapi:error xmlns:rapi="http://marklogic.com/rest-api">
<rapi:status-code>400</rapi:status-code><rapi:status>Bad Request</rapi:status>
<rapi:message-code>REST-INVALIDPARAM</rapi:message-code>
<rapi:message>REST-INVALIDPARAM: (err:FOER0000) Invalid parameter: could not parse transaction id </rapi:message>
</rapi:error>
Interestingly, when I use POSTMAN within Chrome, I can create the transaction, but the response is different to that expected (It response with 200 status and with XML detailing the transaction, rather than a 303 response and the "Location" header set to the transaction ID).
Can anyone help me explain why this CURL statement is failing?
Cheers