Upload (POST)

Uploads application artifact to the Application Center.

Method

POST

Path

/services/service/desktop/upload/filetype/{type}

Path Parameters

type
The type of the file being uploaded.
Examples: apk (for Android) and ipa (for iOS)

Example

https://www.example.com/appcenterconsole/services/service/desktop/upload/filetype/apk

Consumes

MediaType.MULTIPART_FORM_DATA

Produces

MediaType.TEXT_HTML

Payload

Multipart/form-data Example

    filename = HelloWorld9universal.apk
    Content-Disposition = form-data; name="uploadedfile"; filename="HelloWorld9universal.apk"

Response

Status: 200 OK

HTML Example


    <html>
    <body>
        <textarea>
            [{"minOsVersion":"9","filename":"HelloWorld9universal.apk","os":"Android","size":4835,
            "icon":"res\/mipmap-xhdpi-v4\/ic_launcher.png","label":"HelloWorld","versionName":"1.0","version":"1",
                "pkg":"com.ibm.mytest1","cid":"170","status":200}]
        </textarea>
    </body>
    </html>

Note: The output values of fields os, label, pkg, versionName, version, size, filename, and cid captured from the upload API response will be used in the addApplication API. Ensure that these values are noted and used correctly in the addApplication API payload, else an exception will be thrown. For example, if an incorrect content id (cid) value is mentioned, a null pointer exception will be thrown.

Errors

500
An internal error occurred.