Methods
add(appOptions) → {Promise}
Create a new application.
Parameters:
| Name | Type | Description |
|---|---|---|
appOptions |
Object |
Returns:
- Type
- Promise
getAllApps(filteropt) → {Promise.<Array>}
Get ALL apps across all pages (auto-pagination).
Returns a flat array of every app resource.
Results are cached when caching is enabled.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
filter |
Object |
<optional> |
Base filter (merged with pagination params) |
Returns:
Flat array of all app resources
- Type
- Promise.<Array>
getApp(appGuid) → {Promise}
Get a single application by GUID.
Parameters:
| Name | Type | Description |
|---|---|---|
appGuid |
String |
- Source:
Returns:
- Type
- Promise
getAppByName(name, spaceGuidopt) → {Promise}
Find an Application by name using server-side filtering.
Returns the first matching resource or null if not found.
Optionally filter by space GUID.
v2: Uses q=name:{name} filter (and q=space_guid:{spaceGuid} if provided)
v3: Uses names={name} filter (and space_guids={spaceGuid} if provided)
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
name |
String | [Application name] | |
spaceGuid |
String |
<optional> |
[Optional space GUID to narrow search] |
- Source:
Returns:
[Promise resolving to app resource or null]
- Type
- Promise
getApps(filteropt) → {Promise}
List all applications.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
filter |
Object |
<optional> |
Query-string filter |
- Source:
Returns:
- Type
- Promise
getSummary(appGuid) → {Promise}
Get app summary (v2) or app info (v3).
Parameters:
| Name | Type | Description |
|---|---|---|
appGuid |
String |
Returns:
- Type
- Promise
remove(appGuid) → {Promise}
Delete an application.
Parameters:
| Name | Type | Description |
|---|---|---|
appGuid |
String |
Returns:
- Type
- Promise
restart(appGuid) → {Promise}
Restart an application (stop then start).
Parameters:
| Name | Type | Description |
|---|---|---|
appGuid |
String |
Returns:
- Type
- Promise
start(appGuid) → {Promise}
Start an application.
v2: PUT /v2/apps/:guid { state: "STARTED" }
v3: POST /v3/apps/:guid/actions/start
Parameters:
| Name | Type | Description |
|---|---|---|
appGuid |
String |
Returns:
- Type
- Promise
stop(appGuid) → {Promise}
Stop an application.
v2: PUT /v2/apps/:guid { state: "STOPPED" }
v3: POST /v3/apps/:guid/actions/stop
Parameters:
| Name | Type | Description |
|---|---|---|
appGuid |
String |
Returns:
- Type
- Promise
update(appGuid, appOptions) → {Promise}
Update an application.
Parameters:
| Name | Type | Description |
|---|---|---|
appGuid |
String | |
appOptions |
Object |
Returns:
- Type
- Promise