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}
Associate an Application with a Route.
http://apidocs.cloudfoundry.org/214/apps/associate_route_with_the_app.html
Parameters:
Name | Type | Description |
---|---|---|
appGuid |
String | [App guid] |
routeGuid |
String | [Route guid] |
- Source:
Returns:
[description]
- Type
- JSON
getAppRoutes(appGuid) → {JSON}
Get routes from an App
http://apidocs.cloudfoundry.org/214/apps/list_all_routes_for_the_app.html
Parameters:
Name | Type | Description |
---|---|---|
appGuid |
String | [App guid] |
- Source:
Returns:
[App Info]
- Type
- JSON
getApps(filter) → {JSON}
Returns all applications.
http://apidocs.cloudfoundry.org/213/apps/list_all_apps.html
Parameters:
Name | Type | Description |
---|---|---|
filter |
JSON | [Search options] |
- Source:
Returns:
[return a JSON response]
- Type
- JSON
Example
PENDING
getEnvironmentVariables(appGuid, filter) → {JSON}
Get environment variables
http://apidocs.cloudfoundry.org/222/apps/get_the_env_for_an_app.html
Parameters:
Name | Type | Description |
---|---|---|
appGuid |
String | [App guid] |
filter |
String | [description] |
- Source:
Returns:
[Service Bindings]
- Type
- JSON
getInstances(appGuid) → {JSON}
Get Instances
http://apidocs.cloudfoundry.org/215/apps/get_the_instance_information_for_a_started_app.html
Parameters:
Name | Type | Description |
---|---|---|
appGuid |
String | [App guid] |
- Source:
Returns:
[App Info]
- Type
- JSON
getServiceBindings(appGuid, 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 |
---|---|---|
appGuid |
String | [App guid] |
filter |
String | [description] |
- Source:
Returns:
[Service Bindings]
- Type
- JSON
getStats(appGuid) → {JSON}
Get stats from an App
http://apidocs.cloudfoundry.org/214/apps/get_detailed_stats_for_a_started_app.html
Parameters:
Name | Type | Description |
---|---|---|
appGuid |
String | [App guid] |
- Source:
Returns:
[information about the application]
- Type
- JSON
getSummary(appGuid) → {JSON}
Get summary about an application
http://apidocs.cloudfoundry.org/214/apps/get_app_summary.html
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}
Restage an Application
http://apidocs.cloudfoundry.org/222/apps/restage_an_app.html
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