Update and Delete Applications

Delete Applications

You can delete applications on an existing cloud by DELETing to /api/clouds/XXXXX/applications/XXXXX

RestClient.delete(API_aim + "/api/clouds/XXXXX/applications/XXXXX, headers)

Update Existing Applications

If you want to update an existing application you can do this by PUTting to /api/clouds/XXXXX/applications/XXXX, e.g.

headers = {"X-Scalarium-Token" => "XXXXX", "Accept" => "application/vnd.scalarium-v1+json", "Content-Type"=>"application/json"}

RestClient.put("https://manage.scalarium.com/api/applications/XXXXXX",
                JSON.dump(:name => 'the new name',
                          :application_type => 'php',
                          :scm_type => 'git',
                          :scm_url => 'git://github.com/peritor/photopoll.git'),
                headers)

The above example will change the application name, type, and some SCM/repository deployment settings.