This endpoint is for uploading executables, such as mobile apps and browser extensions, that we execute tests against. It is done in two steps:
- Generate a signed URL to upload the executable file to.
- Upload the file to the signed URL.
Once uploaded, you may want to trigger a run against the new executable. Please reference the Deploy Success Webhook page for details on that.
Only certain file types are allowed: .apk, .aab, .deb, .ipa, .zip
1. Generate signed URL
Recommended: Using the CI SDK
const { generateSignedUrlForRunInputsExecutablesStorage } =
makeQaWolfSdk({
apiKey: params.QA_WOLF_API_KEY,
});
// Upload build artifact
const signedUrlResponse = await generateSignedUrlForRunInputsExecutablesStorage({
destinationFilePath: params['destination-file-path'],
});
if (!signedUrlResponse?.uploadUrl) {
throw new Error('No upload URL received from QA Wolf');
}
console.log(signedUrlResponse.uploadUrl);
console.log(signedUrlResponse.playgroundFileLocation);
Alternative: Using an API call
The DESTINATION_FILE_PATH should at minimum be the filename and extension, but may also include directories. Reach out to QA Wolf for what this should be set to.
GET https://app.qawolf.com/api/v0/run-inputs-executables-signed-urls?file=$DESTINATION_FILE_PATH
Authorization: Bearer $QAWOLF_API_KEY
On success, it responds with this JSON:
{
"fileLocation": "$TEAM_ID/$DESTINATION_FILE_PATH",
"playgroundFileLocation": "$DESTINATION_FILE_PATH",
"signedUrl": "https://..."
}
2. Upload the file
This requires the signedUrl or uploadUrl from the first step.
Recommended: Using the CI SDK
const fileBuffer = await fs.readFile(filePath);
await fetch(SIGNED_URL, {
body: fileBuffer,
headers: { 'content-type': 'application/octet-stream' },
method: 'PUT',
});
Alternative: Using Curl
curl -X PUT \
--header "Content-Type:application/octet-stream" \
--data-binary @some_file.zip \
$SIGNED_URL