POST RecycleBin/SetConfiguration

Updates the configuration for the Deletion and Purge Process. The Deletion Process moves old data into the Recycle Bin. The Purge Process empties the Recycle Bin. Both processes automatically run nightly tasks. To run a task without waiting, you can call POST RecycleBin/DeletionTask or POST RecycleBin/PurgeTask.

Requirements

  • For each deletion task that you are configuring, the Perform Task option must be enabled in VCC Delete Tasks.
  • 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

Only pass these values if you want to change VCC settings: 

Input parameters

Name

Description

Deletion

Rules to determine how items move into the Recycle Bin. The current settings appear in VCC.

  • AllottedTime: (Optional) 0: retains the current value that appears in VCC. The maximum number of minutes, NOT hours, that the Deletion task can run. The default is 180 minutes. VCC setting: Limit deletion process runtime to shows the value in hours. So, pass a number that is divisible by 60 (minutes).
  • Tasks: An array of updates to Deletion Tasks. For each task, pipe | delimit the values. Example: CertificateHistory|5. If the task does not require any changes, you can omit it.
  • QuerySize: (Optional) 0: retains the current value that appears in VCC. The number of items to remove each time tasks run via POST RecycleBin/DeletionTask or the Deletion Process. For example, the Deletion Process automatically moves this number of old items into the Recycle Bin each night until the task criteria is met. VCC setting: Delete a maximum of [n] entries per task.
  • SqlTimeout: (Optional) Only change this value when Customer Support recommends a different setting. The maximum number of seconds the Deletion Task can query the Trust Protection Platform database. The default is 600 seconds. The minimum is 15 seconds.

Purge

(Optional) Rules that determine how to empty the Recycle Bin. These settings also appear in VCC

Purge settings

  • After: (Optional) 0: retains the current value that appears in VCC. The number of days to retain items before they are permanently removed from the Recycle Bin. VCC setting:  Purge items deleted more than [n] days ago.
  • AllottedTime: (Optional) 0: retains the current value that appears in VCC. The maximum number of minutes, NOT hours, that the Purge task can run. The default is 180 minutes. VCC setting: Limit purge process runtime to [n] hours. So, pass a number that is divisible by 60 (minutes).

  • EngineDN: (Optional)0: retains the current value that appears in VCC. If the value is not set, any available engine will perform the job. The Distinguished Name (DN) of the ToDo engine that processes purge tasks. VCC setting:  Engine to run purge process.

Returns

Response description

Name

Description

HTTP 200

Result: The reason for success or failure. For more information, see Recycle Bin result codes.

HTTP 400

For invalid requests, this call returns HTTP 400 Bad Request and the following data in the message body:

  • error: The reason for the error.

  • error_description: If available, additional information about how to retry the request.

Example: Set Deletion and Purge rules

Request

POST https://tpp.venafi.example/vedsdk/RecycleBin/SetConfiguration
Authorization:Bearer 4MyGeneratedBearerTknz==
{
   "Deletion":{
      "AllottedTime":480,
      "Tasks":[
         "CertificateAge|730|1",
         "CertificateHistory|5"
      ],
      "QuerySize":10000,
      "SqlTimeout":600
   },
   "Purge":{
      "After":90,
      "AllottedTime":1000,
      "EngineDN":"\\VED\\Engines\\WIN-MLK71Q10559"
   }
}

Response

HTTP/1.1 200 OK
{
   "Result": 0
}