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 Key | Access Level | Description |
|---|---|---|
| User | Full | Users have full access to uploads |
| Station | Unauthorized | Stations cannot delete uploads for data integrity purposes |
Endpoint
DELETE
/v2/attachmentsAuthorizationBearer <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?
Confirm upload POST
Confirm a file upload to TofuPilot storage. Validates the upload, fetches file metadata, and updates the attachment record.
Create procedure POST
Create a new test procedure that can be used to organize and track test runs. The procedure serves as a template or framework for organizing test execution.