I want deploy a jar file which is availble for me in my pc to RTF Mule server managed by AKS.I want use ARM rest api.
curl --location --request POST 'https://anypoint.mulesoft.com/hybrid/api/v1/applications' \
--header 'x-anypnt-env-id: e21c3d' \
--header 'x-anypnt-org-id: 321d5ac3e' \
--header 'Authorization: Bearer 4f4e0ce1340c29f7baf9' \
--header 'Content-Type: multipart/form-data' \
--header 'Cookie: XSRF-TOKEN=TLy3BYtp-pshrqU42; mulesoft.sess=eyJpeyJ1c2VyX2lkIjoiZmU2YWZlMGQtMTZhZC00NDEwLTk1YTUtNDQ5MzUyZTgwMmUzIn19fQ==; mulesoft.sess.sig=IlvX_h9vp_ijZt_hAh0gM5WXoEs' \
--form 'file=@"/C:/Users/wb587070/AnypointStudio/s7-12-workspace/test-project/target/test-project-5.0.0-dev393-mule-application.jar"' \
--form 'artifactName="test-project"' \
--form 'targetId="30683393-4494-4d21-87c6-be27679ed021"' \
I am using curl to deploy jar file but I am getting "403 forbidden error"
In this knowledge article the application is deployed first to Exchange, and then from Exchange to the Runtime Fabric server. Is there any way by using Anypoint Runtime Manager REST API to deploy application straight to server with out using Exchange
No. Application deployments must go through the Anypoint Exchange repository first.
You can use Anypoint CLI as an alternative to the REST API however it still requires deploying to Exchange first: https://docs.mulesoft.com/anypoint-cli/3.x/runtime-fabric-apps#runtime-mgr-application-deploy