POST RecycleBin/Restore

Restores a Recycle Bin Item based on the object Type and parent.

How items are restored

Item

How is it restored?

Config object

If the original parent object still exists (even if renamed or moved), the object will be placed under this parent.

If the original parent was deleted but a new object with the same name has since been created, the object will be placed under this new object. The location the object will be restored to RestorationDN from POST RecycleBin/GetContents.

Owner or Vault Entry

If the original owner object still exists (even if renamed or moved), the vault entry or entries will be owned by that object.

The original owner object was deleted but a new object with the same name has since been created, the vault entry or entries will be owned by this new object. After restoration, the owner is the RestorationDN from POST RecycleBin/GetContents.

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

Input parameters

Name

Description

Guid

The GUID of the Recycle Bin Item to delete. Use the Guid format from POST RecycleBin/GetContents. For example, 3d6b61d-1c71-4603-883f-25b8c2ceecdd.

Returns

Response description

Name

Description

HTTP 200

For valid requests, this API call returns Result: 0.

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: Restore a previously deleted item and its children from the Recycle Bin

TIP  Remember that you cannot re-use the Recycle Bin Item Guid. After a successful restore of a Config object, always refresh the UI. The restored items and any children appear in the original location, for example the Policy tree.

Request

POST https://tpp.venafi.example/vedsdk/RecycleBin/Restore
Authorization:Bearer 4MyGeneratedBearerTknz==
{
   "Guid": "1f03ccf4-0c1c-4391-b6da-925597e46846"
}

Response

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