V-Spark Online Help

Using /search to Delete Audio Files

Delete audio files from V‑Spark using the /search endpoint's DELETE HTTP method. Once the API call is made, V‑Spark queues the file for deletion.

Deletion entails the removal of the audio file, its transcript and transcription results, and the rest of its system record. Summary charts and tables are not updated when an individual file is removed, but the file will no longer be available in the fa-laptop.svg Dashboard Files View, nor will it appear in search results. A system under heavy load may take several minutes to fully delete the file and its record details, but this situation is unlikely.

Using DELETE with /search

Files to be deleted with the /search endpoint must be filtered by company and organization, and may also be filtered by folder. Each file to be deleted must be specified individually by tid.

Synopsis - deleting single files

DELETE /search/CO_SHORT/ORG_SHORT?token=TOKEN&terms.tid=TID
DELETE /search/CO_SHORT/ORG_SHORT?token=TOKEN&tid=TID
DELETE /search/CO_SHORT/ORG_SHORT/FOLDER?token=TOKEN&terms.tid=TID
DELETE /search/CO_SHORT/ORG_SHORT/FOLDER?token=TOKEN&tid=TID

Multiple files may be deleted with a single request by specifying the multi=true parameter in addition to the tids. By default, the maximum number of audio files that can be deleted at once is 1000. This maximum can be changed by updating the simultaneous_tid_deletion_max system configuration option.

Synopsis - deleting multiple files

DELETE /search/CO_SHORT/ORG_SHORT?tid=TID1,TID2&token=TOKEN&multi=true
DELETE /search/CO_SHORT/ORG_SHORT/FOLDER?terms.tid=TID1,TID2&token=TOKEN&multi=true
DELETE /search/CO_SHORT/ORG_SHORT/FOLDER?terms.tid=TID1,TID2&token=TOKEN&multi=true
DELETE /search/CO_SHORT/ORG_SHORT/FOLDER?tid=TID1,TID2&token=TOKEN&multi=true

Using the API to delete files requires the following variables and parameters:

CO_SHORT

The short name of the company by which the file is filtered.

ORG_SHORT

The short name of the organization by which the file is filtered.

FOLDER (optional)

The name of the folder by which the file is filtered.

TOKEN

Either the root authorization token, or a company authorization token with write permissions for the folder containing the file to be deleted.

tid=TID or tid=TID1,TID2,...

The transcriptID of the file or files to be deleted. The terms.tid and tid parameters are equivalent and interchangeable.

multi=true

If multiple transcriptIDs are provided for the terms.tid or tid parameters, multi=true must be specified, or the request will return a 400 error.

The following is an example cURL call using the /search endpoint's DELETE method to delete a single file:

curl -X DELETE 'http://vspark-example.com:3000/search/docs-co/docs-org?token=12345678&tid=999'

The preceding example deletes an audio file that is associated with the docs-co company and docs-org organization, using the token parameter 12345678 and a transcriptID of 999.

The following cURL example uses the /search endpoint's DELETE method to delete three files:

curl -X DELETE 'http://vspark-example.com:3000/search/docs-co/docs-org?token=12345678&tid=9991,9992,9993&multi=true'

The preceding example deletes three audio files associated with the docs-co company and docs-org organization, using the token parameter 12345678 and the transcriptIDs 9991, 9992, and 9993.