POST RecycleBin/PurgeTask
Starts or stops the Purge task that empties the Recycle Bin. This endpoint runs as a background task. If you want to empty the Recycle Bin now, call POST RecycleBin/Empty.
Requirements
- Permissions: The caller must have Master Admin permission
- Token scope: Admin:RecycleBin
Headers
-
Content type: Content-Type:application/json.
- Token: The bearer access token that you received. For example, Authorization:Bearer 4MyGeneratedBearerTknz==. For more information, see Passing a bearer token in your API calls.
Parameters
Specify Start OR Stop, NOT both.
Name |
Description |
---|---|
PurgeAll |
1: Works in conjunction with Start. Purges all Recycle Bin items as a background task. Operates when there are more than 500 items in the Recycle bin. |
Start |
(Optional)1: Instead of waiting for the nightly Purge Process, this option will purge everything older than the configured age. Upon completion, log a 'Purge Complete' event. |
Stop |
(Optional)1: Halt the Purge task that is already running. |
Returns
Name |
Description |
---|---|
HTTP 200 |
Result: 0: |
HTTP 400 |
For invalid requests, this call returns HTTP 400 Bad Request and the following data in the message body:
|
Example: Run a Purge task to empty the Recycle Bin
Request
POST https://tpp.venafi.example/vedsdk/RecycleBin/PurgeTask Authorization:Bearer 4MyGeneratedBearerTknz== { "PurgeAll": 1, "Start": 1 }
Response
HTTP/1.1 200 OK { "Result": 0 }