Upload Files
The upload file endpoints allow you to upload files to QA Sphere.
Uploaded files can be referenced in the files field of public test case create/update requests. Public result endpoints currently support links only and do not accept file attachments.
Upload File
POST/api/public/v0/file
Upload a file to QA Sphere.
Request Body
Request body should be a multipart/form-data with a file form-field.
Limits
- Maximum file size:
50 MiB
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the uploaded file |
url | string | URL of the uploaded file |
Example Request
curl \
-H "Authorization: ApiKey your.api.key.here" \
-F 'file=@"/path/to/file"' \
https://your-company.your-region-code.qasphere.com/api/public/v0/file
Example Response
{
"id": "1CJLabPkq_PWeS4siaKcB1k",
"url": "https://your-company.your-region-code.qasphere.com/api/file/1CJLabPkq_PWeS4siaKcB1k"
}
Error Responses
| Status Code | Description |
|---|---|
| 400 | Invalid multipart request or missing file |
| 401 | Invalid or missing API key |
| 403 | Insufficient permissions or suspended tenant |
| 413 | File exceeds the 50 MiB limit |
| 500 | Internal server error while uploading file |
Upload Files In Batch
POST/api/public/v0/file/batch
Upload multiple files to QA Sphere in a single request.
Request Body
Request body should be a multipart/form-data with one or more files form-fields.
Limits
- Maximum files per request:
100 - Maximum file size:
50 MiBper file - Maximum request body size:
500 MiB
Response Fields
{
files: Array<{
id: string // Unique identifier for the uploaded file
url: string // URL of the uploaded file
}>
}
Example Request
curl \
-H "Authorization: ApiKey your.api.key.here" \
-F 'files=@"/path/to/file1"' \
-F 'files=@"/path/to/file2"' \
https://your-company.your-region-code.qasphere.com/api/public/v0/file/batch
Example Response
{
"files": [
{
"id": "1CJLabPkq_PWeS4siaKcB1k",
"url": "https://your-company.your-region-code.qasphere.com/api/file/1CJLabPkq_PWeS4siaKcB1k"
},
{
"id": "1CJLabPkq_Q2x7A7Lwu7GsL5",
"url": "https://your-company.your-region-code.qasphere.com/api/file/1CJLabPkq_Q2x7A7Lwu7GsL5"
}
]
}
Error Responses
| Status Code | Description |
|---|---|
| 400 | Invalid multipart request, no files provided, or too many files |
| 401 | Invalid or missing API key |
| 403 | Insufficient permissions or suspended tenant |
| 413 | A file exceeds 50 MiB or request body exceeds 500 MiB |
| 500 | Internal server error while uploading files |