TofuPilotTofuPilot
v2 ReferenceAttachments

Delete attachments

Permanently delete attachments by their IDs. This removes the attachment from the database and S3 storage, and unlinks it from any runs or units.

Access

API KeyAccess LevelDescription
UserFullUsers have full access to uploads
StationUnauthorizedStations cannot delete uploads for data integrity purposes

Endpoint

DELETE/v2/attachments
AuthorizationBearer <token>

API key for authentication. Use format: Bearer YOUR_API_KEY

In: header

Query Parameters

idsarray<string>

Upload IDs to delete

Response Body

from tofupilot.v2 import TofuPilot

# Initialize the TofuPilot client
client = TofuPilot()

# Execute the operation
result = client.attachments.delete(
    ids=["550e8400-e29b-41d4-a716-446655440000", "6ba7b810-9dad-11d1-80b4-00c04fd430c8"]
)

# Handle response
print(result)
{
  "id": [
    "550e8400-e29b-41d4-a716-446655440000",
    "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
  ]
}
{
  "message": "Bad request",
  "code": "BAD_REQUEST",
  "issues": []
}
{
  "message": "Not found",
  "code": "NOT_FOUND",
  "issues": []
}
{
  "message": "Internal server error",
  "code": "INTERNAL_SERVER_ERROR",
  "issues": []
}

How is this guide?