360 Secure SkillHub
360 安全技能中心

Delete File

根据文件 URL 调用云存储服务删除文件;请求需在 CLIENT-API-KEY 头中携带 API Key,服务端校验上传者所有权,不匹配时返回 403。适用于清理不再需要的文件或流程中间产物。

rishabhdugar
rishabhdugar
热度 34.79
最近更新 2026-05-11 17:44:07
分类:自动化依赖:代码执行 / 第三方 API应用场景:工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add delete-file
Metadata
name
delete-file
description
Delete a file from cloud storage by URL. Only the API key that uploaded the file can delete it.

Delete File

What It Does

Deletes a file from cloud storage by its URL. Verifies ownership — only the API key that uploaded the file can delete it.

When to Use

  • Remove files you no longer need
  • Clean up storage before the 30-day auto-deletion

Required Inputs

  • url — the file URL returned by the upload endpoint

Authentication

Send your API key in the CLIENT-API-KEY header.

Get your free API key at https://pdfapihub.com. Full API documentation is available at https://pdfapihub.com/docs.

Use Cases

  • Privacy Compliance — Delete files immediately after processing to meet GDPR/privacy requirements
  • Storage Cleanup — Remove files you no longer need before the 30-day auto-deletion
  • Workflow Cleanup — Delete intermediate files after a multi-step pipeline completes
  • Sensitive Document Handling — Immediately remove confidential documents after processing

Example Usage

curl -X POST https://pdfapihub.com/api/v1/file/delete \
  -H "CLIENT-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://bucket.s3.amazonaws.com/pdf/abc123_my_report.pdf" }'

Notes

  • Returns 403 if the file doesn't belong to the requesting API key