How to upload a new file to deployment manager via API

303 Views Asked by At

Looking at jelastic's api documentation but I can't figure out how to upload a file to our deployment manager via API, or fetch those URLs via Jelastic api. Is there a way to do that?

The goal here is to upload a file via API, retrieve that URL and then use the DeployArchive endpoint to upload it to a specific context.

If there's not a way of uploading a file to the deployment manager is there an alternative way of deploying a zip/war to a specific context completely via API?

1

There are 1 best solutions below

2
On BEST ANSWER

There is no way to upload files via API to the deployment manager. To deploy the application to the specific context, you can use following API request:

https://[hoster-api-host]/1.0/environment/control/rest/deployapp?envname=[string]&session=[string]&fileurl=[string]&filename=[string]&context=[string]

where:

envname - the name of the environment, session - your session, fileurl - link to file, filename - name of the archive file, context - given context. If context is not defined then application will be deployed to the ROOT context

More information on this API request can be found in our API documentation Environment -> Control -> DeployApp