Upload mda Package using Deploy API (https://cloud.home.mendix.com/api/v3)

0
Hi have a problem using POST, getting error “HTTP/1.1 404 not found”   Tried below command, says, 404 not found.   curl -v -F "file=E:\out.mda" -X POST -H "Mendix-Username: xxxxxxx@siemens.com" -H "Mendix-ApiKey: xxxxxxx" -H "Authorization: MxToken xxxxx" "https://cloud.home.mendix.com/api/v3/apps/<appid>/packages/upload?name=out.mda”   Tried below command, says, 405 method not allowed.   curl -v -F "file=E:\out.mda" -X POST -H "Mendix-Username: xxxxxxx@siemens.com" -H "Mendix-ApiKey: xxxxxxx" -H "Authorization: MxToken xxxxx" "https://cloud.home.mendix.com/api/v3/apps/<appid>”   but when we try GET environments and permissions, it shows us the environments and permissions associated with it.  working: curl -v -F "file=E:\out.mda" -X GET -H "Mendix-Username: xxxxxxx@siemens.com" -H "Mendix-ApiKey: xxxxxxx" -H "Authorization: MxToken xxxxx" "https://cloud.home.mendix.com/api/v3/apps/<appid>/environments”   Working: curl -v -F "file=E:\out.mda" -X GET -H "Mendix-Username: xxxxxxx@siemens.com" -H "Mendix-ApiKey: xxxxxxx" -H "Authorization: MxToken xxxxx" "https://cloud.home.mendix.com/api/v3/apps/<appid>/environments/<envid>/permissions”   FYI.. have all API rights under Environments/permissions tab   Could you please suggest your ideas on this if worked on deploy API? Thank you
asked
2 answers
0

According to the documentation the url you have is not correct:

“https://cloud.home.mendix.com/api/v3/apps/<appid>/packages/upload?name=out.mda” should read

 

https://deploy.mendix.com/api/1/apps/<AppId>/packages/upload?name=out.mda

See https://docs.mendix.com/apidocs-mxsdk/apidocs/deploy-api/#3102-request

 

answered
0

Thank you for the reply.

But the url what you shared is for mendix older version right? even we experimented that as well, it shows us app not found because our app is in latest version.

 

see: https://docs.mendix.com/apidocs-mxsdk/apidocs/deploy-api-3/

 

answered