TCM Automation Docs

Attachments

Attach screenshots, logs, and trace files to an execution — the SDKs do the three-step presigned upload for you.

Why presigned uploads

Test artifacts can get big. Streaming a 50 MB browser trace through the API backend would tie up an HTTP worker for the whole transfer, and would force your CI runner to keep an open connection to the API instead of going directly to object storage. Instead, TCM uses presigned URLs:

  1. The runner asks the API for a presigned upload URL via POST /executions/{id}/attachments/presign.
  2. The runner PUTs the file bytes directly to the storage backend (MinIO/S3) using that URL. The API never sees the bytes.
  3. The runner tells the API the upload finished via POST /executions/{id}/attachments, which records an attachment row pointing at the new object.
The SDKs hide all three steps
Every SDK exposes a single uploadAttachment call that bundles the presign + PUT + commit. Reach for the raw API only if you’re uploading from a language we don’t ship an SDK for.

Example

bytes, _ := os.ReadFile("test-screenshot.png")
ref, err := client.UploadAttachment(ctx, execID, "test-screenshot.png",
    "image/png", bytes)
if err != nil { log.Fatal(err) }
log.Printf("uploaded: %s (%d bytes)", ref.URL, ref.Size)

Limits

  • Per-file size limit: 100 MB by default (configurable per tenant).
  • Allowed content types: anything — TCM does not inspect the bytes.
  • Attachments are tied to the execution; revoking the token does not delete the uploaded files.