Class: Apps

Apps

new Apps(endPoint)

This public class manages the operations related with Applications on Cloud Controller.
Parameters:
Name Type Description
endPoint String [CC endpoint]
Source:

Methods

add(token_type, access_token, appOptions) → {json}

Creates a new application on Cloud Controller. http://apidocs.cloudfoundry.org/214/apps/creating_an_app.html
Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
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(token_type, access_token, app_guid, route_guid) → {JSon}

Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
app_guid String [App guid]
route_guid String [Route guid]
Source:
Returns:
[description]
Type
JSon

getAppRoutes(token_type, access_token, app_guid) → {Json}

Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
app_guid String [App guid]
Source:
Returns:
[App Info]
Type
Json

getApps(token_type, access_token) → {JSON}

Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
Source:
Returns:
[return a JSON response]
Type
JSON
Example
PENDING

getEnvironmentVariables(token_type, access_token, app_guid, filter) → {JSon}

Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
app_guid String [App guid]
filter String [description]
Source:
Returns:
[Service Bindings]
Type
JSon

getInstances(token_type, access_token, app_guid) → {Json}

Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
app_guid String [App guid]
Source:
Returns:
[App Info]
Type
Json

getServiceBindings(token_type, access_token, app_guid, filter) → {JSon}

Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
app_guid String [App guid]
filter String [description]
Source:
Returns:
[Service Bindings]
Type
JSon

getStats(token_type, access_token, app_guid) → {json}

Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
app_guid String [App guid]
Source:
Returns:
[information about the application]
Type
json

getSummary(token_type, access_token, app_guid) → {json}

Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
app_guid String [App guid]
Source:
Returns:
[information about the application]
Type
json

remove(token_type, access_token, app_guid) → {json}

Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
app_guid String [App guid]
Source:
Returns:
[information about the application]
Type
json

restage(token_type, access_token, app_guid) → {JSon}

Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
app_guid String [App guid]
Source:
Returns:
[Service Bindings]
Type
JSon

setEndPoint(endPoint)

Set endpoint
Parameters:
Name Type Description
endPoint String [CC endpoint]
Source:

start(token_type, access_token, app_guid) → {json}

Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
app_guid String [App guid]
Source:
Returns:
[information about the application]
Type
json

stop(token_type, access_token, app_guid) → {json}

Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
app_guid String [App guid]
Source:
Returns:
[information about the application]
Type
json

update(token_type, access_token, app_guid, appOptions) → {json}

Parameters:
Name Type Description
token_type String [Authentication type]
access_token String [Authentication token]
app_guid String [App guid]
appOptions json [options to create the application]
Source:
Returns:
[information about the application]
Type
json

upload(token_type, access_token, app_guid, 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
token_type String [Authentication type]
access_token String [Authentication token]
app_guid String [App guid]
filePath String [file path to upload]
async Boolean [Sync/Async]
Source:
Returns:
[{}/Job information]
Type
Json/String