Class: Apps

Apps

This public class manages the operations related with Applications on Cloud Controller.

Constructor

new Apps()

Source:

Methods

add(appOptions) → {JSON}

Creates a new application on Cloud Controller. http://apidocs.cloudfoundry.org/214/apps/creating_an_app.html
Parameters:
Name Type Description
appOptions JSON [options to create the application]
Source:
Returns:
[information about the application]
Type
JSON
Example
var appOptions = {
    "name": name,
    "space_guid": space_guid,
    "buildpack" : buildPack
}

associateRoute(appGuid, routeGuid) → {JSON}

Parameters:
Name Type Description
appGuid String [App guid]
routeGuid String [Route guid]
Source:
Returns:
[description]
Type
JSON

getAppRoutes(appGuid) → {JSON}

Parameters:
Name Type Description
appGuid String [App guid]
Source:
Returns:
[App Info]
Type
JSON

getApps(filter) → {JSON}

Parameters:
Name Type Description
filter JSON [Search options]
Source:
Returns:
[return a JSON response]
Type
JSON
Example
PENDING

getEnvironmentVariables(appGuid, filter) → {JSON}

Parameters:
Name Type Description
appGuid String [App guid]
filter String [description]
Source:
Returns:
[Service Bindings]
Type
JSON

getInstances(appGuid) → {JSON}

Parameters:
Name Type Description
appGuid String [App guid]
Source:
Returns:
[App Info]
Type
JSON

getServiceBindings(appGuid, filter) → {JSON}

Parameters:
Name Type Description
appGuid String [App guid]
filter String [description]
Source:
Returns:
[Service Bindings]
Type
JSON

getStats(appGuid) → {JSON}

Parameters:
Name Type Description
appGuid String [App guid]
Source:
Returns:
[information about the application]
Type
JSON

getSummary(appGuid) → {JSON}

Parameters:
Name Type Description
appGuid String [App guid]
Source:
Returns:
[information about the application]
Type
JSON

remove(appGuid) → {JSON}

Parameters:
Name Type Description
appGuid String [App guid]
Source:
Returns:
[information about the application]
Type
JSON

removeServiceBindings(appGuid, serviceGindingGuid) → {JSON}

Remove a Service Binding from an App. http://apidocs.cloudfoundry.org/226/apps/remove_service_binding_from_the_app.html This method only run in CC version >= 2.42 This method has another alternative: http://apidocs.cloudfoundry.org/217/service_bindings/delete_a_particular_service_binding.html
Parameters:
Name Type Description
appGuid String [App guid]
serviceGindingGuid String [Service Binding guid]
Source:
Returns:
[Response]
Type
JSON

restage(appGuid) → {JSON}

Parameters:
Name Type Description
appGuid String [App guid]
Source:
Returns:
[Service Bindings]
Type
JSON

start(appGuid) → {JSON}

Parameters:
Name Type Description
appGuid String [App guid]
Source:
Returns:
[information about the application]
Type
JSON

stop(appGuid) → {JSON}

Parameters:
Name Type Description
appGuid String [App guid]
Source:
Returns:
[information about the application]
Type
JSON

update(appGuid, appOptions) → {JSON}

Parameters:
Name Type Description
appGuid String [App guid]
appOptions JSON [options to create the application]
Source:
Returns:
[information about the application]
Type
JSON

upload(appGuid, filePath, async) → {JSON/String}

Upload source code http://apidocs.cloudfoundry.org/214/apps/uploads_the_bits_for_an_app.html function File(path, filename, fileSize, encoding, contentType) 'application': rest.file(path, null, fileSizeInBytes, null, 'application/zip')
Parameters:
Name Type Description
appGuid String [App guid]
filePath String [file path to upload]
async Boolean [Sync/Async]
Source:
Returns:
[{}/Job information]
Type
JSON/String