Complete a Saga Transaction

put

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

Completes a Saga transaction. To complete the transaction, the transaction initiator service calls Transaction Manager for Microservices, and then the Transaction Manager for Microservices calls each participant service's complete 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

404 Response

NotFound

409 Response

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

500 Response

InternalServerError
Back to Top

Examples

cURL Command

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

Note down the value of the Long-Running-Action and Oracle-Tmm-Tx-Token headers from the response received for a provisional booking. You can pass the values directly or save it in a variable. The Oracle-Tmm-Tx-Token header is displayed in the response body of a provisional booking only if you have created a transaction token and enabled it. See Transaction Token Properties in Transaction Manager for Microservices Developer Guide.

Enter the command on a single line. Line breaks are used in this example for readability. Example values have been truncated with ... to improve readability. When you run this command in your environment, provide the entire value.

curl -X PUT 
     -H "Authorization:Bearer $OTMM_COOKIE"
     -H "Long-Running-Action: [http://otmm-tcs:9000/api/v1/lra-coordinator/57b6...]"
     -H "Oracle-Tmm-Tx-Token: vmrpURFx...qpKmYn2" 
     https://192.0.2.1:8080/admin/v1/lra-coordinator/15cd86ca-e0b7-4778-8cb6-4b78dfb3b981/close
  • 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 a Saga transaction ID. Replace this value with the transaction ID of a Saga transaction in your environment.

No response is returned for this request.

Back to Top