REST API
If you're not already using the Fastlane Plugin, Gradle Plugin, or GitHub Action, you can upload manually your build using our REST API. The process looks like this:
- Make a GET request to our
/upload
endpoint to retrieve a signed URL - Make a PUT request to the signed URL with the upload file contents
Getting a Signed URL
Using the /upload
endpoint you can create a new upload and retrieve a signed URL to upload your uploaded file. The full documentation for this API endpoint is available here.
Emerge supports many common iOS & Android builds, see Supported Artifacts for a comprehensive list of all build types Emerge supports for iOS & Android.
Uploading to the signed URL
With the signed URL, you can make a PUT request to upload your app's build file.
If uploading a .zip
file, the request should include the Content-Type: application/zip
header. For example:
curl -v -H 'Content-Type: application/zip' -T MyArchive.xcarchive.zip "SIGNED_URL"
A complete example of a manual upload using shell commands is below:
#!/bin/bash
API_KEY=<YOUR_API_KEY>
PATH_TO_BUILD_ARTIFACT=<PATH_TO_YOUR_BUILD.xcarchive.zip>
json_body='{
"filename":"your_build.xcarchive.zip",
"branch":"example_branch_name",
"repoName":"example_repo_name",
"buildType":"release",
"prNumber": "123",
"sha":"123456",
"baseSha":"654321",
"previousSha":"123455"}'
upload_response=$(curl \
--url "https://api.emergetools.com/upload" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-API-Token: $API_KEY" \
--data "$json_body")
# Pull the uploadURL field from the response using jq
upload_url=$(echo "$upload_response" | jq -r .uploadURL)
curl -v -H 'Content-Type: application/zip' -T "$PATH_TO_BUILD_ARTIFACT" "$upload_url"
Updated 3 months ago