Databases
Truncate database data. Identity counters are preserved unless restartIdentity is explicitly enabled.
TRUNCATE never creates row audit events, even when database audit is enabled. Use an ordinary DELETE request with a filter matching all rows (for example, primary key IS NOT NULL) when row-level audit history must be preserved.
Roles: RESOURCE_ADMIN
User access: Yes.
Service account access: Yes.
POST
/
api
/
v1
/
databases
/
{databaseId}
/
truncateData
Truncate database data. Identity counters are preserved unless restartIdentity is explicitly enabled.
curl --request POST \
--url https://api.revoengine.com/api/v1/databases/{databaseId}/truncateData \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"restartIdentity": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({restartIdentity: false})
};
fetch('https://api.revoengine.com/api/v1/databases/{databaseId}/truncateData', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/databases/{databaseId}/truncateData"
payload = { "restartIdentity": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Body
application/json
Response
OK.
⌘I
Truncate database data. Identity counters are preserved unless restartIdentity is explicitly enabled.
curl --request POST \
--url https://api.revoengine.com/api/v1/databases/{databaseId}/truncateData \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"restartIdentity": false
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({restartIdentity: false})
};
fetch('https://api.revoengine.com/api/v1/databases/{databaseId}/truncateData', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/databases/{databaseId}/truncateData"
payload = { "restartIdentity": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
