cf-node-client
momo auto_awesome BUY CLAUDE KIT WITH 20% OFF coffee BUY ME COFFEE

Class: Spaces

Spaces(endPoint, options) → {void}

Manage Spaces on Cloud Foundry Supports both Cloud Foundry API v2 and v3

Constructor

new Spaces(endPoint, options) → {void}

Parameters:
Name Type Description
endPoint String [CC endpoint]
options Object [Configuration options]
Source:
Returns:
Type
void

Methods

add(spaceOptions) → {Promise}

Parameters:
Name Type Description
spaceOptions Object [Space options]
Source:
Returns:
[Promise resolving to created space]
Type
Promise

getAllSpaces(filteropt) → {Promise.<Array>}

Get ALL spaces across all pages (auto-pagination). Returns a flat array of every space resource. Results are cached when caching is enabled.
Parameters:
Name Type Attributes Description
filter Object <optional>
Base filter (merged with pagination params)
Source:
Returns:
Flat array of all space resources
Type
Promise.<Array>

getApps(guid, filter) → {Promise}

Parameters:
Name Type Description
guid String [Space GUID]
filter Object [Filter options]
Source:
Returns:
[Promise resolving to apps list]
Type
Promise

getAuditors(guid, filter) → {Promise}

Parameters:
Name Type Description
guid String [Space GUID]
filter Object [Filter options]
Source:
Returns:
[Promise resolving to auditors list]
Type
Promise

getDevelopers(guid, filter) → {Promise}

Parameters:
Name Type Description
guid String [Space GUID]
filter Object [Filter options]
Source:
Returns:
[Promise resolving to developers list]
Type
Promise

getManagers(guid, filter) → {Promise}

Parameters:
Name Type Description
guid String [Space GUID]
filter Object [Filter options]
Source:
Returns:
[Promise resolving to managers list]
Type
Promise

getSpace(guid) → {Promise}

Parameters:
Name Type Description
guid String [Space GUID]
Source:
Returns:
[Promise resolving to space]
Type
Promise

getSpaceApps(guid, filter) → {Promise}

Get apps in a Space (alias for getApps — backward compatibility)
Parameters:
Name Type Description
guid String [Space GUID]
filter Object [Filter options]
Source:
Returns:
[Promise resolving to apps list]
Type
Promise

getSpaceByName(name, orgGuidopt) → {Promise}

Find a Space by name using server-side filtering. Returns the first matching resource or null if not found. Optionally filter by organization GUID to disambiguate. v2: Uses q=name:{name} filter (and q=organization_guid:{orgGuid} if provided) v3: Uses names={name} filter (and organization_guids={orgGuid} if provided)
Parameters:
Name Type Attributes Description
name String [Space name]
orgGuid String <optional>
[Optional organization GUID to narrow search]
Source:
Returns:
[Promise resolving to space resource or null]
Type
Promise

getSpaces(filter) → {Promise}

Parameters:
Name Type Description
filter Object [Filter options]
Source:
Returns:
[Promise resolving to spaces list]
Type
Promise

getSummary(guid) → {Promise}

Parameters:
Name Type Description
guid String [Space GUID]
Source:
Returns:
[Promise resolving to space summary]
Type
Promise

getUsers(guid, filter) → {Promise}

Parameters:
Name Type Description
guid String [Space GUID]
filter Object [Filter options]
Source:
Returns:
[Promise resolving to users list]
Type
Promise

remove(guid, deleteOptions) → {Promise}

Parameters:
Name Type Description
guid String [Space GUID]
deleteOptions Object [Delete options]
Source:
Returns:
[Promise resolving to delete result]
Type
Promise

update(guid, spaceOptions) → {Promise}

Parameters:
Name Type Description
guid String [Space GUID]
spaceOptions Object [Space options]
Source:
Returns:
[Promise resolving to updated space]
Type
Promise