A golang libary for Pivotal Network.

go get


go-pivnet API library

A golang library for Pivotal Network.

See also the pivnet-cli and the pivnet-resource.


See example for an executable example.



config := pivnet.ClientConfig{
  Host:      pivnet.DefaultHost,
  Token:     "token-from-pivnet",
  UserAgent: "user-agent",

stdoutLogger := log.New(os.Stdout, "", log.LstdFlags)
stderrLogger := log.New(os.Stderr, "", log.LstdFlags)

verbose := false
logger := logshim.NewLogShim(stdoutLogger, stderrLogger, verbose)

client := pivnet.NewClient(config, logger)

products, _ := client.Products.List()

fmt.Printf("products: %v", products)

Running the tests

Install the ginkgo executable with:

go get -u

The tests require a valid Pivotal Network API token and host.

Refer to the official docs for more details on obtaining a Pivotal Network API token.

It is advised to run the acceptance tests against the Pivotal Network integration environment endpoint i.e. HOST=''.

Run the tests with the following command:

API_TOKEN=my-token \
HOST='' \


Please make all pull requests to the develop branch, and ensure the tests pass locally.

Project management

The CI for this project can be found here and the scripts can be found in the pivnet-resource-ci repo.

The roadmap is captured in Pivotal Tracker.