Gaffer Upload API
Gaffer’s Upload API allows you to upload test reports to Gaffer. The API accepts multipart form data containing your test report files and metadata.
Request Parameters
Field | Type | Description |
---|
run_package | Files | The test report file(s) to upload. Can include multiple files, but must include at least one HTML report. |
tags.key[] | String | Keys for metadata tags. Can include multiple tags. |
tags.value[] | String | Values for metadata tags. Must match the number of tag keys. |
Tag | Description | Required |
---|
commit_sha | The commit SHA that the test report is for. | Strongly recommended |
branch | The branch that the test report is for. | No |
test_framework | The test framework that the test report is for. | No |
test_suite | An optional label for the name of the test suite. | No |
Response
The response will be a JSON object containing the following fields:
Field | Description |
---|
status | The status code of the request. |
statusText | The status message of the request. |
data.reportUrl | The URL of the uploaded test report. |
Example Request
curl -X POST https://api.gaffer.sh/upload \
-H "X-Gaffer-API-Key: YOUR_API_KEY" \
-F "run_package=@path/to/test_report.html;filename=test_report.html" \
-F "tags.key=commit_sha" \
-F "tags.value=ab12cd34ef56gh78ij90klmnop" \
-F "tags.key=test_framework" \
-F "tags.value=playwright" \
-F "tags.key=test_suite" \