How to clean up Ledger

Nothing builtin there either but you can either run Daml Script over the JSON API by passing the --json-api flag or you can do it manually:

  1. First, get the list of active contracts via /v1/query.
  2. Then archive them. The easy but slow solution is to send one command to archive each contract. Alternatively, you can go via createAndExercise to archive multiple in one go. See Json api v1/create multiple records embedded in json file - #8 by cocreature for a description of that approach.
1 Like