Skip to content

SAP/cloud-foundry-tools-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

152 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GitHub package.json version CircleCI Coverage Status Commitizen friendly REUSE status

Overview

This package provides a set of APIs to help you develop applications in Cloud Foundry. You can use these APIs to manage apps, service instances, orgs, spaces, and users in your environment. Mostly, this is a wrapper of the CF command line client, which runs a particular command and parses the output to the suitable JSON file. If an error or failure occurs, the runtime exception throws with relevant problem information.

API Reference Guide

API guide

Prerequisite

Make sure you have installed the CF CLI v8 tool in your environment.

Examples of usage

Example 1

try {
  const result = await cfLogin("https://api.cf.....com", "user", "password");
  if (result === "OK") {
    // successful
  }
} catch (e) {
  // display or/and log error
}

Example 2

try {
  const spaces = await cfGetAvailableSpaces("myOrg");
  for (const space of spaces) {
    console.log("Space label is " + space.label + " guid is " + space.guid);
  }
} catch (e) {
  // display or/and log error
}

Contributing

Contributing information can be found in the CONTRIBUTING.md file.

About

This package provides a set of APIs for easy application development with Cloud Foundry. You can use these APIs to manage apps, service instances, orgs, spaces, and users in your environment.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors