createTransactionSavePoint

JSON DB "createTransactionSavePoint" action creates a transaction savepoint and returns a unique identifier for the savepoint in the "transactionSavepointId" property

A save point bookmarks the current point in the transaction process. You can create multiple save points and use "revertTransactionToSavepoint" to undo changes back to any save point.

A transaction save point represents the current point in the transaction process specified by the "transactionId" property.

A client can roll back a transaction to any save point by calling the "revertTransactionToSavepoint" action with the desired "transactionSavepointId" property.

A client can commit a transaction to any save point by calling the "commitTransaction" action with the desired "transactionSavepointId" property. This action is equivalent to and more efficient than running the "revertTransactionToSavepoint" action followed by "commitTransaction".

 

Request examples

Minimal

{
  "action": "createTransactionSavepoint",
  "params": {
    "transactionId": "replaceWithTransactionIdFromCreateTransaction"
  },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
 
 

Maximal

{
  "api": "db",
  "action": "createTransactionSavepoint",
  "params": 
  {
    "transactionId": "replaceWithTransactionIdFromCreateTransaction" 
  },
  "responseOptions": {},
  "apiVersion": "1.0",
  "requestId": "2",
  "debug": "max",
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
 
 

 

Response examples

Success

{
  "result": {
    "transactionSavepointId": 1
  },
  "errorCode": 0,
  "errorMessage": "",
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
 
 

Maximal

{
  "authToken": "replaceWithAuthTokenFromCreateSession",
  "result": {
    "transactionSavepointId": 1
  },
  "requestId": "00000003",
  "debugInfo": {
    "request": {
      "authToken": "replaceWithAuthTokenFromCreateSession",
      "api": "db",
      "action": "createTransactionSavepoint",
      "params": {
        "transactionId": "replaceWithAValidTransactionId"
      },
      "requestId": "00000003",
      "debug": "max"
    },
    "serverSuppliedValues": {
      "databaseName": null,
      "ownerName": null
    },
    "errorData": {
      "errorData": null
    },
    "warnings": [
    ]
  },
  "errorCode": 0,
  "errorMessage": ""
}
 
 

 

Request properties ("params")

Property Description Default Type Limits (inclusive)

transactionId

The "transactionId" property identifies a transaction in which the specified action will be included. Optional with default of "" string 0 to 255 bytes

 

Response properties ("result")

Property Description Type Limits (inclusive)

transactionSavePointId

The "transactionSavepointId" is a string that the server generates. The generated ID represents a point in a transaction's progress. 

  • A transaction savepoint represents the current point in the transaction process.
  • A client can roll back a transaction to any savepoint by calling the "rollbackTransaction" action with the desired "transactionSavepointId" property.
  • A client can commit a transaction to any savepoint by calling the "commitTransaction" action with the desired "transactionSavepointId" property.
  • A zero-length string returned in a response means the "transactionSavepointId" provided in the request is invalid.
  • Do not assume that the "transactionSavepointId" is a number in a string.
string 0 to 255 bytes