How to upload app via API?

What should I do to upload app via API?

Hi Ian,

You can upload your iOS application (.ipa file) or android application (.apk file) to the LambdaTest servers using our REST API. You need to provide your Username and Access Key in the format Username:AccessKey in the cURL command for authentication. Make sure to add the path of the appFile in the cURL request.

Here is an example cURL request to upload your app using our REST API:

curl -u "YOUR LT_USERNAME:YOUR LT_ACCESSKEY" -X POST "https://manual-api.lambdatest.com/app/upload/realDevice" -F "appFile=@"YOUR APP FILE PATH"

I have used the above curl expression but i am getting the error as shown below. Can somebody look into this issue.

java.lang.AssertionError: Curl Response - Doesnt not have App url instead has the message : {“message”:“name field is missing in request body”,“statu s”:“upload failed”} expected [false] but found [true]

Not sure why this is failing now as same curl expression was working fine before.

Hi Bajali, greetings.

The app name field has been made compulsory going forward. Kindly run the below command to upload the app and it should work.

curl -u "user_name:access_key" -X POST "https://manual-api.lambdatest.com/app/upload/realDevice" -F "appFile=@"D:\apkipa\app-debug.apk"" -F "name="sampleName"" -F "visibility="individual""

I hope it helps!

Thanks a lot. Your above solution works fine.

1 Like