How-to: Archive Samples
Issue:
How to archive/delete samples in ESP?
Solution:
Samples can be deleted (archived) via UI, ESP client, backend (l7 console) and using a custom query.
Via UI
Open the sample details page of the sample to be archived (i.e., navigate to Samples app → search for the sample to be archived → click on the sample to view more details)
In the sample details page, click on the Archive button in the top right corner (next to Done button) to archive the sample
Via Client
The ESP Sample models offers a drop() function to archive/delete a sample from client - see example below)
Via Backend:
The lab7.sample.api offers delete_sample() function to delete/archive samples from the backend
Via Custom Query:
Archiving simply involves flipping the archived flag from false to true in the resource table (a custom query could make this happen as well)
To do this, add a custom query yaml to content/queries, t he name of the file will be the name of the custom query endpoint: content/queries/archive_resources.yaml