Delete File Endpoint
- 20 Dec 2023
- 1 Minute to read
- Print
- DarkLight
- PDF
Delete File Endpoint
- Updated on 20 Dec 2023
- 1 Minute to read
- Print
- DarkLight
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
The Delete File is an endpoint in ProGet's Asset Directory API. It deletes a file at the specified path. Note that the path must refer to an individual file (not a folder), and it's not considered an error to delete a file that does not exist.
🚀 Quick Example: Deleting a file with Curl
This example deletes a file named log_data.bin
from a folder deprecated-files
, authenticating with the API key abc12345
:
curl -X DELETE --header "X-ApiKey: abc12345" "https://proget.corp.local/endpoints/public-files/content/deprecated-files/log_data.bin"
Request Specification
To delete file, simply DELETE
to the URL with the AssetDirectoryName
and path to the file.
DELETE /endpoints/«AssetDirectoryName»/content/«path_to_file»
Deleting a file within a folder requires the asset directory name (e.g. myAssetDirectory
), the folder name (e.g myFolder
) and the file name (e.g. mycontent.bin
)
DELETE /endpoints/myAssetDirectory/content/myFolder/mycontent.bin
Response Specification
Response | Details |
---|---|
200 (Success) | the file is deleted from the asset directory |
400 (Path Refers to folder) | indicates that the path refers to a folder |
401 (Authentication Required) | indicates a missing, unknown, or unauthorized API Key |
Was this article helpful?