Skip to main content

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

FieldTypeDescription
idstringUnique identifier for the uploaded file
urlstringURL 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 CodeDescription
400Invalid multipart request or missing file
401Invalid or missing API key
403Insufficient permissions or suspended tenant
413File exceeds the 50 MiB limit
500Internal 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 MiB per 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 CodeDescription
400Invalid multipart request, no files provided, or too many files
401Invalid or missing API key
403Insufficient permissions or suspended tenant
413A file exceeds 50 MiB or request body exceeds 500 MiB
500Internal server error while uploading files