Begin a Transaction
Begins a new transaction and returns the transaction ID. The transaction ID value can be used in subsequent requests to enlist the request in the transaction, or to commit or abort the transaction.
Path Components
POST /lightwave/api/v1/transaction
Parameters
Request
Name | Use | Description |
---|---|---|
optional | A caller supplied identifier to be copied to the response. | |
optional | Use to indicate that the HTTP response status code should be "200 OK", regardless of the outcome of the operation. | |
optional | Use to set the timeout in seconds for the new transaction. If not supplied or set to 0, the SERVER default timeout is used. See --default-tx-timeout in the SERVER command line reference. |
Response
Name | Description |
---|---|
The value of the correlationId supplied in the request, if any. | |
If an error occurred, a description of the error. | |
The HTTP response reason. Present if lw-suppress-status was supplied in the request. | |
The HTTP response status. Present if lw-suppress-status was supplied in the request. | |
The transaction ID of the TMF transaction associated with the request, if any. | |
The transaction state of the TMF transaction associated with the request, if any. |
Example
Request
POST http://lightwave.example.com/lightwave/api/v1/transaction HTTP/1.1
Content-Length: 0
lw-transaction-timeout: 30
Response
HTTP/1.1 200 OK
Content-Length: 0
lw-transaction-state: suspended
lw-transaction-id: 2c00031c9b890000c40ff4182950cac4