Just to add, another options is to keep your workflow histories and visibility info after the set retention period via archival. It’s still experimental feature tho so be ware of possible issues (search the forum here if you decide to use it first to find a number of posts on setting it up).
1) It depends on the use case. The default approach is to have an activity that updates your own DB when needed by the business logic.
Que - when you say “activity that updates your own DB” means whenever any activities happened we need to store that activity id and details in our own database, is it you are saying ?
2)There is no direct API, but there are many options to solve a problem depending on the use case.
Que - Can you suggest other way, our requirements is we wanted to store some useful and high level data at our own database so anytime temporal DB went down we can fetch some important things from our database.