Compensate an LRA Transaction

put

/admin/v1/lra-coordinator/{id}/cancel

Compensates or cancels an LRA transaction. To compensate the transaction, the transaction initiator service calls Transaction Manager for Microservices, and then the Transaction Manager for Microservices calls each participant service's compensate callback URI.

Request

Supported Media Types
Path Parameters
Back to Top

Response

Supported Media Types

200 Response

OK
Body ()
Root Schema : lra-status
Type: string
Allowed Values: [ "Active", "Closing", "Closed", "FailedToClose", "Cancelling", "Cancelled", "FailedToCancel" ]

400 Response

Invalid Arguments

401 Response

Unauthorized

409 Response

Conflict
Body ()
Root Schema : lra-status
Type: string
Allowed Values: [ "Active", "Closing", "Closed", "FailedToClose", "Cancelling", "Cancelled", "FailedToCancel" ]
Back to Top

Examples

cURL Command

The following example shows how to compensate an LRA transaction by submitting a PUT request on the REST resource using cURL. For more information about cURL, see Use cURL.

Enter the command on a single line. Line breaks are used in this example for readability.

curl -X PUT 
     -H "Authorization:Bearer $OTMM_COOKIE"
     https://192.0.2.1:8080/admin/v1/lra-coordinator/15cd86ca-e0b7-4778-8cb6-4b78dfb3b981/cancel
  • OTMM_COOKIE is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authenticate.

  • 192.0.2.1:8080 is an example REST endpoint URL. Change this value to the REST endpoint URL to access the Istio ingress gateway in your environment. For information about finding out REST endpoint URL for your site, see Send Requests.

  • 15cd86ca-e0b7-4778-8cb6-4b78dfb3b981 is an example value for an LRA transaction ID. Replace this value with the transaction ID of an LRA transaction in your environment.

No response is returned for this request.

Back to Top