CURL Example
This example will show you how to use CURL to upload a test report to Gaffer.
Prerequisites
Example Code
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=branch" \ -F "tags.value=main" \ -F "tags.key=test_suite" \ -F "tags.value=smoke"
- Replace
YOUR_API_KEY
with your actual Gaffer API key. - All tags are optional, but we recommend adding at least adding
commit_sha
.