Upload App
POST
https://deploygate.com/api/users/{OWNER_NAME}/apps
Easily and automatically upload from test servers and self-created tools.
The behavior when both distribution_key and distribution_name are specified
distribution_key takes priority. If the corresponding distribution page specified with distribution_key doesn't exist, API returns 404 error.
Application upload for Workspace (Flexible/Enterprise plans)
Organization is required to be uploaded apps under Workspace.
For ${API_TOKEN}
, use API key of the user belongs to Owner or Developer team of the Organization.
Also, specify the destination Oranization name for ${OWNER_NAME}
.
Path Params
Name | Type | Required | Description |
---|---|---|---|
OWNER_NAME | string | true | User name or Organization name |
Form Data
Name | Type | Required | Description |
---|---|---|---|
file | file | true | App's binary file (IPA/APK/AAB) |
message | string | false | Description of uploaded file |
distribution_key | string | false | By specifying the distribution page's hash (the "xxxx" portion of the distributed page's URL: /distributions/xxxx), that distribution page will be updated simultaneously. |
distribution_name | string | false | Specify the name of the updated distribution page. If none exists, a new distribution page will be created. Possible uses include creating distribution pages for each Git branch name. |
release_note | string | false | Message displayed during distribution page app updates. |
disable_notify | string | false | (iOS only) A setting of "true" disables Push notification emails. |
Example
curl \
--url "https://deploygate.com/api/users/${OWNER_NAME}/apps" \
-H "Authorization: Bearer ${API_TOKEN}" \
-X POST \
-F "file=@sample.apk" \
--form-string "message=sample"
Update distribution pages
curl \
--url "https://deploygate.com/api/users/${OWNER_NAME}/apps" \
-H "Authorization: Bearer ${API_TOKEN}" \
-X POST \
-F "file=@sample.apk" \
--form-string "message=sample" \
--form-string "distribution_key=abcd1234" \
--form-string "release_note=new build"
Distribute per Git branch
curl \
--url "https://deploygate.com/api/users/${OWNER_NAME}/apps" \
-H "Authorization: Bearer ${API_TOKEN}" \
-X POST \
-F "file=@sample.apk" \
--form-string "message=git:${GIT_HASH}" \
--form-string "distribution_name=${GIT_BRANCH}" \
--form-string "release_note=new build"
Result 200
{
"error":false,
"results":{
"name":"DeployGate",
"package_name":"com.deploygate",
"secret":"1234567890abcdef1234567890abcdef12345678",
"os_name":"Android",
"path":"/users/_your_name_/apps/com.deploygate",
"revision":1,
"version_code":"36",
"version_name":"1.6.0",
"sdk_version":"7",
"target_sdk_version":23,
"signature":"1234567890abcdef1234567890abcdef12345678",
"message":"sample",
"file":"https://example.com/path/to/file",
"md5":"1234567890abcdef1234567890abcdef",
"icon":"https://example.com/path/to/icon",
"user": {
"name": "${OWNER_NAME}"
}
}
}
Result 400
{
"error": true,
"message": "application create error: cannot detect the package.",
"because": "application create error: cannot detect the package."
}