Skip to main content

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

24764641131411-mceclip0.png

Via Client

  • The ESP Sample models offers a drop() function to archive/delete a sample from client - see example below)

24764641138067-mceclip1.png

Via Backend:

The lab7.sample.api offers delete_sample() function to delete/archive samples from the backend24764641150611-mceclip2.png

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 24764641157395-mceclip3.png