Skip to main content
System StatusContact Support

Documentation related to the following products will soon be moved to a new portal: ( Agility, Agility Connect and Agility Integrations Continuum and ALM Connect
Links from the site will automatically redirect to the new site.
If you have any questions, please contact Support. Agility Community

Undelete an Asset

This article explains how to undelete an asset through the API. If you only want to undelete an asset, the simpler approach is to use Search and the Asset Detail page in the application's user interface.

Deleted is just one system-defined asset state. When you have the asset's OID Token, undelete is the same as setting any other asset state via the Undelete operation. However, since the UI and the API will both hide deleted assets by default, there are some special steps to find a deleted asset.

Getting Started

1. Query for Deleted Assets

Normally, we could use the asset state in a query to reduce the set of items we worry about. For example, send an HTTP GET with where parameter of AssetState='0' and a modest page parameter to prevent returning too many results.

<Server Base URI>/rest-1.v1/Data/BaseAsset?where=AssetState='0'&page=100,0

However, deleted assets are automatically filtered from query results so trying the same thing with AssetState='255' will return no results. We need to use the special filter token for deleted, IsDeleted='true'.

<Server Base URI>/rest-1.v1/Data/BaseAsset?where=IsDeleted='true'&page=100,0

2. Execute Undelete

Once we have found a specific asset to undelete, we send an HTTP POST to the rest-1.v1/Data endpoint. The request has no body and uses the op parameter set to Undelete.

POST /VersionOne/rest-1.v1/Data/Timebox/14636?op=Undelete HTTP/1.1
Content-Type: application/xml

The response should be similar to the following.

<?xml version="1.0" encoding="UTF-8" ?>
<Asset href="/v1sdktesting/rest-1.v1/Data/Timebox/14636/22331" id="Timebox:14636:22331" />

The returned Asset node indicates the asset was properly updated.