Delete Transaction Log Before

POST {{HDB_ENDPOINT}}

Deletes transaction log data for the specified database table that is older than the specified timestamp.

Operation is restricted to super_user roles only

  • operation (required) - must always be delete_transaction_log_before
  • schema (required) - schema under which the transaction log resides
  • table (required) - table under which the transaction log resides
  • timestamp (required) - records older than this date will be deleted. Format is millisecond-based epoch in UTC

Request Body

{"operation"=>"delete_transaction_logs_before", "schema"=>"dev", "table"=>"dog", "timestamp"=>1598290282817}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{"3":[{"operation":"insert","user_name":"HDB_ADMIN","timestamp":1598290200117.106,"records":[{"id":3,"dog_name":"Alby","owner_name":"Kaylan","breed_id":348,"age":5,"weight_lbs":84,"adorable":true,"__updatedtime__":1598290200117,"__createdtime__":1598290200117}]}],"7":[{"operation":"insert","user_name":"HDB_ADMIN","timestamp":1598290193686.446,"records":[{"id":7,"dog_name":"Penny","owner_name":"Kyle","breed_id":154,"age":5,"weight_lbs":35,"adorable":true,"__updatedtime__":1598290193686,"__createdtime__":1598290193686}]},{"operation":"update","user_name":"HDB_ADMIN","timestamp":1598290235769.658,"records":[{"id":7,"dog_name":"Penny Bernhardy","age":"8","__updatedtime__":1598290235769}],"original_records":[{"__createdtime__":1598290193686,"__updatedtime__":1598290193686,"adorable":true,"age":5,"breed_id":154,"dog_name":"Penny","id":7,"owner_name":"Kyle","weight_lbs":35}]}],"9":[{"operation":"insert","user_name":"HDB_ADMIN","timestamp":1598290200117.106,"records":[{"id":9,"dog_name":"Gertrude","owner_name":"Eli","breed_id":158,"age":5,"weight_lbs":70,"adorable":true,"__updatedtime__":1598290200116,"__createdtime__":1598290200116}]},{"operation":"delete","user_name":"HDB_ADMIN","timestamp":1598290282816.445,"original_records":[{"__blob__":null,"__createdtime__":1598290200116,"__updatedtime__":1598290200116,"adorable":true,"age":5,"breed_id":158,"dog_name":"Gertrude","id":9,"owner_name":"Eli","weight_lbs":70}]}]}