Deleting Layouts
Thursday, January 5, 2017 at 06:49amHi,
Is there a way to delete all the layouts in my account?
OneSpan Introduces DigipassONE, Bringing a Unified Platform Approach to Authentication Modernization
A new authentication platform helps financial institutions support diverse customer authentication preferences while modernizing at their own pace Learn More
Reply to: Deleting Layouts
Thursday, January 5, 2017 at 07:20amEslClient eslClient = new EslClient("key", "https://apps.esignlive.com/api"); int i = 1; List layouts = eslClient.getLayoutService().getLayouts(Direction.ASCENDING, new PageRequest(i,50));
while (!layouts.isEmpty()) {
for (DocumentPackage layout : layouts) {
eslClient.getPackageService().trash(layout.getId());
eslClient.getPackageService().deletePackage(layout.getId());
System.out.println(String.format("Deleted layout: %s", layout.getName()));
i++;
}
layouts = eslClient.getLayoutService().getLayouts(Direction.ASCENDING, new PageRequest(i,50));
} What the code above does is retrieve the first 50 layouts in your account (maximum of 50 layouts can be retrieved at a time), which are returned to you as a List. Then, loop through each layout and: 1. Trashes it 2. Deletes it permanently Finally, the next 50 layouts and the above steps repeated until all layouts have been deleted. Hope this helps.Reply to: Deleting Layouts
Wednesday, April 11, 2018 at 07:18am