Skip to content

Creating Transactions

hunterhacker edited this page Nov 5, 2011 · 4 revisions

Creating Transactions

Transactions are created by issuing a POST request to the /transaction/create endpoint. Transactions are only supported if Corona is running on MarkLogic 5 or later. Attempting to create a transaction in an earlier version will result in a 400 error.

Request details

  • Endpoint: /transaction/create
  • Request type: POST
  • Parameters:
    • outputFormat (optional, default: json) - Specifies what format of the result. Valid values are xml and json
  • Returns
    • On success a 200 is returned with either an XML or JSON document in the response body that contains information about the ticket that was created.

JSON Response

{
    "txid": "11348666085588525124:1954451539563165329",
    "host": "corona.marklogic.com",
    "createdOn": "2011-11-03T13:38:02-07:00",
    "expiresOn": "2011-11-03T13:48:02-07:00",
    "canBeExtendedTo": "2011-11-03T14:38:02-07:00"
}

XML Response

<corona:response xmlns:corona="http://marklogic.com/corona">
    <corona:txid>11348666085588525124:1954451539563165329</corona:txid>
    <corona:host>corona.marklogic.com</corona:host>
    <corona:createdOn>2011-11-03T13:38:02-07:00</corona:createdOn>
    <corona:expiresOn>2011-11-03T13:48:02-07:00</corona:expiresOn>
    <corona:canBeExtendedTo>2011-11-03T14:38:02-07:00</corona:canBeExtendedTo>
</corona:response>
Clone this wiki locally