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}
Associate an Application with a Route.
http://apidocs.cloudfoundry.org/214/apps/associate_route_with_the_app.html
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}
Get routes from an App
http://apidocs.cloudfoundry.org/214/apps/list_all_routes_for_the_app.html
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}
Returns all applications.
http://apidocs.cloudfoundry.org/213/apps/list_all_apps.html
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}
Get environment variables
http://apidocs.cloudfoundry.org/222/apps/get_the_env_for_an_app.html
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}
Get Instances
http://apidocs.cloudfoundry.org/215/apps/get_the_instance_information_for_a_started_app.html
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}
Get Service Binding from an App
http://apidocs.cloudfoundry.org/221/apps/list_all_service_bindings_for_the_app.html
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}
Get stats from an App
http://apidocs.cloudfoundry.org/214/apps/get_detailed_stats_for_a_started_app.html
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}
Get summary about an application
http://apidocs.cloudfoundry.org/214/apps/get_app_summary.html
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}
Restage an Application
http://apidocs.cloudfoundry.org/222/apps/restage_an_app.html
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