"createTransactionSavePoint" (JSON Action)
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
{
"api": "db",
"action": "createTransactionSavepoint",
"params": {
"transactionId": "replaceWithTransactionIdFromCreateTransaction"
},
"authToken": "replaceWithAuthTokenFromCreateSession"
}
{
"api": "db",
"action": "createTransactionSavepoint",
"params":
{
"transactionId": "replaceWithTransactionIdFromCreateTransaction"
},
"responseOptions": {},
"apiVersion": "1.0",
"requestId": "2",
"debug": "max",
"authToken": "replaceWithAuthTokenFromCreateSession"
}
Success
{
"result": {
"transactionSavepointId": 1
},
"errorCode": 0,
"errorMessage": "",
"authToken": "replaceWithAuthTokenFromCreateSession"
}
{
"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": ""
}
Use the createTransactionSavePoint JSON API action to create a transaction savepoint and return a unique identifier for the savepoint
The "params" property is an object that contains an action's request parameters as defined by a set of properties. Each action defines its own required and optional properties. See System limits for a comprehensive overview of property requirements and limitations.
"params" properties summaryProperty | Description | Default | Type | Limits (inclusive) |
|---|---|---|---|---|
(optional) identifies a server-generated ID that represents a point in the progress of a transaction. |
| string | 0 to 255 bytes |
The "transactionSavepointId" is a string that the server generates and returns in a "createTransactionSavepoint" action. The generated ID represents a point in a transaction's progress. In requests, it defaults to an empty string.
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.
"result" properties summaryProperty | Description | Type | Limits (inclusive) |
|---|---|---|---|
(optional) identifies a server-generated ID that represents a point in the progress of a transaction. | string | 0 to 255 bytes |
The "transactionSavepointId" is a string that the server generates and returns in a "createTransactionSavepoint" action. The generated ID represents a point in a transaction's progress. In requests, it defaults to an empty string.
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.