Upload API

Complete API reference for uploading test reports to Gaffer.

Gaffer's Upload API allows you to upload test reports from any CI/CD system or local environment. The API accepts multipart form data containing your test report files and optional metadata.

Endpoint

POST https://app.gaffer.sh/api/upload

Authentication

All requests must include your project's API key in the X-API-Key header. You can find your API key in your project settings.

Header Description
X-API-Key Your project API key (required)
Content-Type multipart/form-data (set automatically by most HTTP clients)

Request Body

The request body must be multipart/form-data with the following fields:

Field Type Required Description
files File(s) Yes One or more test report files to upload. Include multiple files by repeating the field.
tags JSON string No Metadata tags as a JSON object (see below).

Tags

Tags are optional metadata that help you organize and filter your test runs. Pass them as a JSON string in the tags field.

Tag Recommended Description
commitSha Strongly recommended The git commit SHA associated with this test run.
branch Recommended The git branch name (e.g., main, feature/auth).
test_framework Optional The test framework used (e.g., playwright, jest, pytest).
test_suite Optional A label for the test suite (e.g., unit, integration, e2e).

You can also include any custom tags you like. All tag values must be strings.

File Size Limits

  • Per file: 50 MB maximum
  • Total upload: 100 MB maximum

Supported Report Formats

Gaffer supports a variety of test report formats:

  • Playwright HTML - Full HTML report with embedded data
  • Vitest HTML - Vitest HTML reporter output
  • Jest JSON - Native Jest JSON output (--json)
  • Jest HTML - jest-html-reporter output
  • pytest HTML - pytest-html plugin output
  • JUnit XML - Standard JUnit XML format
  • Vitest JSON - Vitest JSON reporter output

Example Request

Single File Upload

curl