Skip to main content
Raymond Camden
Community Manager
Community Manager
April 25, 2023
Question

Code samples demonstrating the removal of assets

  • April 25, 2023
  • 0 replies
  • 249 views

As folks know (or may not know), when working with the SDKs, we store your files temporarily, up to 24 hours. These temporary files are only used for processing and we do not have access to them. You can see this in our FAQ (https://developer.adobe.com/document-services/faq/tech-support/#data-security--privacy-how-does-adobe-document-services-use-or-store-file-content). However, for developers who want greater control, you can use the REST API to delete assets *immediately*. So for example, upload a Word document. Start a conversion process, download the result, and then call the REST API to delete both the input and output assets. 

 

This is documented in our REST docs here: https://developer.adobe.com/document-services/docs/apis/#tag/Assets/operation/asset.delete

 

It's pretty simple - just make a DELETE call to /assets/X where X is the ID of your asset.

 

For developers who would like to see a working example of this., I built a Node.js script that demonstrates the above. It is a bit "noisy" in terms of the messages I send to the console, but it shows you how to do an operation and immediately clean up afterwards. You can find this script here: https://github.com/cfjedimaster/document-services-demos/blob/main/rest/convert_and_clean.js

 

This topic has been closed for replies.