Auto Purge Trash REST API

Space Trash Purge Configuration

GET http://localhost:8090/rest/purgerecyclebin/1.0/utility/config?spaceKey={spaceKey}

1 2 3 $ curl -u "user:pass" -XGET \ http://localhost:8090/rest/purgerecyclebin/1.0/utility \ /config?spaceKey=DT

DELETE http://localhost:8090/rest/purgerecyclebin/1.0/utility/config?spaceKey={spaceKey}

1 2 3 $ curl -u "admin:secret" -XDELETE \ http://localhost:8090/rest/purgerecyclebin/1.0/utility \ /config?spaceKey=DT

 

Run Trash Purge for Space

POST http://localhost:8090/rest/purgerecyclebin/1.0/utility/run/config?spaceKey={spaceKey}&dryRun={dryRun}

1 2 3 $ curl -u "admin:secret" -XDELETE \ http://localhost:8090/rest/purgerecyclebin/1.0/utility \ /run/config?spaceKey=DT

POST http://localhost:8090/rest/purgerecyclebin/1.0/utility/run/all/config?daysKeep={daysKeep}&dryRun={dryRun}

Run Trash Purge for All Spaces

1 2 3 $ curl -u "admin:secret" -XDELETE \ http://localhost:8090/rest/purgerecyclebin/1.0/utility \ /run/all/config?daysKeep=180