pax_global_header00006660000000000000000000000064141370357150014520gustar00rootroot0000000000000052 comment=a3322848e7aabdebf6c8ed5db34cb5a4818ad554 heroku-go-5.4.0/000077500000000000000000000000001413703571500134265ustar00rootroot00000000000000heroku-go-5.4.0/.github/000077500000000000000000000000001413703571500147665ustar00rootroot00000000000000heroku-go-5.4.0/.github/workflows/000077500000000000000000000000001413703571500170235ustar00rootroot00000000000000heroku-go-5.4.0/.github/workflows/build.yml000066400000000000000000000004401413703571500206430ustar00rootroot00000000000000name: build on: [pull_request] jobs: build: runs-on: ubuntu-latest strategy: matrix: go: [ '1.16', '1.17' ] steps: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: go-version: ${{ matrix.go }} - run: make build heroku-go-5.4.0/.github/workflows/lint.yml000066400000000000000000000002151413703571500205120ustar00rootroot00000000000000name: lint on: [pull_request] jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: make checks heroku-go-5.4.0/.gitignore000066400000000000000000000000051413703571500154110ustar00rootroot00000000000000.ideaheroku-go-5.4.0/CODEOWNERS000066400000000000000000000002141413703571500150160ustar00rootroot00000000000000# Comment line immediately above ownership line is reserved for related gus information. Please be careful while editing. #ECCN:Open Source heroku-go-5.4.0/LICENSE000066400000000000000000000021141413703571500144310ustar00rootroot00000000000000Copyright (©) 2014-2016 Timothée Peignier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. heroku-go-5.4.0/Makefile000066400000000000000000000005441413703571500150710ustar00rootroot00000000000000SRC = $(shell find . -type f -name '*.go' -not -path "*vendor/*") default: build build: checks cd v5 && go install . generate: cd v5 && ../script/generate checks: fmt-check fmt-check: @test -z "$(shell gofmt -l $(SRC) | tee /dev/stderr)" || (echo "[WARN] Fix formatting issues in with 'make fmt'" && false) .PHONY: build checks fmt-check generate heroku-go-5.4.0/README.md000066400000000000000000000016001413703571500147020ustar00rootroot00000000000000# Heroku Platform API [![GoDoc](https://godoc.org/github.com/heroku/heroku-go?status.svg)](https://godoc.org/github.com/heroku/heroku-go) An API client interface for Heroku Platform API for the Go (golang) programming language. ## Usage $ go mod init myproj $ cd myproj ## Example ```go package main import ( "context" "flag" "fmt" "log" heroku "github.com/heroku/heroku-go/v5" ) var ( username = flag.String("username", "", "api username") password = flag.String("password", "", "api password") ) func main() { log.SetFlags(0) flag.Parse() heroku.DefaultTransport.Username = *username heroku.DefaultTransport.Password = *password h := heroku.NewService(heroku.DefaultClient) addons, err := h.AddOnList(context.TODO(), &heroku.ListRange{Field: "name"}) if err != nil { log.Fatal(err) } for _, addon := range addons { fmt.Println(addon.Name) } } ``` $ go buildheroku-go-5.4.0/script/000077500000000000000000000000001413703571500147325ustar00rootroot00000000000000heroku-go-5.4.0/script/generate000077500000000000000000000016731413703571500164610ustar00rootroot00000000000000#!/usr/bin/env bash set -ex : ${UPDATE_SCHEMA:=1} function usage() { cat < "$GENERATED_FILE" sed -E -i '' \ "s/^([[:space:]]*Version[[:space:]]*=[[:space:]]*)\"\"\$/\1\"${CLIENT_VERSION}\"/" \ "$GENERATED_FILE" gofmt -w "$GENERATED_FILE" heroku-go-5.4.0/v5/000077500000000000000000000000001413703571500137605ustar00rootroot00000000000000heroku-go-5.4.0/v5/go.mod000066400000000000000000000002661413703571500150720ustar00rootroot00000000000000module github.com/heroku/heroku-go/v5 go 1.12 require ( github.com/cenkalti/backoff v2.1.1+incompatible github.com/google/go-querystring v1.0.0 github.com/pborman/uuid v1.2.0 ) heroku-go-5.4.0/v5/go.sum000066400000000000000000000013061413703571500151130ustar00rootroot00000000000000github.com/cenkalti/backoff v2.1.1+incompatible h1:tKJnvO2kl0zmb/jA5UKAt4VoEVw1qxKWjE/Bpp46npY= github.com/cenkalti/backoff v2.1.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= heroku-go-5.4.0/v5/heroku.go000066400000000000000000011521551413703571500156160ustar00rootroot00000000000000// Generated service client for heroku API. // // To be able to interact with this API, you have to // create a new service: // // s := heroku.NewService(nil) // // The Service struct has all the methods you need // to interact with heroku API. // package v5 import ( "bytes" "context" "encoding/json" "fmt" "github.com/google/go-querystring/query" "io" "net/http" "reflect" "runtime" "strings" "time" ) var _ = time.Second const ( Version = "v5" DefaultUserAgent = "heroku/" + Version + " (" + runtime.GOOS + "; " + runtime.GOARCH + ")" DefaultURL = "https://api.heroku.com" ) // Service represents your API. type Service struct { client *http.Client URL string } // NewService creates a Service using the given, if none is provided // it uses http.DefaultClient. func NewService(c *http.Client) *Service { if c == nil { c = http.DefaultClient } return &Service{ client: c, URL: DefaultURL, } } // NewRequest generates an HTTP request, but does not perform the request. func (s *Service) NewRequest(ctx context.Context, method, path string, body interface{}, q interface{}) (*http.Request, error) { var ctype string var rbody io.Reader switch t := body.(type) { case nil: case string: rbody = bytes.NewBufferString(t) case io.Reader: rbody = t default: v := reflect.ValueOf(body) if !v.IsValid() { break } if v.Type().Kind() == reflect.Ptr { v = reflect.Indirect(v) if !v.IsValid() { break } } j, err := json.Marshal(body) if err != nil { return nil, err } rbody = bytes.NewReader(j) ctype = "application/json" } req, err := http.NewRequest(method, s.URL+path, rbody) if err != nil { return nil, err } req = req.WithContext(ctx) if q != nil { v, err := query.Values(q) if err != nil { return nil, err } query := v.Encode() if req.URL.RawQuery != "" && query != "" { req.URL.RawQuery += "&" } req.URL.RawQuery += query } req.Header.Set("Accept", "application/json") req.Header.Set("User-Agent", DefaultUserAgent) if ctype != "" { req.Header.Set("Content-Type", ctype) } return req, nil } // Do sends a request and decodes the response into v. func (s *Service) Do(ctx context.Context, v interface{}, method, path string, body interface{}, q interface{}, lr *ListRange) error { req, err := s.NewRequest(ctx, method, path, body, q) if err != nil { return err } if lr != nil { lr.SetHeader(req) } resp, err := s.client.Do(req) if err != nil { return err } defer resp.Body.Close() switch t := v.(type) { case nil: case io.Writer: _, err = io.Copy(t, resp.Body) default: err = json.NewDecoder(resp.Body).Decode(v) } return err } // Get sends a GET request and decodes the response into v. func (s *Service) Get(ctx context.Context, v interface{}, path string, query interface{}, lr *ListRange) error { return s.Do(ctx, v, "GET", path, nil, query, lr) } // Patch sends a Path request and decodes the response into v. func (s *Service) Patch(ctx context.Context, v interface{}, path string, body interface{}) error { return s.Do(ctx, v, "PATCH", path, body, nil, nil) } // Post sends a POST request and decodes the response into v. func (s *Service) Post(ctx context.Context, v interface{}, path string, body interface{}) error { return s.Do(ctx, v, "POST", path, body, nil, nil) } // Put sends a PUT request and decodes the response into v. func (s *Service) Put(ctx context.Context, v interface{}, path string, body interface{}) error { return s.Do(ctx, v, "PUT", path, body, nil, nil) } // Delete sends a DELETE request. func (s *Service) Delete(ctx context.Context, v interface{}, path string) error { return s.Do(ctx, v, "DELETE", path, nil, nil, nil) } // ListRange describes a range. type ListRange struct { Field string Max int Descending bool FirstID string LastID string } // SetHeader set headers on the given Request. func (lr *ListRange) SetHeader(req *http.Request) { var hdrval string if lr.Field != "" { hdrval += lr.Field + " " } hdrval += lr.FirstID + ".." + lr.LastID params := make([]string, 0, 2) if lr.Max != 0 { params = append(params, fmt.Sprintf("max=%d", lr.Max)) } if lr.Descending { params = append(params, "order=desc") } if len(params) > 0 { hdrval += fmt.Sprintf("; %s", strings.Join(params, ",")) } req.Header.Set("Range", hdrval) return } // Bool allocates a new int value returns a pointer to it. func Bool(v bool) *bool { p := new(bool) *p = v return p } // Int allocates a new int value returns a pointer to it. func Int(v int) *int { p := new(int) *p = v return p } // Float64 allocates a new float64 value returns a pointer to it. func Float64(v float64) *float64 { p := new(float64) *p = v return p } // String allocates a new string value returns a pointer to it. func String(v string) *string { p := new(string) *p = v return p } // An account represents an individual signed up to use the Heroku // platform. type Account struct { AllowTracking bool `json:"allow_tracking" url:"allow_tracking,key"` // whether to allow third party web activity tracking Beta bool `json:"beta" url:"beta,key"` // whether allowed to utilize beta Heroku features CountryOfResidence *string `json:"country_of_residence" url:"country_of_residence,key"` // country where account owner resides CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when account was created DefaultOrganization *struct { ID string `json:"id" url:"id,key"` // unique identifier of team Name string `json:"name" url:"name,key"` // unique name of team } `json:"default_organization" url:"default_organization,key"` // team selected by default DefaultTeam *struct { ID string `json:"id" url:"id,key"` // unique identifier of team Name string `json:"name" url:"name,key"` // unique name of team } `json:"default_team" url:"default_team,key"` // team selected by default DelinquentAt *time.Time `json:"delinquent_at" url:"delinquent_at,key"` // when account became delinquent Email string `json:"email" url:"email,key"` // unique email address of account Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider ID string `json:"id" url:"id,key"` // unique identifier of an account IdentityProvider *struct { ID string `json:"id" url:"id,key"` // unique identifier of this identity provider Name string `json:"name" url:"name,key"` // user-friendly unique identifier for this identity provider Organization struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"organization" url:"organization,key"` Owner struct { ID string `json:"id" url:"id,key"` // unique identifier of the owner Name string `json:"name" url:"name,key"` // name of the owner Type string `json:"type" url:"type,key"` // type of the owner } `json:"owner" url:"owner,key"` // entity that owns this identity provider Team struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"team" url:"team,key"` } `json:"identity_provider" url:"identity_provider,key"` // Identity Provider details for federated users. LastLogin *time.Time `json:"last_login" url:"last_login,key"` // when account last authorized with Heroku Name *string `json:"name" url:"name,key"` // full name of the account owner SmsNumber *string `json:"sms_number" url:"sms_number,key"` // SMS number of account SuspendedAt *time.Time `json:"suspended_at" url:"suspended_at,key"` // when account was suspended TwoFactorAuthentication bool `json:"two_factor_authentication" url:"two_factor_authentication,key"` // whether two-factor auth is enabled on the account UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when account was updated Verified bool `json:"verified" url:"verified,key"` // whether account has been verified with billing information } // Info for account. func (s *Service) AccountInfo(ctx context.Context) (*Account, error) { var account Account return &account, s.Get(ctx, &account, fmt.Sprintf("/account"), nil, nil) } type AccountUpdateOpts struct { AllowTracking *bool `json:"allow_tracking,omitempty" url:"allow_tracking,omitempty,key"` // whether to allow third party web activity tracking Beta *bool `json:"beta,omitempty" url:"beta,omitempty,key"` // whether allowed to utilize beta Heroku features Name *string `json:"name,omitempty" url:"name,omitempty,key"` // full name of the account owner } // Update account. func (s *Service) AccountUpdate(ctx context.Context, o AccountUpdateOpts) (*Account, error) { var account Account return &account, s.Patch(ctx, &account, fmt.Sprintf("/account"), o) } // Delete account. Note that this action cannot be undone. func (s *Service) AccountDelete(ctx context.Context) (*Account, error) { var account Account return &account, s.Delete(ctx, &account, fmt.Sprintf("/account")) } // Info for account. func (s *Service) AccountInfoByUser(ctx context.Context, accountIdentity string) (*Account, error) { var account Account return &account, s.Get(ctx, &account, fmt.Sprintf("/users/%v", accountIdentity), nil, nil) } type AccountUpdateByUserOpts struct { AllowTracking *bool `json:"allow_tracking,omitempty" url:"allow_tracking,omitempty,key"` // whether to allow third party web activity tracking Beta *bool `json:"beta,omitempty" url:"beta,omitempty,key"` // whether allowed to utilize beta Heroku features Name *string `json:"name,omitempty" url:"name,omitempty,key"` // full name of the account owner } // Update account. func (s *Service) AccountUpdateByUser(ctx context.Context, accountIdentity string, o AccountUpdateByUserOpts) (*Account, error) { var account Account return &account, s.Patch(ctx, &account, fmt.Sprintf("/users/%v", accountIdentity), o) } // Delete account. Note that this action cannot be undone. func (s *Service) AccountDeleteByUser(ctx context.Context, accountIdentity string) (*Account, error) { var account Account return &account, s.Delete(ctx, &account, fmt.Sprintf("/users/%v", accountIdentity)) } // An account feature represents a Heroku labs capability that can be // enabled or disabled for an account on Heroku. type AccountFeature struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when account feature was created Description string `json:"description" url:"description,key"` // description of account feature DisplayName string `json:"display_name" url:"display_name,key"` // user readable feature name DocURL string `json:"doc_url" url:"doc_url,key"` // documentation URL of account feature Enabled bool `json:"enabled" url:"enabled,key"` // whether or not account feature has been enabled FeedbackEmail string `json:"feedback_email" url:"feedback_email,key"` // e-mail to send feedback about the feature ID string `json:"id" url:"id,key"` // unique identifier of account feature Name string `json:"name" url:"name,key"` // unique name of account feature State string `json:"state" url:"state,key"` // state of account feature UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when account feature was updated } // Info for an existing account feature. func (s *Service) AccountFeatureInfo(ctx context.Context, accountFeatureIdentity string) (*AccountFeature, error) { var accountFeature AccountFeature return &accountFeature, s.Get(ctx, &accountFeature, fmt.Sprintf("/account/features/%v", accountFeatureIdentity), nil, nil) } type AccountFeatureListResult []AccountFeature // List existing account features. func (s *Service) AccountFeatureList(ctx context.Context, lr *ListRange) (AccountFeatureListResult, error) { var accountFeature AccountFeatureListResult return accountFeature, s.Get(ctx, &accountFeature, fmt.Sprintf("/account/features"), nil, lr) } type AccountFeatureUpdateOpts struct { Enabled bool `json:"enabled" url:"enabled,key"` // whether or not account feature has been enabled } // Update an existing account feature. func (s *Service) AccountFeatureUpdate(ctx context.Context, accountFeatureIdentity string, o AccountFeatureUpdateOpts) (*AccountFeature, error) { var accountFeature AccountFeature return &accountFeature, s.Patch(ctx, &accountFeature, fmt.Sprintf("/account/features/%v", accountFeatureIdentity), o) } // Add-ons represent add-ons that have been provisioned and attached to // one or more apps. type AddOn struct { Actions []struct{} `json:"actions" url:"actions,key"` // provider actions for this specific add-on AddonService struct { ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service Name string `json:"name" url:"name,key"` // unique name of this add-on-service } `json:"addon_service" url:"addon_service,key"` // identity of add-on service App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // billing application associated with this add-on BilledPrice *struct { Cents int `json:"cents" url:"cents,key"` // price in cents per unit of plan Contract bool `json:"contract" url:"contract,key"` // price is negotiated in a contract outside of monthly add-on billing Unit string `json:"unit" url:"unit,key"` // unit of price for plan } `json:"billed_price" url:"billed_price,key"` // billed price BillingEntity struct { ID string `json:"id" url:"id,key"` // unique identifier of the billing entity Name string `json:"name" url:"name,key"` // name of the billing entity Type string `json:"type" url:"type,key"` // type of Object of the billing entity; new types allowed at any time. } `json:"billing_entity" url:"billing_entity,key"` // billing entity associated with this add-on ConfigVars []string `json:"config_vars" url:"config_vars,key"` // config vars exposed to the owning app by this add-on CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on was created ID string `json:"id" url:"id,key"` // unique identifier of add-on Name string `json:"name" url:"name,key"` // globally unique name of the add-on Plan struct { ID string `json:"id" url:"id,key"` // unique identifier of this plan Name string `json:"name" url:"name,key"` // unique name of this plan } `json:"plan" url:"plan,key"` // identity of add-on plan ProviderID string `json:"provider_id" url:"provider_id,key"` // id of this add-on with its provider State string `json:"state" url:"state,key"` // state in the add-on's lifecycle UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on was updated WebURL *string `json:"web_url" url:"web_url,key"` // URL for logging into web interface of add-on (e.g. a dashboard) } type AddOnListResult []AddOn // List all existing add-ons. func (s *Service) AddOnList(ctx context.Context, lr *ListRange) (AddOnListResult, error) { var addOn AddOnListResult return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/addons"), nil, lr) } // Info for an existing add-on. func (s *Service) AddOnInfo(ctx context.Context, addOnIdentity string) (*AddOn, error) { var addOn AddOn return &addOn, s.Get(ctx, &addOn, fmt.Sprintf("/addons/%v", addOnIdentity), nil, nil) } type AddOnCreateOpts struct { Attachment *struct { Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name for this add-on attachment to this app } `json:"attachment,omitempty" url:"attachment,omitempty,key"` // name for add-on's initial attachment Config map[string]string `json:"config,omitempty" url:"config,omitempty,key"` // custom add-on provisioning options Confirm *string `json:"confirm,omitempty" url:"confirm,omitempty,key"` // name of billing entity for confirmation Name *string `json:"name,omitempty" url:"name,omitempty,key"` // globally unique name of the add-on Plan string `json:"plan" url:"plan,key"` // unique identifier of this plan } // Create a new add-on. func (s *Service) AddOnCreate(ctx context.Context, appIdentity string, o AddOnCreateOpts) (*AddOn, error) { var addOn AddOn return &addOn, s.Post(ctx, &addOn, fmt.Sprintf("/apps/%v/addons", appIdentity), o) } // Delete an existing add-on. func (s *Service) AddOnDelete(ctx context.Context, appIdentity string, addOnIdentity string) (*AddOn, error) { var addOn AddOn return &addOn, s.Delete(ctx, &addOn, fmt.Sprintf("/apps/%v/addons/%v", appIdentity, addOnIdentity)) } // Info for an existing add-on. func (s *Service) AddOnInfoByApp(ctx context.Context, appIdentity string, addOnIdentity string) (*AddOn, error) { var addOn AddOn return &addOn, s.Get(ctx, &addOn, fmt.Sprintf("/apps/%v/addons/%v", appIdentity, addOnIdentity), nil, nil) } type AddOnListByAppResult []AddOn // List existing add-ons for an app. func (s *Service) AddOnListByApp(ctx context.Context, appIdentity string, lr *ListRange) (AddOnListByAppResult, error) { var addOn AddOnListByAppResult return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/apps/%v/addons", appIdentity), nil, lr) } type AddOnUpdateOpts struct { Name *string `json:"name,omitempty" url:"name,omitempty,key"` // globally unique name of the add-on Plan string `json:"plan" url:"plan,key"` // unique identifier of this plan } // Change add-on plan. Some add-ons may not support changing plans. In // that case, an error will be returned. func (s *Service) AddOnUpdate(ctx context.Context, appIdentity string, addOnIdentity string, o AddOnUpdateOpts) (*AddOn, error) { var addOn AddOn return &addOn, s.Patch(ctx, &addOn, fmt.Sprintf("/apps/%v/addons/%v", appIdentity, addOnIdentity), o) } type AddOnListByUserResult []AddOn // List all existing add-ons a user has access to func (s *Service) AddOnListByUser(ctx context.Context, accountIdentity string, lr *ListRange) (AddOnListByUserResult, error) { var addOn AddOnListByUserResult return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/users/%v/addons", accountIdentity), nil, lr) } type AddOnListByTeamResult []AddOn // List add-ons used across all Team apps func (s *Service) AddOnListByTeam(ctx context.Context, teamIdentity string, lr *ListRange) (AddOnListByTeamResult, error) { var addOn AddOnListByTeamResult return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/teams/%v/addons", teamIdentity), nil, lr) } type AddOnResolutionOpts struct { Addon string `json:"addon" url:"addon,key"` // globally unique name of the add-on AddonService *string `json:"addon_service,omitempty" url:"addon_service,omitempty,key"` // unique name of this add-on-service App *string `json:"app,omitempty" url:"app,omitempty,key"` // unique name of app } type AddOnResolutionResult []AddOn // Resolve an add-on from a name, optionally passing an app name. If // there are matches it returns at least one add-on (exact match) or // many. func (s *Service) AddOnResolution(ctx context.Context, o AddOnResolutionOpts) (AddOnResolutionResult, error) { var addOn AddOnResolutionResult return addOn, s.Post(ctx, &addOn, fmt.Sprintf("/actions/addons/resolve"), o) } // Add-on Actions are lifecycle operations for add-on provisioning and // deprovisioning. They allow add-on providers to (de)provision add-ons // in the background and then report back when (de)provisioning is // complete. type AddOnAction struct{} type AddOnActionProvisionResult struct { Actions []struct{} `json:"actions" url:"actions,key"` // provider actions for this specific add-on AddonService struct { ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service Name string `json:"name" url:"name,key"` // unique name of this add-on-service } `json:"addon_service" url:"addon_service,key"` // identity of add-on service App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // billing application associated with this add-on BilledPrice *struct { Cents int `json:"cents" url:"cents,key"` // price in cents per unit of plan Contract bool `json:"contract" url:"contract,key"` // price is negotiated in a contract outside of monthly add-on billing Unit string `json:"unit" url:"unit,key"` // unit of price for plan } `json:"billed_price" url:"billed_price,key"` // billed price BillingEntity struct { ID string `json:"id" url:"id,key"` // unique identifier of the billing entity Name string `json:"name" url:"name,key"` // name of the billing entity Type string `json:"type" url:"type,key"` // type of Object of the billing entity; new types allowed at any time. } `json:"billing_entity" url:"billing_entity,key"` // billing entity associated with this add-on ConfigVars []string `json:"config_vars" url:"config_vars,key"` // config vars exposed to the owning app by this add-on CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on was created ID string `json:"id" url:"id,key"` // unique identifier of add-on Name string `json:"name" url:"name,key"` // globally unique name of the add-on Plan struct { ID string `json:"id" url:"id,key"` // unique identifier of this plan Name string `json:"name" url:"name,key"` // unique name of this plan } `json:"plan" url:"plan,key"` // identity of add-on plan ProviderID string `json:"provider_id" url:"provider_id,key"` // id of this add-on with its provider State string `json:"state" url:"state,key"` // state in the add-on's lifecycle UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on was updated WebURL *string `json:"web_url" url:"web_url,key"` // URL for logging into web interface of add-on (e.g. a dashboard) } // Mark an add-on as provisioned for use. func (s *Service) AddOnActionProvision(ctx context.Context, addOnIdentity string) (*AddOnActionProvisionResult, error) { var addOnAction AddOnActionProvisionResult return &addOnAction, s.Post(ctx, &addOnAction, fmt.Sprintf("/addons/%v/actions/provision", addOnIdentity), nil) } type AddOnActionDeprovisionResult struct { Actions []struct{} `json:"actions" url:"actions,key"` // provider actions for this specific add-on AddonService struct { ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service Name string `json:"name" url:"name,key"` // unique name of this add-on-service } `json:"addon_service" url:"addon_service,key"` // identity of add-on service App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // billing application associated with this add-on BilledPrice *struct { Cents int `json:"cents" url:"cents,key"` // price in cents per unit of plan Contract bool `json:"contract" url:"contract,key"` // price is negotiated in a contract outside of monthly add-on billing Unit string `json:"unit" url:"unit,key"` // unit of price for plan } `json:"billed_price" url:"billed_price,key"` // billed price BillingEntity struct { ID string `json:"id" url:"id,key"` // unique identifier of the billing entity Name string `json:"name" url:"name,key"` // name of the billing entity Type string `json:"type" url:"type,key"` // type of Object of the billing entity; new types allowed at any time. } `json:"billing_entity" url:"billing_entity,key"` // billing entity associated with this add-on ConfigVars []string `json:"config_vars" url:"config_vars,key"` // config vars exposed to the owning app by this add-on CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on was created ID string `json:"id" url:"id,key"` // unique identifier of add-on Name string `json:"name" url:"name,key"` // globally unique name of the add-on Plan struct { ID string `json:"id" url:"id,key"` // unique identifier of this plan Name string `json:"name" url:"name,key"` // unique name of this plan } `json:"plan" url:"plan,key"` // identity of add-on plan ProviderID string `json:"provider_id" url:"provider_id,key"` // id of this add-on with its provider State string `json:"state" url:"state,key"` // state in the add-on's lifecycle UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on was updated WebURL *string `json:"web_url" url:"web_url,key"` // URL for logging into web interface of add-on (e.g. a dashboard) } // Mark an add-on as deprovisioned. func (s *Service) AddOnActionDeprovision(ctx context.Context, addOnIdentity string) (*AddOnActionDeprovisionResult, error) { var addOnAction AddOnActionDeprovisionResult return &addOnAction, s.Post(ctx, &addOnAction, fmt.Sprintf("/addons/%v/actions/deprovision", addOnIdentity), nil) } // An add-on attachment represents a connection between an app and an // add-on that it has been given access to. type AddOnAttachment struct { Addon struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // billing application associated with this add-on ID string `json:"id" url:"id,key"` // unique identifier of add-on Name string `json:"name" url:"name,key"` // globally unique name of the add-on } `json:"addon" url:"addon,key"` // identity of add-on App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // application that is attached to add-on CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on attachment was created ID string `json:"id" url:"id,key"` // unique identifier of this add-on attachment LogInputURL *string `json:"log_input_url" url:"log_input_url,key"` // URL for add-on partners to write to an add-on's logs Name string `json:"name" url:"name,key"` // unique name for this add-on attachment to this app Namespace *string `json:"namespace" url:"namespace,key"` // attachment namespace UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on attachment was updated WebURL *string `json:"web_url" url:"web_url,key"` // URL for logging into web interface of add-on in attached app context } type AddOnAttachmentCreateOpts struct { Addon string `json:"addon" url:"addon,key"` // unique identifier of add-on App string `json:"app" url:"app,key"` // unique identifier of app Confirm *string `json:"confirm,omitempty" url:"confirm,omitempty,key"` // name of owning app for confirmation Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name for this add-on attachment to this app Namespace *string `json:"namespace,omitempty" url:"namespace,omitempty,key"` // attachment namespace } // Create a new add-on attachment. func (s *Service) AddOnAttachmentCreate(ctx context.Context, o AddOnAttachmentCreateOpts) (*AddOnAttachment, error) { var addOnAttachment AddOnAttachment return &addOnAttachment, s.Post(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments"), o) } // Delete an existing add-on attachment. func (s *Service) AddOnAttachmentDelete(ctx context.Context, addOnAttachmentIdentity string) (*AddOnAttachment, error) { var addOnAttachment AddOnAttachment return &addOnAttachment, s.Delete(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments/%v", addOnAttachmentIdentity)) } // Info for existing add-on attachment. func (s *Service) AddOnAttachmentInfo(ctx context.Context, addOnAttachmentIdentity string) (*AddOnAttachment, error) { var addOnAttachment AddOnAttachment return &addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments/%v", addOnAttachmentIdentity), nil, nil) } type AddOnAttachmentListResult []AddOnAttachment // List existing add-on attachments. func (s *Service) AddOnAttachmentList(ctx context.Context, lr *ListRange) (AddOnAttachmentListResult, error) { var addOnAttachment AddOnAttachmentListResult return addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments"), nil, lr) } type AddOnAttachmentListByAddOnResult []AddOnAttachment // List existing add-on attachments for an add-on. func (s *Service) AddOnAttachmentListByAddOn(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnAttachmentListByAddOnResult, error) { var addOnAttachment AddOnAttachmentListByAddOnResult return addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/addons/%v/addon-attachments", addOnIdentity), nil, lr) } type AddOnAttachmentListByAppResult []AddOnAttachment // List existing add-on attachments for an app. func (s *Service) AddOnAttachmentListByApp(ctx context.Context, appIdentity string, lr *ListRange) (AddOnAttachmentListByAppResult, error) { var addOnAttachment AddOnAttachmentListByAppResult return addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/apps/%v/addon-attachments", appIdentity), nil, lr) } // Info for existing add-on attachment for an app. func (s *Service) AddOnAttachmentInfoByApp(ctx context.Context, appIdentity string, addOnAttachmentScopedIdentity string) (*AddOnAttachment, error) { var addOnAttachment AddOnAttachment return &addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/apps/%v/addon-attachments/%v", appIdentity, addOnAttachmentScopedIdentity), nil, nil) } type AddOnAttachmentResolutionOpts struct { AddonAttachment string `json:"addon_attachment" url:"addon_attachment,key"` // unique name for this add-on attachment to this app AddonService *string `json:"addon_service,omitempty" url:"addon_service,omitempty,key"` // unique name of this add-on-service App *string `json:"app,omitempty" url:"app,omitempty,key"` // unique name of app } type AddOnAttachmentResolutionResult []AddOnAttachment // Resolve an add-on attachment from a name, optionally passing an app // name. If there are matches it returns at least one add-on attachment // (exact match) or many. func (s *Service) AddOnAttachmentResolution(ctx context.Context, o AddOnAttachmentResolutionOpts) (AddOnAttachmentResolutionResult, error) { var addOnAttachment AddOnAttachmentResolutionResult return addOnAttachment, s.Post(ctx, &addOnAttachment, fmt.Sprintf("/actions/addon-attachments/resolve"), o) } // Configuration of an Add-on type AddOnConfig struct { Name string `json:"name" url:"name,key"` // unique name of the config Value *string `json:"value" url:"value,key"` // value of the config } type AddOnConfigListResult []AddOnConfig // Get an add-on's config. Accessible by customers with access and by // the add-on partner providing this add-on. func (s *Service) AddOnConfigList(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnConfigListResult, error) { var addOnConfig AddOnConfigListResult return addOnConfig, s.Get(ctx, &addOnConfig, fmt.Sprintf("/addons/%v/config", addOnIdentity), nil, lr) } type AddOnConfigUpdateOpts struct { Config []*struct { Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of the config Value *string `json:"value,omitempty" url:"value,omitempty,key"` // value of the config } `json:"config,omitempty" url:"config,omitempty,key"` } type AddOnConfigUpdateResult []AddOnConfig // Update an add-on's config. Can only be accessed by the add-on partner // providing this add-on. func (s *Service) AddOnConfigUpdate(ctx context.Context, addOnIdentity string, o AddOnConfigUpdateOpts) (AddOnConfigUpdateResult, error) { var addOnConfig AddOnConfigUpdateResult return addOnConfig, s.Patch(ctx, &addOnConfig, fmt.Sprintf("/addons/%v/config", addOnIdentity), o) } // Add-on Plan Actions are Provider functionality for specific add-on // installations type AddOnPlanAction struct { Action string `json:"action" url:"action,key"` // identifier of the action to take that is sent via SSO ID string `json:"id" url:"id,key"` // a unique identifier Label string `json:"label" url:"label,key"` // the display text shown in Dashboard RequiresOwner bool `json:"requires_owner" url:"requires_owner,key"` // if the action requires the user to own the app URL string `json:"url" url:"url,key"` // absolute URL to use instead of an action } // Add-on region capabilities represent the relationship between an // Add-on Service and a specific Region. Only Beta and GA add-ons are // returned by these endpoints. type AddOnRegionCapability struct { AddonService struct { CliPluginName *string `json:"cli_plugin_name" url:"cli_plugin_name,key"` // npm package name of the add-on service's Heroku CLI plugin CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on-service was created HumanName string `json:"human_name" url:"human_name,key"` // human-readable name of the add-on service provider ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service Name string `json:"name" url:"name,key"` // unique name of this add-on-service State string `json:"state" url:"state,key"` // release status for add-on service SupportsMultipleInstallations bool `json:"supports_multiple_installations" url:"supports_multiple_installations,key"` // whether or not apps can have access to more than one instance of this // add-on at the same time SupportsSharing bool `json:"supports_sharing" url:"supports_sharing,key"` // whether or not apps can have access to add-ons billed to a different // app UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on-service was updated } `json:"addon_service" url:"addon_service,key"` // Add-on services represent add-ons that may be provisioned for apps. // Endpoints under add-on services can be accessed without // authentication. ID string `json:"id" url:"id,key"` // unique identifier of this add-on-region-capability Region struct { Country string `json:"country" url:"country,key"` // country where the region exists CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when region was created Description string `json:"description" url:"description,key"` // description of region ID string `json:"id" url:"id,key"` // unique identifier of region Locale string `json:"locale" url:"locale,key"` // area in the country where the region exists Name string `json:"name" url:"name,key"` // unique name of region PrivateCapable bool `json:"private_capable" url:"private_capable,key"` // whether or not region is available for creating a Private Space Provider struct { Name string `json:"name" url:"name,key"` // name of provider Region string `json:"region" url:"region,key"` // region name used by provider } `json:"provider" url:"provider,key"` // provider of underlying substrate UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when region was updated } `json:"region" url:"region,key"` // A region represents a geographic location in which your application // may run. SupportsPrivateNetworking bool `json:"supports_private_networking" url:"supports_private_networking,key"` // whether the add-on can be installed to a Space } type AddOnRegionCapabilityListResult []AddOnRegionCapability // List all existing add-on region capabilities. func (s *Service) AddOnRegionCapabilityList(ctx context.Context, lr *ListRange) (AddOnRegionCapabilityListResult, error) { var addOnRegionCapability AddOnRegionCapabilityListResult return addOnRegionCapability, s.Get(ctx, &addOnRegionCapability, fmt.Sprintf("/addon-region-capabilities"), nil, lr) } type AddOnRegionCapabilityListByAddOnServiceResult []AddOnRegionCapability // List existing add-on region capabilities for an add-on-service func (s *Service) AddOnRegionCapabilityListByAddOnService(ctx context.Context, addOnServiceIdentity string, lr *ListRange) (AddOnRegionCapabilityListByAddOnServiceResult, error) { var addOnRegionCapability AddOnRegionCapabilityListByAddOnServiceResult return addOnRegionCapability, s.Get(ctx, &addOnRegionCapability, fmt.Sprintf("/addon-services/%v/region-capabilities", addOnServiceIdentity), nil, lr) } type AddOnRegionCapabilityListByRegionResult []AddOnRegionCapability // List existing add-on region capabilities for a region. func (s *Service) AddOnRegionCapabilityListByRegion(ctx context.Context, regionIdentity string, lr *ListRange) (AddOnRegionCapabilityListByRegionResult, error) { var addOnRegionCapability AddOnRegionCapabilityListByRegionResult return addOnRegionCapability, s.Get(ctx, &addOnRegionCapability, fmt.Sprintf("/regions/%v/addon-region-capabilities", regionIdentity), nil, lr) } // Add-on services represent add-ons that may be provisioned for apps. // Endpoints under add-on services can be accessed without // authentication. type AddOnService struct { CliPluginName *string `json:"cli_plugin_name" url:"cli_plugin_name,key"` // npm package name of the add-on service's Heroku CLI plugin CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on-service was created HumanName string `json:"human_name" url:"human_name,key"` // human-readable name of the add-on service provider ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service Name string `json:"name" url:"name,key"` // unique name of this add-on-service State string `json:"state" url:"state,key"` // release status for add-on service SupportsMultipleInstallations bool `json:"supports_multiple_installations" url:"supports_multiple_installations,key"` // whether or not apps can have access to more than one instance of this // add-on at the same time SupportsSharing bool `json:"supports_sharing" url:"supports_sharing,key"` // whether or not apps can have access to add-ons billed to a different // app UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on-service was updated } // Info for existing add-on-service. func (s *Service) AddOnServiceInfo(ctx context.Context, addOnServiceIdentity string) (*AddOnService, error) { var addOnService AddOnService return &addOnService, s.Get(ctx, &addOnService, fmt.Sprintf("/addon-services/%v", addOnServiceIdentity), nil, nil) } type AddOnServiceListResult []AddOnService // List existing add-on-services. func (s *Service) AddOnServiceList(ctx context.Context, lr *ListRange) (AddOnServiceListResult, error) { var addOnService AddOnServiceListResult return addOnService, s.Get(ctx, &addOnService, fmt.Sprintf("/addon-services"), nil, lr) } // Represents the details of a webhook subscription type AddOnWebhook struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created ID string `json:"id" url:"id,key"` // the webhook's unique identifier Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent } type AddOnWebhookCreateOpts struct { Authorization *string `json:"authorization,omitempty" url:"authorization,omitempty,key"` // a custom `Authorization` header that Heroku will include with all // webhook notifications Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached Secret *string `json:"secret,omitempty" url:"secret,omitempty,key"` // a value that Heroku will use to sign all webhook notification // requests (the signature is included in the request’s // `Heroku-Webhook-Hmac-SHA256` header) URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent } type AddOnWebhookCreateResult struct { Addon struct { ID string `json:"id" url:"id,key"` // unique identifier of add-on Name string `json:"name" url:"name,key"` // globally unique name of the add-on } `json:"addon" url:"addon,key"` // identity of add-on. Only used for add-on partner webhooks. CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created ID string `json:"id" url:"id,key"` // the webhook's unique identifier Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent } // Create an add-on webhook subscription. Can only be accessed by the // add-on partner providing this add-on. func (s *Service) AddOnWebhookCreate(ctx context.Context, addOnIdentity string, o AddOnWebhookCreateOpts) (*AddOnWebhookCreateResult, error) { var addOnWebhook AddOnWebhookCreateResult return &addOnWebhook, s.Post(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks", addOnIdentity), o) } type AddOnWebhookDeleteResult struct { Addon struct { ID string `json:"id" url:"id,key"` // unique identifier of add-on Name string `json:"name" url:"name,key"` // globally unique name of the add-on } `json:"addon" url:"addon,key"` // identity of add-on. Only used for add-on partner webhooks. CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created ID string `json:"id" url:"id,key"` // the webhook's unique identifier Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent } // Removes an add-on webhook subscription. Can only be accessed by the // add-on partner providing this add-on. func (s *Service) AddOnWebhookDelete(ctx context.Context, addOnIdentity string, appWebhookIdentity string) (*AddOnWebhookDeleteResult, error) { var addOnWebhook AddOnWebhookDeleteResult return &addOnWebhook, s.Delete(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks/%v", addOnIdentity, appWebhookIdentity)) } type AddOnWebhookInfoResult struct { Addon struct { ID string `json:"id" url:"id,key"` // unique identifier of add-on Name string `json:"name" url:"name,key"` // globally unique name of the add-on } `json:"addon" url:"addon,key"` // identity of add-on. Only used for add-on partner webhooks. CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created ID string `json:"id" url:"id,key"` // the webhook's unique identifier Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent } // Returns the info for an add-on webhook subscription. Can only be // accessed by the add-on partner providing this add-on. func (s *Service) AddOnWebhookInfo(ctx context.Context, addOnIdentity string, appWebhookIdentity string) (*AddOnWebhookInfoResult, error) { var addOnWebhook AddOnWebhookInfoResult return &addOnWebhook, s.Get(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks/%v", addOnIdentity, appWebhookIdentity), nil, nil) } type AddOnWebhookListResult []struct { Addon struct { ID string `json:"id" url:"id,key"` // unique identifier of add-on Name string `json:"name" url:"name,key"` // globally unique name of the add-on } `json:"addon" url:"addon,key"` // identity of add-on. Only used for add-on partner webhooks. CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created ID string `json:"id" url:"id,key"` // the webhook's unique identifier Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent } // List all webhook subscriptions for a particular add-on. Can only be // accessed by the add-on partner providing this add-on. func (s *Service) AddOnWebhookList(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnWebhookListResult, error) { var addOnWebhook AddOnWebhookListResult return addOnWebhook, s.Get(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks", addOnIdentity), nil, lr) } type AddOnWebhookUpdateOpts struct { Authorization *string `json:"authorization,omitempty" url:"authorization,omitempty,key"` // a custom `Authorization` header that Heroku will include with all // webhook notifications Include []*string `json:"include,omitempty" url:"include,omitempty,key"` // the entities that the subscription provides notifications for Level *string `json:"level,omitempty" url:"level,omitempty,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached Secret *string `json:"secret,omitempty" url:"secret,omitempty,key"` // a value that Heroku will use to sign all webhook notification // requests (the signature is included in the request’s // `Heroku-Webhook-Hmac-SHA256` header) URL *string `json:"url,omitempty" url:"url,omitempty,key"` // the URL where the webhook's notification requests are sent } type AddOnWebhookUpdateResult struct { Addon struct { ID string `json:"id" url:"id,key"` // unique identifier of add-on Name string `json:"name" url:"name,key"` // globally unique name of the add-on } `json:"addon" url:"addon,key"` // identity of add-on. Only used for add-on partner webhooks. CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created ID string `json:"id" url:"id,key"` // the webhook's unique identifier Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent } // Updates the details of an add-on webhook subscription. Can only be // accessed by the add-on partner providing this add-on. func (s *Service) AddOnWebhookUpdate(ctx context.Context, addOnIdentity string, appWebhookIdentity string, o AddOnWebhookUpdateOpts) (*AddOnWebhookUpdateResult, error) { var addOnWebhook AddOnWebhookUpdateResult return &addOnWebhook, s.Patch(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks/%v", addOnIdentity, appWebhookIdentity), o) } // Represents the delivery of a webhook notification, including its // current status. type AddOnWebhookDelivery struct{} type AddOnWebhookDeliveryInfoResult struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the delivery was created Event struct { ID string `json:"id" url:"id,key"` // the event's unique identifier Include string `json:"include" url:"include,key"` // the type of entity that the event is related to } `json:"event" url:"event,key"` // identity of event ID string `json:"id" url:"id,key"` // the delivery's unique identifier LastAttempt *struct { Code *int `json:"code" url:"code,key"` // http response code received during attempt CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when attempt was created ErrorClass *string `json:"error_class" url:"error_class,key"` // error class encountered during attempt ID string `json:"id" url:"id,key"` // unique identifier of attempt Status string `json:"status" url:"status,key"` // status of an attempt UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when attempt was updated } `json:"last_attempt" url:"last_attempt,key"` // last attempt of a delivery NextAttemptAt *time.Time `json:"next_attempt_at" url:"next_attempt_at,key"` // when delivery will be attempted again NumAttempts int `json:"num_attempts" url:"num_attempts,key"` // number of times a delivery has been attempted Status string `json:"status" url:"status,key"` // the delivery's status UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the delivery was last updated Webhook struct { ID string `json:"id" url:"id,key"` // the webhook's unique identifier Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached } `json:"webhook" url:"webhook,key"` // identity of webhook } // Returns the info for an existing delivery. Can only be accessed by // the add-on partner providing this add-on. func (s *Service) AddOnWebhookDeliveryInfo(ctx context.Context, addOnIdentity string, appWebhookDeliveryIdentity string) (*AddOnWebhookDeliveryInfoResult, error) { var addOnWebhookDelivery AddOnWebhookDeliveryInfoResult return &addOnWebhookDelivery, s.Get(ctx, &addOnWebhookDelivery, fmt.Sprintf("/addons/%v/webhook-deliveries/%v", addOnIdentity, appWebhookDeliveryIdentity), nil, nil) } type AddOnWebhookDeliveryListResult []struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the delivery was created Event struct { ID string `json:"id" url:"id,key"` // the event's unique identifier Include string `json:"include" url:"include,key"` // the type of entity that the event is related to } `json:"event" url:"event,key"` // identity of event ID string `json:"id" url:"id,key"` // the delivery's unique identifier LastAttempt *struct { Code *int `json:"code" url:"code,key"` // http response code received during attempt CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when attempt was created ErrorClass *string `json:"error_class" url:"error_class,key"` // error class encountered during attempt ID string `json:"id" url:"id,key"` // unique identifier of attempt Status string `json:"status" url:"status,key"` // status of an attempt UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when attempt was updated } `json:"last_attempt" url:"last_attempt,key"` // last attempt of a delivery NextAttemptAt *time.Time `json:"next_attempt_at" url:"next_attempt_at,key"` // when delivery will be attempted again NumAttempts int `json:"num_attempts" url:"num_attempts,key"` // number of times a delivery has been attempted Status string `json:"status" url:"status,key"` // the delivery's status UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the delivery was last updated Webhook struct { ID string `json:"id" url:"id,key"` // the webhook's unique identifier Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached } `json:"webhook" url:"webhook,key"` // identity of webhook } // Lists existing deliveries for an add-on. Can only be accessed by the // add-on partner providing this add-on. func (s *Service) AddOnWebhookDeliveryList(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnWebhookDeliveryListResult, error) { var addOnWebhookDelivery AddOnWebhookDeliveryListResult return addOnWebhookDelivery, s.Get(ctx, &addOnWebhookDelivery, fmt.Sprintf("/addons/%v/webhook-deliveries", addOnIdentity), nil, lr) } // Represents a webhook event that occurred. type AddOnWebhookEvent struct{} type AddOnWebhookEventInfoResult struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when event was created ID string `json:"id" url:"id,key"` // the event's unique identifier Include string `json:"include" url:"include,key"` // the type of entity that the event is related to Payload struct { Action string `json:"action" url:"action,key"` // the type of event that occurred Actor struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"actor" url:"actor,key"` // user that caused event Data struct{} `json:"data" url:"data,key"` // the current details of the event PreviousData struct{} `json:"previous_data" url:"previous_data,key"` // previous details of the event (if any) Resource string `json:"resource" url:"resource,key"` // the type of resource associated with the event Version string `json:"version" url:"version,key"` // the version of the details provided for the event } `json:"payload" url:"payload,key"` // payload of event UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the event was last updated } // Returns the info for a specified webhook event. Can only be accessed // by the add-on partner providing this add-on. func (s *Service) AddOnWebhookEventInfo(ctx context.Context, addOnIdentity string, appWebhookEventIdentity string) (*AddOnWebhookEventInfoResult, error) { var addOnWebhookEvent AddOnWebhookEventInfoResult return &addOnWebhookEvent, s.Get(ctx, &addOnWebhookEvent, fmt.Sprintf("/addons/%v/webhook-events/%v", addOnIdentity, appWebhookEventIdentity), nil, nil) } type AddOnWebhookEventListResult []struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when event was created ID string `json:"id" url:"id,key"` // the event's unique identifier Include string `json:"include" url:"include,key"` // the type of entity that the event is related to Payload struct { Action string `json:"action" url:"action,key"` // the type of event that occurred Actor struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"actor" url:"actor,key"` // user that caused event Data struct{} `json:"data" url:"data,key"` // the current details of the event PreviousData struct{} `json:"previous_data" url:"previous_data,key"` // previous details of the event (if any) Resource string `json:"resource" url:"resource,key"` // the type of resource associated with the event Version string `json:"version" url:"version,key"` // the version of the details provided for the event } `json:"payload" url:"payload,key"` // payload of event UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the event was last updated } // Lists existing webhook events for an add-on. Can only be accessed by // the add-on partner providing this add-on. func (s *Service) AddOnWebhookEventList(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnWebhookEventListResult, error) { var addOnWebhookEvent AddOnWebhookEventListResult return addOnWebhookEvent, s.Get(ctx, &addOnWebhookEvent, fmt.Sprintf("/addons/%v/webhook-events", addOnIdentity), nil, lr) } // Entities that have been allowed to be used by a Team type AllowedAddOnService struct { AddedAt time.Time `json:"added_at" url:"added_at,key"` // when the add-on service was allowed AddedBy struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"added_by" url:"added_by,key"` // the user which allowed the add-on service AddonService struct { HumanName string `json:"human_name" url:"human_name,key"` // human-readable name of the add-on service provider ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service Name string `json:"name" url:"name,key"` // unique name of this add-on-service } `json:"addon_service" url:"addon_service,key"` // the add-on service allowed for use ID string `json:"id" url:"id,key"` // unique identifier for this allowed add-on service record } type AllowedAddOnServiceListByTeamResult []AllowedAddOnService // List all allowed add-on services for a team func (s *Service) AllowedAddOnServiceListByTeam(ctx context.Context, teamIdentity string, lr *ListRange) (AllowedAddOnServiceListByTeamResult, error) { var allowedAddOnService AllowedAddOnServiceListByTeamResult return allowedAddOnService, s.Get(ctx, &allowedAddOnService, fmt.Sprintf("/teams/%v/allowed-addon-services", teamIdentity), nil, lr) } type AllowedAddOnServiceCreateByTeamOpts struct { AddonService *string `json:"addon_service,omitempty" url:"addon_service,omitempty,key"` // name of the add-on service to allow } type AllowedAddOnServiceCreateByTeamResult []AllowedAddOnService // Allow an Add-on Service func (s *Service) AllowedAddOnServiceCreateByTeam(ctx context.Context, teamIdentity string, o AllowedAddOnServiceCreateByTeamOpts) (AllowedAddOnServiceCreateByTeamResult, error) { var allowedAddOnService AllowedAddOnServiceCreateByTeamResult return allowedAddOnService, s.Post(ctx, &allowedAddOnService, fmt.Sprintf("/teams/%v/allowed-addon-services", teamIdentity), o) } // Remove an allowed add-on service func (s *Service) AllowedAddOnServiceDeleteByTeam(ctx context.Context, teamIdentity string, allowedAddOnServiceIdentity string) (*AllowedAddOnService, error) { var allowedAddOnService AllowedAddOnService return &allowedAddOnService, s.Delete(ctx, &allowedAddOnService, fmt.Sprintf("/teams/%v/allowed-addon-services/%v", teamIdentity, allowedAddOnServiceIdentity)) } // An app represents the program that you would like to deploy and run // on Heroku. type App struct { Acm bool `json:"acm" url:"acm,key"` // ACM status of this app ArchivedAt *time.Time `json:"archived_at" url:"archived_at,key"` // when app was archived BuildStack struct { ID string `json:"id" url:"id,key"` // unique identifier of stack Name string `json:"name" url:"name,key"` // unique name of stack } `json:"build_stack" url:"build_stack,key"` // identity of the stack that will be used for new builds BuildpackProvidedDescription *string `json:"buildpack_provided_description" url:"buildpack_provided_description,key"` // description from buildpack of app CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app was created GitURL string `json:"git_url" url:"git_url,key"` // git repo URL of app ID string `json:"id" url:"id,key"` // unique identifier of app InternalRouting *bool `json:"internal_routing" url:"internal_routing,key"` // describes whether a Private Spaces app is externally routable or not Maintenance bool `json:"maintenance" url:"maintenance,key"` // maintenance status of app Name string `json:"name" url:"name,key"` // unique name of app Organization *struct { ID string `json:"id" url:"id,key"` // unique identifier of team Name string `json:"name" url:"name,key"` // unique name of team } `json:"organization" url:"organization,key"` // identity of team Owner struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"owner" url:"owner,key"` // identity of app owner Region struct { ID string `json:"id" url:"id,key"` // unique identifier of region Name string `json:"name" url:"name,key"` // unique name of region } `json:"region" url:"region,key"` // identity of app region ReleasedAt *time.Time `json:"released_at" url:"released_at,key"` // when app was released RepoSize *int `json:"repo_size" url:"repo_size,key"` // git repo size in bytes of app SlugSize *int `json:"slug_size" url:"slug_size,key"` // slug size in bytes of app Space *struct { ID string `json:"id" url:"id,key"` // unique identifier of space Name string `json:"name" url:"name,key"` // unique name of space Shield bool `json:"shield" url:"shield,key"` // true if this space has shield enabled } `json:"space" url:"space,key"` // identity of space Stack struct { ID string `json:"id" url:"id,key"` // unique identifier of stack Name string `json:"name" url:"name,key"` // unique name of stack } `json:"stack" url:"stack,key"` // identity of app stack Team *struct { ID string `json:"id" url:"id,key"` // unique identifier of team Name string `json:"name" url:"name,key"` // unique name of team } `json:"team" url:"team,key"` // identity of team UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app was updated WebURL string `json:"web_url" url:"web_url,key"` // web URL of app } type AppCreateOpts struct { Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of app Region *string `json:"region,omitempty" url:"region,omitempty,key"` // unique identifier of region Stack *string `json:"stack,omitempty" url:"stack,omitempty,key"` // unique name of stack } // Create a new app. func (s *Service) AppCreate(ctx context.Context, o AppCreateOpts) (*App, error) { var app App return &app, s.Post(ctx, &app, fmt.Sprintf("/apps"), o) } // Delete an existing app. func (s *Service) AppDelete(ctx context.Context, appIdentity string) (*App, error) { var app App return &app, s.Delete(ctx, &app, fmt.Sprintf("/apps/%v", appIdentity)) } // Info for existing app. func (s *Service) AppInfo(ctx context.Context, appIdentity string) (*App, error) { var app App return &app, s.Get(ctx, &app, fmt.Sprintf("/apps/%v", appIdentity), nil, nil) } type AppListResult []App // List existing apps. func (s *Service) AppList(ctx context.Context, lr *ListRange) (AppListResult, error) { var app AppListResult return app, s.Get(ctx, &app, fmt.Sprintf("/apps"), nil, lr) } type AppListOwnedAndCollaboratedResult []App // List owned and collaborated apps (excludes team apps). func (s *Service) AppListOwnedAndCollaborated(ctx context.Context, accountIdentity string, lr *ListRange) (AppListOwnedAndCollaboratedResult, error) { var app AppListOwnedAndCollaboratedResult return app, s.Get(ctx, &app, fmt.Sprintf("/users/%v/apps", accountIdentity), nil, lr) } type AppUpdateOpts struct { BuildStack *string `json:"build_stack,omitempty" url:"build_stack,omitempty,key"` // unique name of stack Maintenance *bool `json:"maintenance,omitempty" url:"maintenance,omitempty,key"` // maintenance status of app Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of app } // Update an existing app. func (s *Service) AppUpdate(ctx context.Context, appIdentity string, o AppUpdateOpts) (*App, error) { var app App return &app, s.Patch(ctx, &app, fmt.Sprintf("/apps/%v", appIdentity), o) } // Enable ACM flag for an app func (s *Service) AppEnableACM(ctx context.Context, appIdentity string) (*App, error) { var app App return &app, s.Post(ctx, &app, fmt.Sprintf("/apps/%v/acm", appIdentity), nil) } // Disable ACM flag for an app func (s *Service) AppDisableACM(ctx context.Context, appIdentity string) (*App, error) { var app App return &app, s.Delete(ctx, &app, fmt.Sprintf("/apps/%v/acm", appIdentity)) } // Refresh ACM for an app func (s *Service) AppRefreshACM(ctx context.Context, appIdentity string) (*App, error) { var app App return &app, s.Patch(ctx, &app, fmt.Sprintf("/apps/%v/acm", appIdentity), nil) } // An app feature represents a Heroku labs capability that can be // enabled or disabled for an app on Heroku. type AppFeature struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app feature was created Description string `json:"description" url:"description,key"` // description of app feature DisplayName string `json:"display_name" url:"display_name,key"` // user readable feature name DocURL string `json:"doc_url" url:"doc_url,key"` // documentation URL of app feature Enabled bool `json:"enabled" url:"enabled,key"` // whether or not app feature has been enabled FeedbackEmail string `json:"feedback_email" url:"feedback_email,key"` // e-mail to send feedback about the feature ID string `json:"id" url:"id,key"` // unique identifier of app feature Name string `json:"name" url:"name,key"` // unique name of app feature State string `json:"state" url:"state,key"` // state of app feature UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app feature was updated } // Info for an existing app feature. func (s *Service) AppFeatureInfo(ctx context.Context, appIdentity string, appFeatureIdentity string) (*AppFeature, error) { var appFeature AppFeature return &appFeature, s.Get(ctx, &appFeature, fmt.Sprintf("/apps/%v/features/%v", appIdentity, appFeatureIdentity), nil, nil) } type AppFeatureListResult []AppFeature // List existing app features. func (s *Service) AppFeatureList(ctx context.Context, appIdentity string, lr *ListRange) (AppFeatureListResult, error) { var appFeature AppFeatureListResult return appFeature, s.Get(ctx, &appFeature, fmt.Sprintf("/apps/%v/features", appIdentity), nil, lr) } type AppFeatureUpdateOpts struct { Enabled bool `json:"enabled" url:"enabled,key"` // whether or not app feature has been enabled } // Update an existing app feature. func (s *Service) AppFeatureUpdate(ctx context.Context, appIdentity string, appFeatureIdentity string, o AppFeatureUpdateOpts) (*AppFeature, error) { var appFeature AppFeature return &appFeature, s.Patch(ctx, &appFeature, fmt.Sprintf("/apps/%v/features/%v", appIdentity, appFeatureIdentity), o) } // App formation set describes the combination of process types with // their quantities and sizes as well as application process tier type AppFormationSet struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // app being described by the formation-set Description string `json:"description" url:"description,key"` // a string representation of the formation set ProcessTier string `json:"process_tier" url:"process_tier,key"` // application process tier UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // last time fomation-set was updated } // An app setup represents an app on Heroku that is setup using an // environment, addons, and scripts described in an app.json manifest // file. type AppSetup struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // identity of app Build *struct { ID string `json:"id" url:"id,key"` // unique identifier of build OutputStreamURL string `json:"output_stream_url" url:"output_stream_url,key"` // Build process output will be available from this URL as a stream. The // stream is available as either `text/plain` or `text/event-stream`. // Clients should be prepared to handle disconnects and can resume the // stream by sending a `Range` header (for `text/plain`) or a // `Last-Event-Id` header (for `text/event-stream`). Status string `json:"status" url:"status,key"` // status of build } `json:"build" url:"build,key"` // identity and status of build CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app setup was created FailureMessage *string `json:"failure_message" url:"failure_message,key"` // reason that app setup has failed ID string `json:"id" url:"id,key"` // unique identifier of app setup ManifestErrors []string `json:"manifest_errors" url:"manifest_errors,key"` // errors associated with invalid app.json manifest file Postdeploy *struct { ExitCode int `json:"exit_code" url:"exit_code,key"` // The exit code of the postdeploy script Output string `json:"output" url:"output,key"` // output of the postdeploy script } `json:"postdeploy" url:"postdeploy,key"` // result of postdeploy script ResolvedSuccessURL *string `json:"resolved_success_url" url:"resolved_success_url,key"` // fully qualified success url Status string `json:"status" url:"status,key"` // the overall status of app setup UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app setup was updated } type AppSetupCreateOpts struct { App *struct { Locked *bool `json:"locked,omitempty" url:"locked,omitempty,key"` // are other team members forbidden from joining this app. Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of app Organization *string `json:"organization,omitempty" url:"organization,omitempty,key"` // unique name of team Personal *bool `json:"personal,omitempty" url:"personal,omitempty,key"` // force creation of the app in the user account even if a default team // is set. Region *string `json:"region,omitempty" url:"region,omitempty,key"` // unique name of region Space *string `json:"space,omitempty" url:"space,omitempty,key"` // unique name of space Stack *string `json:"stack,omitempty" url:"stack,omitempty,key"` // unique name of stack } `json:"app,omitempty" url:"app,omitempty,key"` // optional parameters for created app Overrides *struct { Buildpacks []*struct { URL *string `json:"url,omitempty" url:"url,omitempty,key"` // location of the buildpack } `json:"buildpacks,omitempty" url:"buildpacks,omitempty,key"` // overrides the buildpacks specified in the app.json manifest file Env map[string]string `json:"env,omitempty" url:"env,omitempty,key"` // overrides of the env specified in the app.json manifest file } `json:"overrides,omitempty" url:"overrides,omitempty,key"` // overrides of keys in the app.json manifest file SourceBlob struct { Checksum *string `json:"checksum,omitempty" url:"checksum,omitempty,key"` // an optional checksum of the gzipped tarball for verifying its // integrity URL *string `json:"url,omitempty" url:"url,omitempty,key"` // URL of gzipped tarball of source code containing app.json manifest // file Version *string `json:"version,omitempty" url:"version,omitempty,key"` // Version of the gzipped tarball. } `json:"source_blob" url:"source_blob,key"` // gzipped tarball of source code containing app.json manifest file } // Create a new app setup from a gzipped tar archive containing an // app.json manifest file. func (s *Service) AppSetupCreate(ctx context.Context, o AppSetupCreateOpts) (*AppSetup, error) { var appSetup AppSetup return &appSetup, s.Post(ctx, &appSetup, fmt.Sprintf("/app-setups"), o) } // Get the status of an app setup. func (s *Service) AppSetupInfo(ctx context.Context, appSetupIdentity string) (*AppSetup, error) { var appSetup AppSetup return &appSetup, s.Get(ctx, &appSetup, fmt.Sprintf("/app-setups/%v", appSetupIdentity), nil, nil) } // An app transfer represents a two party interaction for transferring // ownership of an app. type AppTransfer struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // app involved in the transfer CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app transfer was created ID string `json:"id" url:"id,key"` // unique identifier of app transfer Owner struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"owner" url:"owner,key"` // identity of the owner of the transfer Recipient struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"recipient" url:"recipient,key"` // identity of the recipient of the transfer State string `json:"state" url:"state,key"` // the current state of an app transfer UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app transfer was updated } type AppTransferCreateOpts struct { App string `json:"app" url:"app,key"` // unique identifier of app Recipient string `json:"recipient" url:"recipient,key"` // unique email address of account Silent *bool `json:"silent,omitempty" url:"silent,omitempty,key"` // whether to suppress email notification when transferring apps } // Create a new app transfer. func (s *Service) AppTransferCreate(ctx context.Context, o AppTransferCreateOpts) (*AppTransfer, error) { var appTransfer AppTransfer return &appTransfer, s.Post(ctx, &appTransfer, fmt.Sprintf("/account/app-transfers"), o) } // Delete an existing app transfer func (s *Service) AppTransferDelete(ctx context.Context, appTransferIdentity string) (*AppTransfer, error) { var appTransfer AppTransfer return &appTransfer, s.Delete(ctx, &appTransfer, fmt.Sprintf("/account/app-transfers/%v", appTransferIdentity)) } // Info for existing app transfer. func (s *Service) AppTransferInfo(ctx context.Context, appTransferIdentity string) (*AppTransfer, error) { var appTransfer AppTransfer return &appTransfer, s.Get(ctx, &appTransfer, fmt.Sprintf("/account/app-transfers/%v", appTransferIdentity), nil, nil) } type AppTransferListResult []AppTransfer // List existing apps transfers. func (s *Service) AppTransferList(ctx context.Context, lr *ListRange) (AppTransferListResult, error) { var appTransfer AppTransferListResult return appTransfer, s.Get(ctx, &appTransfer, fmt.Sprintf("/account/app-transfers"), nil, lr) } type AppTransferUpdateOpts struct { State string `json:"state" url:"state,key"` // the current state of an app transfer } // Update an existing app transfer. func (s *Service) AppTransferUpdate(ctx context.Context, appTransferIdentity string, o AppTransferUpdateOpts) (*AppTransfer, error) { var appTransfer AppTransfer return &appTransfer, s.Patch(ctx, &appTransfer, fmt.Sprintf("/account/app-transfers/%v", appTransferIdentity), o) } // Represents the details of a webhook subscription type AppWebhook struct{} type AppWebhookCreateOpts struct { Authorization *string `json:"authorization,omitempty" url:"authorization,omitempty,key"` // a custom `Authorization` header that Heroku will include with all // webhook notifications Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached Secret *string `json:"secret,omitempty" url:"secret,omitempty,key"` // a value that Heroku will use to sign all webhook notification // requests (the signature is included in the request’s // `Heroku-Webhook-Hmac-SHA256` header) URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent } type AppWebhookCreateResult struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // identity of app. Only used for customer webhooks. CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created ID string `json:"id" url:"id,key"` // the webhook's unique identifier Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent } // Create an app webhook subscription. func (s *Service) AppWebhookCreate(ctx context.Context, appIdentity string, o AppWebhookCreateOpts) (*AppWebhookCreateResult, error) { var appWebhook AppWebhookCreateResult return &appWebhook, s.Post(ctx, &appWebhook, fmt.Sprintf("/apps/%v/webhooks", appIdentity), o) } type AppWebhookDeleteResult struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // identity of app. Only used for customer webhooks. CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created ID string `json:"id" url:"id,key"` // the webhook's unique identifier Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent } // Removes an app webhook subscription. func (s *Service) AppWebhookDelete(ctx context.Context, appIdentity string, appWebhookIdentity string) (*AppWebhookDeleteResult, error) { var appWebhook AppWebhookDeleteResult return &appWebhook, s.Delete(ctx, &appWebhook, fmt.Sprintf("/apps/%v/webhooks/%v", appIdentity, appWebhookIdentity)) } type AppWebhookInfoResult struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // identity of app. Only used for customer webhooks. CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created ID string `json:"id" url:"id,key"` // the webhook's unique identifier Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent } // Returns the info for an app webhook subscription. func (s *Service) AppWebhookInfo(ctx context.Context, appIdentity string, appWebhookIdentity string) (*AppWebhookInfoResult, error) { var appWebhook AppWebhookInfoResult return &appWebhook, s.Get(ctx, &appWebhook, fmt.Sprintf("/apps/%v/webhooks/%v", appIdentity, appWebhookIdentity), nil, nil) } type AppWebhookListResult []struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // identity of app. Only used for customer webhooks. CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created ID string `json:"id" url:"id,key"` // the webhook's unique identifier Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent } // List all webhook subscriptions for a particular app. func (s *Service) AppWebhookList(ctx context.Context, appIdentity string, lr *ListRange) (AppWebhookListResult, error) { var appWebhook AppWebhookListResult return appWebhook, s.Get(ctx, &appWebhook, fmt.Sprintf("/apps/%v/webhooks", appIdentity), nil, lr) } type AppWebhookUpdateOpts struct { Authorization *string `json:"authorization,omitempty" url:"authorization,omitempty,key"` // a custom `Authorization` header that Heroku will include with all // webhook notifications Include []*string `json:"include,omitempty" url:"include,omitempty,key"` // the entities that the subscription provides notifications for Level *string `json:"level,omitempty" url:"level,omitempty,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached Secret *string `json:"secret,omitempty" url:"secret,omitempty,key"` // a value that Heroku will use to sign all webhook notification // requests (the signature is included in the request’s // `Heroku-Webhook-Hmac-SHA256` header) URL *string `json:"url,omitempty" url:"url,omitempty,key"` // the URL where the webhook's notification requests are sent } type AppWebhookUpdateResult struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // identity of app. Only used for customer webhooks. CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created ID string `json:"id" url:"id,key"` // the webhook's unique identifier Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent } // Updates the details of an app webhook subscription. func (s *Service) AppWebhookUpdate(ctx context.Context, appIdentity string, appWebhookIdentity string, o AppWebhookUpdateOpts) (*AppWebhookUpdateResult, error) { var appWebhook AppWebhookUpdateResult return &appWebhook, s.Patch(ctx, &appWebhook, fmt.Sprintf("/apps/%v/webhooks/%v", appIdentity, appWebhookIdentity), o) } // Represents the delivery of a webhook notification, including its // current status. type AppWebhookDelivery struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the delivery was created Event struct { ID string `json:"id" url:"id,key"` // the event's unique identifier Include string `json:"include" url:"include,key"` // the type of entity that the event is related to } `json:"event" url:"event,key"` // identity of event ID string `json:"id" url:"id,key"` // the delivery's unique identifier LastAttempt *struct { Code *int `json:"code" url:"code,key"` // http response code received during attempt CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when attempt was created ErrorClass *string `json:"error_class" url:"error_class,key"` // error class encountered during attempt ID string `json:"id" url:"id,key"` // unique identifier of attempt Status string `json:"status" url:"status,key"` // status of an attempt UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when attempt was updated } `json:"last_attempt" url:"last_attempt,key"` // last attempt of a delivery NextAttemptAt *time.Time `json:"next_attempt_at" url:"next_attempt_at,key"` // when delivery will be attempted again NumAttempts int `json:"num_attempts" url:"num_attempts,key"` // number of times a delivery has been attempted Status string `json:"status" url:"status,key"` // the delivery's status UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the delivery was last updated Webhook struct { ID string `json:"id" url:"id,key"` // the webhook's unique identifier Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt. // If `sync`, Heroku attempts multiple deliveries until the request is // successful or a limit is reached } `json:"webhook" url:"webhook,key"` // identity of webhook } // Returns the info for an existing delivery. func (s *Service) AppWebhookDeliveryInfo(ctx context.Context, appIdentity string, appWebhookDeliveryIdentity string) (*AppWebhookDelivery, error) { var appWebhookDelivery AppWebhookDelivery return &appWebhookDelivery, s.Get(ctx, &appWebhookDelivery, fmt.Sprintf("/apps/%v/webhook-deliveries/%v", appIdentity, appWebhookDeliveryIdentity), nil, nil) } type AppWebhookDeliveryListResult []AppWebhookDelivery // Lists existing deliveries for an app. func (s *Service) AppWebhookDeliveryList(ctx context.Context, appIdentity string, lr *ListRange) (AppWebhookDeliveryListResult, error) { var appWebhookDelivery AppWebhookDeliveryListResult return appWebhookDelivery, s.Get(ctx, &appWebhookDelivery, fmt.Sprintf("/apps/%v/webhook-deliveries", appIdentity), nil, lr) } // Represents a webhook event that occurred. type AppWebhookEvent struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when event was created ID string `json:"id" url:"id,key"` // the event's unique identifier Include string `json:"include" url:"include,key"` // the type of entity that the event is related to Payload struct { Action string `json:"action" url:"action,key"` // the type of event that occurred Actor struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"actor" url:"actor,key"` // user that caused event Data struct{} `json:"data" url:"data,key"` // the current details of the event PreviousData struct{} `json:"previous_data" url:"previous_data,key"` // previous details of the event (if any) Resource string `json:"resource" url:"resource,key"` // the type of resource associated with the event Version string `json:"version" url:"version,key"` // the version of the details provided for the event } `json:"payload" url:"payload,key"` // payload of event UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the event was last updated } // Returns the info for a specified webhook event. func (s *Service) AppWebhookEventInfo(ctx context.Context, appIdentity string, appWebhookEventIdentity string) (*AppWebhookEvent, error) { var appWebhookEvent AppWebhookEvent return &appWebhookEvent, s.Get(ctx, &appWebhookEvent, fmt.Sprintf("/apps/%v/webhook-events/%v", appIdentity, appWebhookEventIdentity), nil, nil) } type AppWebhookEventListResult []AppWebhookEvent // Lists existing webhook events for an app. func (s *Service) AppWebhookEventList(ctx context.Context, appIdentity string, lr *ListRange) (AppWebhookEventListResult, error) { var appWebhookEvent AppWebhookEventListResult return appWebhookEvent, s.Get(ctx, &appWebhookEvent, fmt.Sprintf("/apps/%v/webhook-events", appIdentity), nil, lr) } // An audit trail archive represents a monthly json zipped file // containing events type Archive struct { Checksum string `json:"checksum" url:"checksum,key"` // checksum for the archive CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when archive was created Month string `json:"month" url:"month,key"` // month of the archive Size int `json:"size" url:"size,key"` // size of the archive in bytes URL string `json:"url" url:"url,key"` // url where to download the archive Year int `json:"year" url:"year,key"` // year of the archive } // Get archive for a single month. func (s *Service) ArchiveInfo(ctx context.Context, enterpriseAccountIdentity string, archiveYear int, archiveMonth string) (*Archive, error) { var archive Archive return &archive, s.Get(ctx, &archive, fmt.Sprintf("/enterprise-accounts/%v/archives/%v/%v", enterpriseAccountIdentity, archiveYear, archiveMonth), nil, nil) } // List existing archives. func (s *Service) ArchiveList(ctx context.Context, enterpriseAccountIdentity string, lr *ListRange) (*Archive, error) { var archive Archive return &archive, s.Get(ctx, &archive, fmt.Sprintf("/enterprise-accounts/%v/archives", enterpriseAccountIdentity), nil, lr) } // An audit trail event represents some action on the platform type AuditTrailEvent struct { Action string `json:"action" url:"action,key"` // action for the event Actor struct { Email string `json:"email" url:"email,key"` ID string `json:"id" url:"id,key"` } `json:"actor" url:"actor,key"` // user who caused event App struct { ID string `json:"id" url:"id,key"` Name string `json:"name" url:"name,key"` } `json:"app" url:"app,key"` // app upon which event took place CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when event was created Data struct{} `json:"data" url:"data,key"` // data specific to the event EnterpriseAccount struct { ID string `json:"id" url:"id,key"` Name string `json:"name" url:"name,key"` } `json:"enterprise_account" url:"enterprise_account,key"` // enterprise account on which the event happened ID string `json:"id" url:"id,key"` // unique identifier of event Owner struct { Email string `json:"email" url:"email,key"` ID string `json:"id" url:"id,key"` } `json:"owner" url:"owner,key"` // owner of the app targeted by the event Request struct { IPAddress string `json:"ip_address" url:"ip_address,key"` } `json:"request" url:"request,key"` // information about where the action was triggered Team struct { ID string `json:"id" url:"id,key"` Name string `json:"name" url:"name,key"` } `json:"team" url:"team,key"` // team on which the event happened Type string `json:"type" url:"type,key"` // type of event } // List existing events. Returns all events for one day, defaulting to // current day. Order, actor, action, and type, and day query params can // be specified as query parameters. For example, // '/enterprise-accounts/:id/events?order=desc&actor=user@example.com&act // ion=create&type=app&day=2020-09-30' would return events in descending // order and only return app created events by the user with // user@example.com email address. func (s *Service) AuditTrailEventList(ctx context.Context, enterpriseAccountIdentity string, lr *ListRange) (*AuditTrailEvent, error) { var auditTrailEvent AuditTrailEvent return &auditTrailEvent, s.Get(ctx, &auditTrailEvent, fmt.Sprintf("/enterprise-accounts/%v/events", enterpriseAccountIdentity), nil, lr) } // A build represents the process of transforming a code tarball into a // slug type Build struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app } `json:"app" url:"app,key"` // app that the build belongs to Buildpacks []struct { Name string `json:"name" url:"name,key"` // Buildpack Registry name of the buildpack for the app URL string `json:"url" url:"url,key"` // the URL of the buildpack for the app } `json:"buildpacks" url:"buildpacks,key"` // buildpacks executed for this build, in order CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when build was created ID string `json:"id" url:"id,key"` // unique identifier of build OutputStreamURL string `json:"output_stream_url" url:"output_stream_url,key"` // Build process output will be available from this URL as a stream. The // stream is available as either `text/plain` or `text/event-stream`. // Clients should be prepared to handle disconnects and can resume the // stream by sending a `Range` header (for `text/plain`) or a // `Last-Event-Id` header (for `text/event-stream`). Release *struct { ID string `json:"id" url:"id,key"` // unique identifier of release } `json:"release" url:"release,key"` // release resulting from the build Slug *struct { ID string `json:"id" url:"id,key"` // unique identifier of slug } `json:"slug" url:"slug,key"` // slug created by this build SourceBlob struct { Checksum *string `json:"checksum" url:"checksum,key"` // an optional checksum of the gzipped tarball for verifying its // integrity URL string `json:"url" url:"url,key"` // URL where gzipped tar archive of source code for build was // downloaded. Version *string `json:"version" url:"version,key"` // Version of the gzipped tarball. } `json:"source_blob" url:"source_blob,key"` // location of gzipped tarball of source code used to create build Stack string `json:"stack" url:"stack,key"` // stack of build Status string `json:"status" url:"status,key"` // status of build UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when build was updated User struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"user" url:"user,key"` // user that started the build } type BuildCreateOpts struct { Buildpacks []*struct { Name *string `json:"name,omitempty" url:"name,omitempty,key"` // Buildpack Registry name of the buildpack for the app URL *string `json:"url,omitempty" url:"url,omitempty,key"` // the URL of the buildpack for the app } `json:"buildpacks,omitempty" url:"buildpacks,omitempty,key"` // buildpacks executed for this build, in order SourceBlob struct { Checksum *string `json:"checksum,omitempty" url:"checksum,omitempty,key"` // an optional checksum of the gzipped tarball for verifying its // integrity URL *string `json:"url,omitempty" url:"url,omitempty,key"` // URL where gzipped tar archive of source code for build was // downloaded. Version *string `json:"version,omitempty" url:"version,omitempty,key"` // Version of the gzipped tarball. } `json:"source_blob" url:"source_blob,key"` // location of gzipped tarball of source code used to create build } // Create a new build. func (s *Service) BuildCreate(ctx context.Context, appIdentity string, o BuildCreateOpts) (*Build, error) { var build Build return &build, s.Post(ctx, &build, fmt.Sprintf("/apps/%v/builds", appIdentity), o) } // Info for existing build. func (s *Service) BuildInfo(ctx context.Context, appIdentity string, buildIdentity string) (*Build, error) { var build Build return &build, s.Get(ctx, &build, fmt.Sprintf("/apps/%v/builds/%v", appIdentity, buildIdentity), nil, nil) } type BuildListResult []Build // List existing build. func (s *Service) BuildList(ctx context.Context, appIdentity string, lr *ListRange) (BuildListResult, error) { var build BuildListResult return build, s.Get(ctx, &build, fmt.Sprintf("/apps/%v/builds", appIdentity), nil, lr) } // Destroy a build cache. func (s *Service) BuildDeleteCache(ctx context.Context, appIdentity string) (*Build, error) { var build Build return &build, s.Delete(ctx, &build, fmt.Sprintf("/apps/%v/build-cache", appIdentity)) } // A buildpack installation represents a buildpack that will be run // against an app. type BuildpackInstallation struct { Buildpack struct { Name string `json:"name" url:"name,key"` // either the Buildpack Registry name or a URL of the buildpack for the // app URL string `json:"url" url:"url,key"` // location of the buildpack for the app. Either a url (unofficial // buildpacks) or an internal urn (heroku official buildpacks). } `json:"buildpack" url:"buildpack,key"` // buildpack Ordinal int `json:"ordinal" url:"ordinal,key"` // determines the order in which the buildpacks will execute } type BuildpackInstallationUpdateOpts struct { Updates []struct { Buildpack string `json:"buildpack" url:"buildpack,key"` // location of the buildpack for the app. Either a url (unofficial // buildpacks) or an internal urn (heroku official buildpacks). } `json:"updates" url:"updates,key"` // The buildpack attribute can accept a name, a url, or a urn. } type BuildpackInstallationUpdateResult []BuildpackInstallation // Update an app's buildpack installations. func (s *Service) BuildpackInstallationUpdate(ctx context.Context, appIdentity string, o BuildpackInstallationUpdateOpts) (BuildpackInstallationUpdateResult, error) { var buildpackInstallation BuildpackInstallationUpdateResult return buildpackInstallation, s.Put(ctx, &buildpackInstallation, fmt.Sprintf("/apps/%v/buildpack-installations", appIdentity), o) } type BuildpackInstallationListResult []BuildpackInstallation // List an app's existing buildpack installations. func (s *Service) BuildpackInstallationList(ctx context.Context, appIdentity string, lr *ListRange) (BuildpackInstallationListResult, error) { var buildpackInstallation BuildpackInstallationListResult return buildpackInstallation, s.Get(ctx, &buildpackInstallation, fmt.Sprintf("/apps/%v/buildpack-installations", appIdentity), nil, lr) } // A collaborator represents an account that has been given access to an // app on Heroku. type Collaborator struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // app collaborator belongs to CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when collaborator was created ID string `json:"id" url:"id,key"` // unique identifier of collaborator Permissions []struct { Description string `json:"description" url:"description,key"` // A description of what the app permission allows. Name string `json:"name" url:"name,key"` // The name of the app permission. } `json:"permissions" url:"permissions,key"` Role *string `json:"role" url:"role,key"` // role in the team UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when collaborator was updated User struct { Email string `json:"email" url:"email,key"` // unique email address of account Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"user" url:"user,key"` // identity of collaborated account } type CollaboratorCreateOpts struct { Silent *bool `json:"silent,omitempty" url:"silent,omitempty,key"` // whether to suppress email invitation when creating collaborator User string `json:"user" url:"user,key"` // unique email address of account } // Create a new collaborator. func (s *Service) CollaboratorCreate(ctx context.Context, appIdentity string, o CollaboratorCreateOpts) (*Collaborator, error) { var collaborator Collaborator return &collaborator, s.Post(ctx, &collaborator, fmt.Sprintf("/apps/%v/collaborators", appIdentity), o) } // Delete an existing collaborator. func (s *Service) CollaboratorDelete(ctx context.Context, appIdentity string, collaboratorIdentity string) (*Collaborator, error) { var collaborator Collaborator return &collaborator, s.Delete(ctx, &collaborator, fmt.Sprintf("/apps/%v/collaborators/%v", appIdentity, collaboratorIdentity)) } // Info for existing collaborator. func (s *Service) CollaboratorInfo(ctx context.Context, appIdentity string, collaboratorIdentity string) (*Collaborator, error) { var collaborator Collaborator return &collaborator, s.Get(ctx, &collaborator, fmt.Sprintf("/apps/%v/collaborators/%v", appIdentity, collaboratorIdentity), nil, nil) } type CollaboratorListResult []Collaborator // List existing collaborators. func (s *Service) CollaboratorList(ctx context.Context, appIdentity string, lr *ListRange) (CollaboratorListResult, error) { var collaborator CollaboratorListResult return collaborator, s.Get(ctx, &collaborator, fmt.Sprintf("/apps/%v/collaborators", appIdentity), nil, lr) } // Config Vars allow you to manage the configuration information // provided to an app on Heroku. type ConfigVar map[string]string type ConfigVarInfoForAppResult map[string]*string // Get config-vars for app. func (s *Service) ConfigVarInfoForApp(ctx context.Context, appIdentity string) (ConfigVarInfoForAppResult, error) { var configVar ConfigVarInfoForAppResult return configVar, s.Get(ctx, &configVar, fmt.Sprintf("/apps/%v/config-vars", appIdentity), nil, nil) } type ConfigVarInfoForAppReleaseResult map[string]*string // Get config-vars for a release. func (s *Service) ConfigVarInfoForAppRelease(ctx context.Context, appIdentity string, releaseIdentity string) (ConfigVarInfoForAppReleaseResult, error) { var configVar ConfigVarInfoForAppReleaseResult return configVar, s.Get(ctx, &configVar, fmt.Sprintf("/apps/%v/releases/%v/config-vars", appIdentity, releaseIdentity), nil, nil) } type ConfigVarUpdateResult map[string]*string // Update config-vars for app. You can update existing config-vars by // setting them again, and remove by setting it to `null`. func (s *Service) ConfigVarUpdate(ctx context.Context, appIdentity string, o map[string]*string) (ConfigVarUpdateResult, error) { var configVar ConfigVarUpdateResult return configVar, s.Patch(ctx, &configVar, fmt.Sprintf("/apps/%v/config-vars", appIdentity), o) } // A credit represents value that will be used up before further charges // are assigned to an account. type Credit struct { Amount float64 `json:"amount" url:"amount,key"` // total value of credit in cents Balance float64 `json:"balance" url:"balance,key"` // remaining value of credit in cents CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when credit was created ExpiresAt time.Time `json:"expires_at" url:"expires_at,key"` // when credit will expire ID string `json:"id" url:"id,key"` // unique identifier of credit Title string `json:"title" url:"title,key"` // a name for credit UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when credit was updated } type CreditCreateOpts struct { Code1 *string `json:"code1,omitempty" url:"code1,omitempty,key"` // first code from a discount card Code2 *string `json:"code2,omitempty" url:"code2,omitempty,key"` // second code from a discount card } // Create a new credit. func (s *Service) CreditCreate(ctx context.Context, o CreditCreateOpts) (*Credit, error) { var credit Credit return &credit, s.Post(ctx, &credit, fmt.Sprintf("/account/credits"), o) } // Info for existing credit. func (s *Service) CreditInfo(ctx context.Context, creditIdentity string) (*Credit, error) { var credit Credit return &credit, s.Get(ctx, &credit, fmt.Sprintf("/account/credits/%v", creditIdentity), nil, nil) } type CreditListResult []Credit // List existing credits. func (s *Service) CreditList(ctx context.Context, lr *ListRange) (CreditListResult, error) { var credit CreditListResult return credit, s.Get(ctx, &credit, fmt.Sprintf("/account/credits"), nil, lr) } // Domains define what web routes should be routed to an app on Heroku. type Domain struct { AcmStatus *string `json:"acm_status" url:"acm_status,key"` // status of this record's ACM AcmStatusReason *string `json:"acm_status_reason" url:"acm_status_reason,key"` // reason for the status of this record's ACM App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // app that owns the domain CName *string `json:"cname" url:"cname,key"` // canonical name record, the address to point a domain at CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when domain was created Hostname string `json:"hostname" url:"hostname,key"` // full hostname ID string `json:"id" url:"id,key"` // unique identifier of this domain Kind string `json:"kind" url:"kind,key"` // type of domain name SniEndpoint *struct { ID string `json:"id" url:"id,key"` // unique identifier of this SNI endpoint Name string `json:"name" url:"name,key"` // unique name for SNI endpoint } `json:"sni_endpoint" url:"sni_endpoint,key"` // sni endpoint the domain is associated with Status string `json:"status" url:"status,key"` // status of this record's cname UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when domain was updated } type DomainCreateDeprecatedOpts struct { Hostname string `json:"hostname" url:"hostname,key"` // full hostname } // Create a new domain. Deprecated in favor of this same endpoint, but // with a new required attribute of `sni_endpoint`. During the // transitional phase sni_endpoint can be omitted entirely (current // behavior), can be a valid id, or can be null which will skip // auto-association. func (s *Service) DomainCreateDeprecated(ctx context.Context, appIdentity string, o DomainCreateDeprecatedOpts) (*Domain, error) { var domain Domain return &domain, s.Post(ctx, &domain, fmt.Sprintf("/apps/%v/domains", appIdentity), o) } type DomainCreateOpts struct { Hostname string `json:"hostname" url:"hostname,key"` // full hostname SniEndpoint *string `json:"sni_endpoint" url:"sni_endpoint,key"` // null or unique identifier or name for SNI endpoint } // Create a new domain. func (s *Service) DomainCreate(ctx context.Context, appIdentity string, o DomainCreateOpts) (*Domain, error) { var domain Domain return &domain, s.Post(ctx, &domain, fmt.Sprintf("/apps/%v/domains", appIdentity), o) } type DomainUpdateOpts struct { SniEndpoint *string `json:"sni_endpoint" url:"sni_endpoint,key"` // null or unique identifier or name for SNI endpoint } // Associate an SNI endpoint func (s *Service) DomainUpdate(ctx context.Context, appIdentity string, domainIdentity string, o DomainUpdateOpts) (*Domain, error) { var domain Domain return &domain, s.Patch(ctx, &domain, fmt.Sprintf("/apps/%v/domains/%v", appIdentity, domainIdentity), o) } // Delete an existing domain func (s *Service) DomainDelete(ctx context.Context, appIdentity string, domainIdentity string) (*Domain, error) { var domain Domain return &domain, s.Delete(ctx, &domain, fmt.Sprintf("/apps/%v/domains/%v", appIdentity, domainIdentity)) } // Info for existing domain. func (s *Service) DomainInfo(ctx context.Context, appIdentity string, domainIdentity string) (*Domain, error) { var domain Domain return &domain, s.Get(ctx, &domain, fmt.Sprintf("/apps/%v/domains/%v", appIdentity, domainIdentity), nil, nil) } type DomainListResult []Domain // List existing domains. func (s *Service) DomainList(ctx context.Context, appIdentity string, lr *ListRange) (DomainListResult, error) { var domain DomainListResult return domain, s.Get(ctx, &domain, fmt.Sprintf("/apps/%v/domains", appIdentity), nil, lr) } // Dynos encapsulate running processes of an app on Heroku. Detailed // information about dyno sizes can be found at: // [https://devcenter.heroku.com/articles/dyno-types](https://devcenter.h // eroku.com/articles/dyno-types). type Dyno struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // app formation belongs to AttachURL *string `json:"attach_url" url:"attach_url,key"` // a URL to stream output from for attached processes or null for // non-attached processes Command string `json:"command" url:"command,key"` // command used to start this process CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when dyno was created ID string `json:"id" url:"id,key"` // unique identifier of this dyno Name string `json:"name" url:"name,key"` // the name of this process on this dyno Release struct { ID string `json:"id" url:"id,key"` // unique identifier of release Version int `json:"version" url:"version,key"` // unique version assigned to the release } `json:"release" url:"release,key"` // app release of the dyno Size string `json:"size" url:"size,key"` // dyno size (default: "standard-1X") State string `json:"state" url:"state,key"` // current status of process (either: crashed, down, idle, starting, or // up) Type string `json:"type" url:"type,key"` // type of process UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when process last changed state } type DynoCreateOpts struct { Attach *bool `json:"attach,omitempty" url:"attach,omitempty,key"` // whether to stream output or not Command string `json:"command" url:"command,key"` // command used to start this process Env map[string]string `json:"env,omitempty" url:"env,omitempty,key"` // custom environment to add to the dyno config vars ForceNoTty *bool `json:"force_no_tty,omitempty" url:"force_no_tty,omitempty,key"` // force an attached one-off dyno to not run in a tty Size *string `json:"size,omitempty" url:"size,omitempty,key"` // dyno size (default: "standard-1X") TimeToLive *int `json:"time_to_live,omitempty" url:"time_to_live,omitempty,key"` // seconds until dyno expires, after which it will soon be killed, max // 86400 seconds (24 hours) Type *string `json:"type,omitempty" url:"type,omitempty,key"` // type of process } // Create a new dyno. func (s *Service) DynoCreate(ctx context.Context, appIdentity string, o DynoCreateOpts) (*Dyno, error) { var dyno Dyno return &dyno, s.Post(ctx, &dyno, fmt.Sprintf("/apps/%v/dynos", appIdentity), o) } type DynoRestartResult struct{} // Restart dyno. func (s *Service) DynoRestart(ctx context.Context, appIdentity string, dynoIdentity string) (DynoRestartResult, error) { var dyno DynoRestartResult return dyno, s.Delete(ctx, &dyno, fmt.Sprintf("/apps/%v/dynos/%v", appIdentity, dynoIdentity)) } type DynoRestartAllResult struct{} // Restart all dynos. func (s *Service) DynoRestartAll(ctx context.Context, appIdentity string) (DynoRestartAllResult, error) { var dyno DynoRestartAllResult return dyno, s.Delete(ctx, &dyno, fmt.Sprintf("/apps/%v/dynos", appIdentity)) } type DynoStopResult struct{} // Stop dyno. func (s *Service) DynoStop(ctx context.Context, appIdentity string, dynoIdentity string) (DynoStopResult, error) { var dyno DynoStopResult return dyno, s.Post(ctx, &dyno, fmt.Sprintf("/apps/%v/dynos/%v/actions/stop", appIdentity, dynoIdentity), nil) } // Info for existing dyno. func (s *Service) DynoInfo(ctx context.Context, appIdentity string, dynoIdentity string) (*Dyno, error) { var dyno Dyno return &dyno, s.Get(ctx, &dyno, fmt.Sprintf("/apps/%v/dynos/%v", appIdentity, dynoIdentity), nil, nil) } type DynoListResult []Dyno // List existing dynos. func (s *Service) DynoList(ctx context.Context, appIdentity string, lr *ListRange) (DynoListResult, error) { var dyno DynoListResult return dyno, s.Get(ctx, &dyno, fmt.Sprintf("/apps/%v/dynos", appIdentity), nil, lr) } // Dyno sizes are the values and details of sizes that can be assigned // to dynos. This information can also be found at : // [https://devcenter.heroku.com/articles/dyno-types](https://devcenter.h // eroku.com/articles/dyno-types). type DynoSize struct { Compute int `json:"compute" url:"compute,key"` // minimum vCPUs, non-dedicated may get more depending on load Cost *struct{} `json:"cost" url:"cost,key"` // price information for this dyno size Dedicated bool `json:"dedicated" url:"dedicated,key"` // whether this dyno will be dedicated to one user DynoUnits int `json:"dyno_units" url:"dyno_units,key"` // unit of consumption for Heroku Enterprise customers ID string `json:"id" url:"id,key"` // unique identifier of this dyno size Memory float64 `json:"memory" url:"memory,key"` // amount of RAM in GB Name string `json:"name" url:"name,key"` // the name of this dyno-size PrivateSpaceOnly bool `json:"private_space_only" url:"private_space_only,key"` // whether this dyno can only be provisioned in a private space } // Info for existing dyno size. func (s *Service) DynoSizeInfo(ctx context.Context, dynoSizeIdentity string) (*DynoSize, error) { var dynoSize DynoSize return &dynoSize, s.Get(ctx, &dynoSize, fmt.Sprintf("/dyno-sizes/%v", dynoSizeIdentity), nil, nil) } type DynoSizeListResult []DynoSize // List existing dyno sizes. func (s *Service) DynoSizeList(ctx context.Context, lr *ListRange) (DynoSizeListResult, error) { var dynoSize DynoSizeListResult return dynoSize, s.Get(ctx, &dynoSize, fmt.Sprintf("/dyno-sizes"), nil, lr) } // Enterprise accounts allow companies to manage their development teams // and billing. type EnterpriseAccount struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the enterprise account was created ID string `json:"id" url:"id,key"` // unique identifier of the enterprise account IdentityProvider *struct { ID string `json:"id" url:"id,key"` // unique identifier of this identity provider Name string `json:"name" url:"name,key"` // user-friendly unique identifier for this identity provider Owner struct { ID string `json:"id" url:"id,key"` // unique identifier of the owner Name string `json:"name" url:"name,key"` // name of the owner Type string `json:"type" url:"type,key"` // type of the owner } `json:"owner" url:"owner,key"` // entity that owns this identity provider } `json:"identity_provider" url:"identity_provider,key"` // Identity Provider associated with the Enterprise Account Name string `json:"name" url:"name,key"` // unique name of the enterprise account Permissions []string `json:"permissions" url:"permissions,key"` // the current user's permissions for this enterprise account Trial bool `json:"trial" url:"trial,key"` // whether the enterprise account is a trial or not UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the enterprise account was updated } type EnterpriseAccountListResult []EnterpriseAccount // List enterprise accounts in which you are a member. func (s *Service) EnterpriseAccountList(ctx context.Context, lr *ListRange) (EnterpriseAccountListResult, error) { var enterpriseAccount EnterpriseAccountListResult return enterpriseAccount, s.Get(ctx, &enterpriseAccount, fmt.Sprintf("/enterprise-accounts"), nil, lr) } // Information about an enterprise account. func (s *Service) EnterpriseAccountInfo(ctx context.Context, enterpriseAccountIdentity string) (*EnterpriseAccount, error) { var enterpriseAccount EnterpriseAccount return &enterpriseAccount, s.Get(ctx, &enterpriseAccount, fmt.Sprintf("/enterprise-accounts/%v", enterpriseAccountIdentity), nil, nil) } type EnterpriseAccountUpdateOpts struct { Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of the enterprise account } // Update enterprise account properties func (s *Service) EnterpriseAccountUpdate(ctx context.Context, enterpriseAccountIdentity string, o EnterpriseAccountUpdateOpts) (*EnterpriseAccount, error) { var enterpriseAccount EnterpriseAccount return &enterpriseAccount, s.Patch(ctx, &enterpriseAccount, fmt.Sprintf("/enterprise-accounts/%v", enterpriseAccountIdentity), o) } // Usage for an enterprise account at a daily resolution. type EnterpriseAccountDailyUsage struct { Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons Date string `json:"date" url:"date,key"` // date of the usage Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used ID string `json:"id" url:"id,key"` // enterprise account identifier Name string `json:"name" url:"name,key"` // name of the enterprise account Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons Space float64 `json:"space" url:"space,key"` // space credits used Teams []struct { Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used Apps []struct { Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used AppName string `json:"app_name" url:"app_name,key"` // unique name of app Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons } `json:"apps" url:"apps,key"` // app usage in the team Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used ID string `json:"id" url:"id,key"` // team identifier Name string `json:"name" url:"name,key"` // name of the team Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons Space float64 `json:"space" url:"space,key"` // space credits used } `json:"teams" url:"teams,key"` // usage by team } type EnterpriseAccountDailyUsageInfoOpts struct { End *string `json:"end,omitempty" url:"end,omitempty,key"` // range end date Start string `json:"start" url:"start,key"` // range start date } type EnterpriseAccountDailyUsageInfoResult []EnterpriseAccountDailyUsage // Retrieves usage for an enterprise account for a range of days. Start // and end dates can be specified as query parameters using the date // format YYYY-MM-DD. // The enterprise account identifier can be found // from the [enterprise account // list](https://devcenter.heroku.com/articles/platform-api-reference#ent // erprise-account-list). // func (s *Service) EnterpriseAccountDailyUsageInfo(ctx context.Context, enterpriseAccountID string, o EnterpriseAccountDailyUsageInfoOpts, lr *ListRange) (EnterpriseAccountDailyUsageInfoResult, error) { var enterpriseAccountDailyUsage EnterpriseAccountDailyUsageInfoResult return enterpriseAccountDailyUsage, s.Get(ctx, &enterpriseAccountDailyUsage, fmt.Sprintf("/enterprise-accounts/%v/usage/daily", enterpriseAccountID), o, lr) } // Enterprise account members are users with access to an enterprise // account. type EnterpriseAccountMember struct { EnterpriseAccount struct { ID string `json:"id" url:"id,key"` // unique identifier of the enterprise account Name string `json:"name" url:"name,key"` // unique name of the enterprise account } `json:"enterprise_account" url:"enterprise_account,key"` ID string `json:"id" url:"id,key"` // unique identifier of the member IdentityProvider *struct { ID string `json:"id" url:"id,key"` // unique identifier of this identity provider Name string `json:"name" url:"name,key"` // name of the identity provider Owner struct { ID string `json:"id" url:"id,key"` // unique identifier of the owner Name string `json:"name" url:"name,key"` // name of the owner Type string `json:"type" url:"type,key"` // type of the owner } `json:"owner" url:"owner,key"` // entity that owns this identity provider Redacted bool `json:"redacted" url:"redacted,key"` // whether the identity_provider information is redacted or not } `json:"identity_provider" url:"identity_provider,key"` // Identity Provider information the member is federated with Permissions []struct { Description string `json:"description" url:"description,key"` Name string `json:"name" url:"name,key"` // permission in the enterprise account } `json:"permissions" url:"permissions,key"` // enterprise account permissions TwoFactorAuthentication bool `json:"two_factor_authentication" url:"two_factor_authentication,key"` // whether the Enterprise Account member has two factor authentication // enabled User struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"user" url:"user,key"` // user information for the membership } type EnterpriseAccountMemberListResult []EnterpriseAccountMember // List members in an enterprise account. func (s *Service) EnterpriseAccountMemberList(ctx context.Context, enterpriseAccountIdentity string, lr *ListRange) (EnterpriseAccountMemberListResult, error) { var enterpriseAccountMember EnterpriseAccountMemberListResult return enterpriseAccountMember, s.Get(ctx, &enterpriseAccountMember, fmt.Sprintf("/enterprise-accounts/%v/members", enterpriseAccountIdentity), nil, lr) } type EnterpriseAccountMemberCreateOpts struct { Federated *bool `json:"federated,omitempty" url:"federated,omitempty,key"` // whether membership is being created as part of SSO JIT Permissions []string `json:"permissions" url:"permissions,key"` // permissions for enterprise account User string `json:"user" url:"user,key"` // unique email address of account } // Create a member in an enterprise account. func (s *Service) EnterpriseAccountMemberCreate(ctx context.Context, enterpriseAccountIdentity string, o EnterpriseAccountMemberCreateOpts) (*EnterpriseAccountMember, error) { var enterpriseAccountMember EnterpriseAccountMember return &enterpriseAccountMember, s.Post(ctx, &enterpriseAccountMember, fmt.Sprintf("/enterprise-accounts/%v/members", enterpriseAccountIdentity), o) } type EnterpriseAccountMemberUpdateOpts struct { Permissions []string `json:"permissions" url:"permissions,key"` // permissions for enterprise account } // Update a member in an enterprise account. func (s *Service) EnterpriseAccountMemberUpdate(ctx context.Context, enterpriseAccountIdentity string, enterpriseAccountMemberUserIdentity string, o EnterpriseAccountMemberUpdateOpts) (*EnterpriseAccountMember, error) { var enterpriseAccountMember EnterpriseAccountMember return &enterpriseAccountMember, s.Patch(ctx, &enterpriseAccountMember, fmt.Sprintf("/enterprise-accounts/%v/members/%v", enterpriseAccountIdentity, enterpriseAccountMemberUserIdentity), o) } // delete a member in an enterprise account. func (s *Service) EnterpriseAccountMemberDelete(ctx context.Context, enterpriseAccountIdentity string, enterpriseAccountMemberUserIdentity string) (*EnterpriseAccountMember, error) { var enterpriseAccountMember EnterpriseAccountMember return &enterpriseAccountMember, s.Delete(ctx, &enterpriseAccountMember, fmt.Sprintf("/enterprise-accounts/%v/members/%v", enterpriseAccountIdentity, enterpriseAccountMemberUserIdentity)) } // Usage for an enterprise account at a monthly resolution. type EnterpriseAccountMonthlyUsage struct { Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used Connect float64 `json:"connect" url:"connect,key"` // average connect rows synced Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used ID string `json:"id" url:"id,key"` // enterprise account identifier Month string `json:"month" url:"month,key"` // year and month of the usage Name string `json:"name" url:"name,key"` // name of the enterprise account Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons Space float64 `json:"space" url:"space,key"` // space credits used Teams []struct { Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used Apps []struct { Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used AppName string `json:"app_name" url:"app_name,key"` // unique name of app Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons } `json:"apps" url:"apps,key"` // app usage in the team Connect float64 `json:"connect" url:"connect,key"` // average connect rows synced Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used ID string `json:"id" url:"id,key"` // team identifier Name string `json:"name" url:"name,key"` // name of the team Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons Space float64 `json:"space" url:"space,key"` // space credits used } `json:"teams" url:"teams,key"` // usage by team } type EnterpriseAccountMonthlyUsageInfoOpts struct { End *string `json:"end,omitempty" url:"end,omitempty,key"` // range end date Start string `json:"start" url:"start,key"` // range start date } type EnterpriseAccountMonthlyUsageInfoResult []EnterpriseAccountMonthlyUsage // Retrieves usage for an enterprise account for a range of months. // Start and end dates can be specified as query parameters using the // date format YYYY-MM. If no end date is specified, one month of usage // is returned. // The enterprise account identifier can be found from the // [enterprise account // list](https://devcenter.heroku.com/articles/platform-api-reference#ent // erprise-account-list). // func (s *Service) EnterpriseAccountMonthlyUsageInfo(ctx context.Context, enterpriseAccountID string, o EnterpriseAccountMonthlyUsageInfoOpts, lr *ListRange) (EnterpriseAccountMonthlyUsageInfoResult, error) { var enterpriseAccountMonthlyUsage EnterpriseAccountMonthlyUsageInfoResult return enterpriseAccountMonthlyUsage, s.Get(ctx, &enterpriseAccountMonthlyUsage, fmt.Sprintf("/enterprise-accounts/%v/usage/monthly", enterpriseAccountID), o, lr) } // Filters are special endpoints to allow for API consumers to specify a // subset of resources to consume in order to reduce the number of // requests that are performed. Each filter endpoint endpoint is // responsible for determining its supported request format. The // endpoints are over POST in order to handle large request bodies // without hitting request uri query length limitations, but the // requests themselves are idempotent and will not have side effects. type FilterApps struct{} type FilterAppsAppsOpts struct { In *struct { ID []*string `json:"id,omitempty" url:"id,omitempty,key"` } `json:"in,omitempty" url:"in,omitempty,key"` } type FilterAppsAppsResult []struct { ArchivedAt *time.Time `json:"archived_at" url:"archived_at,key"` // when app was archived BuildStack struct { ID string `json:"id" url:"id,key"` // unique identifier of stack Name string `json:"name" url:"name,key"` // unique name of stack } `json:"build_stack" url:"build_stack,key"` // identity of the stack that will be used for new builds BuildpackProvidedDescription *string `json:"buildpack_provided_description" url:"buildpack_provided_description,key"` // description from buildpack of app CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app was created GitURL string `json:"git_url" url:"git_url,key"` // git repo URL of app ID string `json:"id" url:"id,key"` // unique identifier of app InternalRouting *bool `json:"internal_routing" url:"internal_routing,key"` // describes whether a Private Spaces app is externally routable or not Joined bool `json:"joined" url:"joined,key"` // is the current member a collaborator on this app. Locked bool `json:"locked" url:"locked,key"` // are other team members forbidden from joining this app. Maintenance bool `json:"maintenance" url:"maintenance,key"` // maintenance status of app Name string `json:"name" url:"name,key"` // unique name of app Owner *struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"owner" url:"owner,key"` // identity of app owner Region struct { ID string `json:"id" url:"id,key"` // unique identifier of region Name string `json:"name" url:"name,key"` // unique name of region } `json:"region" url:"region,key"` // identity of app region ReleasedAt *time.Time `json:"released_at" url:"released_at,key"` // when app was released RepoSize *int `json:"repo_size" url:"repo_size,key"` // git repo size in bytes of app SlugSize *int `json:"slug_size" url:"slug_size,key"` // slug size in bytes of app Space *struct { ID string `json:"id" url:"id,key"` // unique identifier of space Name string `json:"name" url:"name,key"` // unique name of space } `json:"space" url:"space,key"` // identity of space Stack struct { ID string `json:"id" url:"id,key"` // unique identifier of stack Name string `json:"name" url:"name,key"` // unique name of stack } `json:"stack" url:"stack,key"` // identity of app stack Team *struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"team" url:"team,key"` // team that owns this app UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app was updated WebURL string `json:"web_url" url:"web_url,key"` // web URL of app } // Request an apps list filtered by app id. func (s *Service) FilterAppsApps(ctx context.Context, o FilterAppsAppsOpts) (FilterAppsAppsResult, error) { var filterApps FilterAppsAppsResult return filterApps, s.Post(ctx, &filterApps, fmt.Sprintf("/filters/apps"), o) } // The formation of processes that should be maintained for an app. // Update the formation to scale processes or change dyno sizes. // Available process type names and commands are defined by the // `process_types` attribute for the [slug](#slug) currently released on // an app. type Formation struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // app formation belongs to Command string `json:"command" url:"command,key"` // command to use to launch this process CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when process type was created ID string `json:"id" url:"id,key"` // unique identifier of this process type Quantity int `json:"quantity" url:"quantity,key"` // number of processes to maintain Size string `json:"size" url:"size,key"` // dyno size (default: "standard-1X") Type string `json:"type" url:"type,key"` // type of process to maintain UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when dyno type was updated } // Info for a process type func (s *Service) FormationInfo(ctx context.Context, appIdentity string, formationIdentity string) (*Formation, error) { var formation Formation return &formation, s.Get(ctx, &formation, fmt.Sprintf("/apps/%v/formation/%v", appIdentity, formationIdentity), nil, nil) } type FormationListResult []Formation // List process type formation func (s *Service) FormationList(ctx context.Context, appIdentity string, lr *ListRange) (FormationListResult, error) { var formation FormationListResult return formation, s.Get(ctx, &formation, fmt.Sprintf("/apps/%v/formation", appIdentity), nil, lr) } type FormationBatchUpdateOpts struct { Updates []struct { Quantity *int `json:"quantity,omitempty" url:"quantity,omitempty,key"` // number of processes to maintain Size *string `json:"size,omitempty" url:"size,omitempty,key"` // dyno size (default: "standard-1X") Type string `json:"type" url:"type,key"` // type of process to maintain } `json:"updates" url:"updates,key"` // Array with formation updates. Each element must have "type", the id // or name of the process type to be updated, and can optionally update // its "quantity" or "size". } type FormationBatchUpdateResult []Formation // Batch update process types func (s *Service) FormationBatchUpdate(ctx context.Context, appIdentity string, o FormationBatchUpdateOpts) (FormationBatchUpdateResult, error) { var formation FormationBatchUpdateResult return formation, s.Patch(ctx, &formation, fmt.Sprintf("/apps/%v/formation", appIdentity), o) } type FormationUpdateOpts struct { Quantity *int `json:"quantity,omitempty" url:"quantity,omitempty,key"` // number of processes to maintain Size *string `json:"size,omitempty" url:"size,omitempty,key"` // dyno size (default: "standard-1X") } // Update process type func (s *Service) FormationUpdate(ctx context.Context, appIdentity string, formationIdentity string, o FormationUpdateOpts) (*Formation, error) { var formation Formation return &formation, s.Patch(ctx, &formation, fmt.Sprintf("/apps/%v/formation/%v", appIdentity, formationIdentity), o) } // Identity Providers represent the SAML configuration of an Enterprise // Account or Team. type IdentityProvider struct { Certificate string `json:"certificate" url:"certificate,key"` // raw contents of the public certificate (eg: .crt or .pem file) CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when provider record was created EntityID string `json:"entity_id" url:"entity_id,key"` // URL identifier provided by the identity provider ID string `json:"id" url:"id,key"` // unique identifier of this identity provider Organization *struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"organization" url:"organization,key"` // team associated with this identity provider Owner struct { ID string `json:"id" url:"id,key"` // unique identifier of the owner Name string `json:"name" url:"name,key"` // name of the owner Type string `json:"type" url:"type,key"` // type of the owner } `json:"owner" url:"owner,key"` // entity that owns this identity provider SloTargetURL string `json:"slo_target_url" url:"slo_target_url,key"` // single log out URL for this identity provider SsoTargetURL string `json:"sso_target_url" url:"sso_target_url,key"` // single sign on URL for this identity provider UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the identity provider record was updated } type IdentityProviderListByTeamResult []IdentityProvider // Get a list of a team's Identity Providers func (s *Service) IdentityProviderListByTeam(ctx context.Context, teamName string, lr *ListRange) (IdentityProviderListByTeamResult, error) { var identityProvider IdentityProviderListByTeamResult return identityProvider, s.Get(ctx, &identityProvider, fmt.Sprintf("/teams/%v/identity-providers", teamName), nil, lr) } type IdentityProviderCreateByTeamOpts struct { Certificate string `json:"certificate" url:"certificate,key"` // raw contents of the public certificate (eg: .crt or .pem file) EntityID string `json:"entity_id" url:"entity_id,key"` // URL identifier provided by the identity provider SloTargetURL *string `json:"slo_target_url,omitempty" url:"slo_target_url,omitempty,key"` // single log out URL for this identity provider SsoTargetURL string `json:"sso_target_url" url:"sso_target_url,key"` // single sign on URL for this identity provider } // Create an Identity Provider for a team func (s *Service) IdentityProviderCreateByTeam(ctx context.Context, teamName string, o IdentityProviderCreateByTeamOpts) (*IdentityProvider, error) { var identityProvider IdentityProvider return &identityProvider, s.Post(ctx, &identityProvider, fmt.Sprintf("/teams/%v/identity-providers", teamName), o) } type IdentityProviderUpdateByTeamOpts struct { Certificate *string `json:"certificate,omitempty" url:"certificate,omitempty,key"` // raw contents of the public certificate (eg: .crt or .pem file) EntityID *string `json:"entity_id,omitempty" url:"entity_id,omitempty,key"` // URL identifier provided by the identity provider SloTargetURL *string `json:"slo_target_url,omitempty" url:"slo_target_url,omitempty,key"` // single log out URL for this identity provider SsoTargetURL *string `json:"sso_target_url,omitempty" url:"sso_target_url,omitempty,key"` // single sign on URL for this identity provider } // Update a team's Identity Provider func (s *Service) IdentityProviderUpdateByTeam(ctx context.Context, teamName string, identityProviderID string, o IdentityProviderUpdateByTeamOpts) (*IdentityProvider, error) { var identityProvider IdentityProvider return &identityProvider, s.Patch(ctx, &identityProvider, fmt.Sprintf("/teams/%v/identity-providers/%v", teamName, identityProviderID), o) } // Delete a team's Identity Provider func (s *Service) IdentityProviderDeleteByTeam(ctx context.Context, teamName string, identityProviderID string) (*IdentityProvider, error) { var identityProvider IdentityProvider return &identityProvider, s.Delete(ctx, &identityProvider, fmt.Sprintf("/teams/%v/identity-providers/%v", teamName, identityProviderID)) } // An inbound-ruleset is a collection of rules that specify what hosts // can or cannot connect to an application. type InboundRuleset struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when inbound-ruleset was created CreatedBy string `json:"created_by" url:"created_by,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an inbound-ruleset Rules []struct { Action string `json:"action" url:"action,key"` // states whether the connection is allowed or denied Source string `json:"source" url:"source,key"` // is the request’s source in CIDR notation } `json:"rules" url:"rules,key"` Space struct { ID string `json:"id" url:"id,key"` // unique identifier of space Name string `json:"name" url:"name,key"` // unique name of space } `json:"space" url:"space,key"` // identity of space } // Current inbound ruleset for a space func (s *Service) InboundRulesetCurrent(ctx context.Context, spaceIdentity string) (*InboundRuleset, error) { var inboundRuleset InboundRuleset return &inboundRuleset, s.Get(ctx, &inboundRuleset, fmt.Sprintf("/spaces/%v/inbound-ruleset", spaceIdentity), nil, nil) } // Info on an existing Inbound Ruleset func (s *Service) InboundRulesetInfo(ctx context.Context, spaceIdentity string, inboundRulesetIdentity string) (*InboundRuleset, error) { var inboundRuleset InboundRuleset return &inboundRuleset, s.Get(ctx, &inboundRuleset, fmt.Sprintf("/spaces/%v/inbound-rulesets/%v", spaceIdentity, inboundRulesetIdentity), nil, nil) } type InboundRulesetListResult []InboundRuleset // List all inbound rulesets for a space func (s *Service) InboundRulesetList(ctx context.Context, spaceIdentity string, lr *ListRange) (InboundRulesetListResult, error) { var inboundRuleset InboundRulesetListResult return inboundRuleset, s.Get(ctx, &inboundRuleset, fmt.Sprintf("/spaces/%v/inbound-rulesets", spaceIdentity), nil, lr) } type InboundRulesetCreateOpts struct { Rules []*struct { Action string `json:"action" url:"action,key"` // states whether the connection is allowed or denied Source string `json:"source" url:"source,key"` // is the request’s source in CIDR notation } `json:"rules,omitempty" url:"rules,omitempty,key"` } // Create a new inbound ruleset func (s *Service) InboundRulesetCreate(ctx context.Context, spaceIdentity string, o InboundRulesetCreateOpts) (*InboundRuleset, error) { var inboundRuleset InboundRuleset return &inboundRuleset, s.Put(ctx, &inboundRuleset, fmt.Sprintf("/spaces/%v/inbound-ruleset", spaceIdentity), o) } // An invoice is an itemized bill of goods for an account which includes // pricing and charges. type Invoice struct { ChargesTotal float64 `json:"charges_total" url:"charges_total,key"` // total charges on this invoice CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when invoice was created CreditsTotal float64 `json:"credits_total" url:"credits_total,key"` // total credits on this invoice ID string `json:"id" url:"id,key"` // unique identifier of this invoice Number int `json:"number" url:"number,key"` // human readable invoice number PeriodEnd string `json:"period_end" url:"period_end,key"` // the ending date that the invoice covers PeriodStart string `json:"period_start" url:"period_start,key"` // the starting date that this invoice covers State int `json:"state" url:"state,key"` // payment status for this invoice (pending, successful, failed) Total float64 `json:"total" url:"total,key"` // combined total of charges and credits on this invoice UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when invoice was updated } // Info for existing invoice. func (s *Service) InvoiceInfo(ctx context.Context, invoiceIdentity int) (*Invoice, error) { var invoice Invoice return &invoice, s.Get(ctx, &invoice, fmt.Sprintf("/account/invoices/%v", invoiceIdentity), nil, nil) } type InvoiceListResult []Invoice // List existing invoices. func (s *Service) InvoiceList(ctx context.Context, lr *ListRange) (InvoiceListResult, error) { var invoice InvoiceListResult return invoice, s.Get(ctx, &invoice, fmt.Sprintf("/account/invoices"), nil, lr) } // An invoice address represents the address that should be listed on an // invoice. type InvoiceAddress struct { Address1 string `json:"address_1" url:"address_1,key"` // invoice street address line 1 Address2 string `json:"address_2" url:"address_2,key"` // invoice street address line 2 City string `json:"city" url:"city,key"` // invoice city Country string `json:"country" url:"country,key"` // country HerokuID string `json:"heroku_id" url:"heroku_id,key"` // heroku_id identifier reference Other string `json:"other" url:"other,key"` // metadata / additional information to go on invoice PostalCode string `json:"postal_code" url:"postal_code,key"` // invoice zip code State string `json:"state" url:"state,key"` // invoice state UseInvoiceAddress bool `json:"use_invoice_address" url:"use_invoice_address,key"` // flag to use the invoice address for an account or not } // Retrieve existing invoice address. func (s *Service) InvoiceAddressInfo(ctx context.Context) (*InvoiceAddress, error) { var invoiceAddress InvoiceAddress return &invoiceAddress, s.Get(ctx, &invoiceAddress, fmt.Sprintf("/account/invoice-address"), nil, nil) } type InvoiceAddressUpdateOpts struct { Address1 *string `json:"address_1,omitempty" url:"address_1,omitempty,key"` // invoice street address line 1 Address2 *string `json:"address_2,omitempty" url:"address_2,omitempty,key"` // invoice street address line 2 City *string `json:"city,omitempty" url:"city,omitempty,key"` // invoice city Country *string `json:"country,omitempty" url:"country,omitempty,key"` // country Other *string `json:"other,omitempty" url:"other,omitempty,key"` // metadata / additional information to go on invoice PostalCode *string `json:"postal_code,omitempty" url:"postal_code,omitempty,key"` // invoice zip code State *string `json:"state,omitempty" url:"state,omitempty,key"` // invoice state UseInvoiceAddress *bool `json:"use_invoice_address,omitempty" url:"use_invoice_address,omitempty,key"` // flag to use the invoice address for an account or not } // Update invoice address for an account. func (s *Service) InvoiceAddressUpdate(ctx context.Context, o InvoiceAddressUpdateOpts) (*InvoiceAddress, error) { var invoiceAddress InvoiceAddress return &invoiceAddress, s.Put(ctx, &invoiceAddress, fmt.Sprintf("/account/invoice-address"), o) } // Keys represent public SSH keys associated with an account and are // used to authorize accounts as they are performing git operations. type Key struct { Comment string `json:"comment" url:"comment,key"` // comment on the key CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when key was created Email string `json:"email" url:"email,key"` // deprecated. Please refer to 'comment' instead Fingerprint string `json:"fingerprint" url:"fingerprint,key"` // a unique identifying string based on contents ID string `json:"id" url:"id,key"` // unique identifier of this key PublicKey string `json:"public_key" url:"public_key,key"` // full public_key as uploaded UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when key was updated } // Info for existing key. func (s *Service) KeyInfo(ctx context.Context, keyIdentity string) (*Key, error) { var key Key return &key, s.Get(ctx, &key, fmt.Sprintf("/account/keys/%v", keyIdentity), nil, nil) } type KeyListResult []Key // List existing keys. func (s *Service) KeyList(ctx context.Context, lr *ListRange) (KeyListResult, error) { var key KeyListResult return key, s.Get(ctx, &key, fmt.Sprintf("/account/keys"), nil, lr) } // [Log drains](https://devcenter.heroku.com/articles/log-drains) // provide a way to forward your Heroku logs to an external syslog // server for long-term archiving. This external service must be // configured to receive syslog packets from Heroku, whereupon its URL // can be added to an app using this API. Some add-ons will add a log // drain when they are provisioned to an app. These drains can only be // removed by removing the add-on. type LogDrain struct { Addon *struct { ID string `json:"id" url:"id,key"` // unique identifier of add-on Name string `json:"name" url:"name,key"` // globally unique name of the add-on } `json:"addon" url:"addon,key"` // add-on that created the drain CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when log drain was created ID string `json:"id" url:"id,key"` // unique identifier of this log drain Token string `json:"token" url:"token,key"` // token associated with the log drain UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when log drain was updated URL string `json:"url" url:"url,key"` // url associated with the log drain } type LogDrainCreateOpts struct { URL string `json:"url" url:"url,key"` // url associated with the log drain } // Create a new log drain. func (s *Service) LogDrainCreate(ctx context.Context, appIdentity string, o LogDrainCreateOpts) (*LogDrain, error) { var logDrain LogDrain return &logDrain, s.Post(ctx, &logDrain, fmt.Sprintf("/apps/%v/log-drains", appIdentity), o) } type LogDrainUpdateOpts struct { URL string `json:"url" url:"url,key"` // url associated with the log drain } // Update an add-on owned log drain. func (s *Service) LogDrainUpdate(ctx context.Context, addOnIdentity string, logDrainQueryIdentity string, o LogDrainUpdateOpts) (*LogDrain, error) { var logDrain LogDrain return &logDrain, s.Put(ctx, &logDrain, fmt.Sprintf("/addons/%v/log-drains/%v", addOnIdentity, logDrainQueryIdentity), o) } // Delete an existing log drain. Log drains added by add-ons can only be // removed by removing the add-on. func (s *Service) LogDrainDelete(ctx context.Context, appIdentity string, logDrainQueryIdentity string) (*LogDrain, error) { var logDrain LogDrain return &logDrain, s.Delete(ctx, &logDrain, fmt.Sprintf("/apps/%v/log-drains/%v", appIdentity, logDrainQueryIdentity)) } // Info for existing log drain. func (s *Service) LogDrainInfo(ctx context.Context, appIdentity string, logDrainQueryIdentity string) (*LogDrain, error) { var logDrain LogDrain return &logDrain, s.Get(ctx, &logDrain, fmt.Sprintf("/apps/%v/log-drains/%v", appIdentity, logDrainQueryIdentity), nil, nil) } type LogDrainListByAddOnResult []LogDrain // List existing log drains for an add-on. func (s *Service) LogDrainListByAddOn(ctx context.Context, addOnIdentity string, lr *ListRange) (LogDrainListByAddOnResult, error) { var logDrain LogDrainListByAddOnResult return logDrain, s.Get(ctx, &logDrain, fmt.Sprintf("/addons/%v/log-drains", addOnIdentity), nil, lr) } type LogDrainListResult []LogDrain // List existing log drains. func (s *Service) LogDrainList(ctx context.Context, appIdentity string, lr *ListRange) (LogDrainListResult, error) { var logDrain LogDrainListResult return logDrain, s.Get(ctx, &logDrain, fmt.Sprintf("/apps/%v/log-drains", appIdentity), nil, lr) } // A log session is a reference to the http based log stream for an app. type LogSession struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when log connection was created ID string `json:"id" url:"id,key"` // unique identifier of this log session LogplexURL string `json:"logplex_url" url:"logplex_url,key"` // URL for log streaming session UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when log session was updated } type LogSessionCreateOpts struct { Dyno *string `json:"dyno,omitempty" url:"dyno,omitempty,key"` // dyno to limit results to Lines *int `json:"lines,omitempty" url:"lines,omitempty,key"` // number of log lines to stream at once Source *string `json:"source,omitempty" url:"source,omitempty,key"` // log source to limit results to Tail *bool `json:"tail,omitempty" url:"tail,omitempty,key"` // whether to stream ongoing logs } // Create a new log session. func (s *Service) LogSessionCreate(ctx context.Context, appIdentity string, o LogSessionCreateOpts) (*LogSession, error) { var logSession LogSession return &logSession, s.Post(ctx, &logSession, fmt.Sprintf("/apps/%v/log-sessions", appIdentity), o) } // OAuth authorizations represent clients that a Heroku user has // authorized to automate, customize or extend their usage of the // platform. For more information please refer to the [Heroku OAuth // documentation](https://devcenter.heroku.com/articles/oauth) type OAuthAuthorization struct { AccessToken *struct { ExpiresIn *int `json:"expires_in" url:"expires_in,key"` // seconds until OAuth token expires; may be `null` for tokens with // indefinite lifetime ID string `json:"id" url:"id,key"` // unique identifier of OAuth token Token string `json:"token" url:"token,key"` // contents of the token to be used for authorization } `json:"access_token" url:"access_token,key"` // access token for this authorization Client *struct { ID string `json:"id" url:"id,key"` // unique identifier of this OAuth client Name string `json:"name" url:"name,key"` // OAuth client name RedirectURI string `json:"redirect_uri" url:"redirect_uri,key"` // endpoint for redirection after authorization with OAuth client } `json:"client" url:"client,key"` // identifier of the client that obtained this authorization, if any CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when OAuth authorization was created Grant *struct { Code string `json:"code" url:"code,key"` // grant code received from OAuth web application authorization ExpiresIn int `json:"expires_in" url:"expires_in,key"` // seconds until OAuth grant expires ID string `json:"id" url:"id,key"` // unique identifier of OAuth grant } `json:"grant" url:"grant,key"` // this authorization's grant ID string `json:"id" url:"id,key"` // unique identifier of OAuth authorization RefreshToken *struct { ExpiresIn *int `json:"expires_in" url:"expires_in,key"` // seconds until OAuth token expires; may be `null` for tokens with // indefinite lifetime ID string `json:"id" url:"id,key"` // unique identifier of OAuth token Token string `json:"token" url:"token,key"` // contents of the token to be used for authorization } `json:"refresh_token" url:"refresh_token,key"` // refresh token for this authorization Scope []string `json:"scope" url:"scope,key"` // The scope of access OAuth authorization allows UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when OAuth authorization was updated User struct { Email string `json:"email" url:"email,key"` // unique email address of account FullName *string `json:"full_name" url:"full_name,key"` // full name of the account owner ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"user" url:"user,key"` // authenticated user associated with this authorization } type OAuthAuthorizationCreateOpts struct { Client *string `json:"client,omitempty" url:"client,omitempty,key"` // unique identifier of this OAuth client Description *string `json:"description,omitempty" url:"description,omitempty,key"` // human-friendly description of this OAuth authorization ExpiresIn *int `json:"expires_in,omitempty" url:"expires_in,omitempty,key"` // seconds until OAuth token expires; may be `null` for tokens with // indefinite lifetime Scope []string `json:"scope" url:"scope,key"` // The scope of access OAuth authorization allows } // Create a new OAuth authorization. func (s *Service) OAuthAuthorizationCreate(ctx context.Context, o OAuthAuthorizationCreateOpts) (*OAuthAuthorization, error) { var oauthAuthorization OAuthAuthorization return &oauthAuthorization, s.Post(ctx, &oauthAuthorization, fmt.Sprintf("/oauth/authorizations"), o) } // Delete OAuth authorization. func (s *Service) OAuthAuthorizationDelete(ctx context.Context, oauthAuthorizationIdentity string) (*OAuthAuthorization, error) { var oauthAuthorization OAuthAuthorization return &oauthAuthorization, s.Delete(ctx, &oauthAuthorization, fmt.Sprintf("/oauth/authorizations/%v", oauthAuthorizationIdentity)) } // Info for an OAuth authorization. func (s *Service) OAuthAuthorizationInfo(ctx context.Context, oauthAuthorizationIdentity string) (*OAuthAuthorization, error) { var oauthAuthorization OAuthAuthorization return &oauthAuthorization, s.Get(ctx, &oauthAuthorization, fmt.Sprintf("/oauth/authorizations/%v", oauthAuthorizationIdentity), nil, nil) } type OAuthAuthorizationListResult []OAuthAuthorization // List OAuth authorizations. func (s *Service) OAuthAuthorizationList(ctx context.Context, lr *ListRange) (OAuthAuthorizationListResult, error) { var oauthAuthorization OAuthAuthorizationListResult return oauthAuthorization, s.Get(ctx, &oauthAuthorization, fmt.Sprintf("/oauth/authorizations"), nil, lr) } // Regenerate OAuth tokens. This endpoint is only available to direct // authorizations or privileged OAuth clients. func (s *Service) OAuthAuthorizationRegenerate(ctx context.Context, oauthAuthorizationIdentity string) (*OAuthAuthorization, error) { var oauthAuthorization OAuthAuthorization return &oauthAuthorization, s.Post(ctx, &oauthAuthorization, fmt.Sprintf("/oauth/authorizations/%v/actions/regenerate-tokens", oauthAuthorizationIdentity), nil) } // OAuth clients are applications that Heroku users can authorize to // automate, customize or extend their usage of the platform. For more // information please refer to the [Heroku OAuth // documentation](https://devcenter.heroku.com/articles/oauth). type OAuthClient struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when OAuth client was created ID string `json:"id" url:"id,key"` // unique identifier of this OAuth client IgnoresDelinquent *bool `json:"ignores_delinquent" url:"ignores_delinquent,key"` // whether the client is still operable given a delinquent account Name string `json:"name" url:"name,key"` // OAuth client name RedirectURI string `json:"redirect_uri" url:"redirect_uri,key"` // endpoint for redirection after authorization with OAuth client Secret string `json:"secret" url:"secret,key"` // secret used to obtain OAuth authorizations under this client UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when OAuth client was updated } type OAuthClientCreateOpts struct { Name string `json:"name" url:"name,key"` // OAuth client name RedirectURI string `json:"redirect_uri" url:"redirect_uri,key"` // endpoint for redirection after authorization with OAuth client } // Create a new OAuth client. func (s *Service) OAuthClientCreate(ctx context.Context, o OAuthClientCreateOpts) (*OAuthClient, error) { var oauthClient OAuthClient return &oauthClient, s.Post(ctx, &oauthClient, fmt.Sprintf("/oauth/clients"), o) } // Delete OAuth client. func (s *Service) OAuthClientDelete(ctx context.Context, oauthClientIdentity string) (*OAuthClient, error) { var oauthClient OAuthClient return &oauthClient, s.Delete(ctx, &oauthClient, fmt.Sprintf("/oauth/clients/%v", oauthClientIdentity)) } // Info for an OAuth client func (s *Service) OAuthClientInfo(ctx context.Context, oauthClientIdentity string) (*OAuthClient, error) { var oauthClient OAuthClient return &oauthClient, s.Get(ctx, &oauthClient, fmt.Sprintf("/oauth/clients/%v", oauthClientIdentity), nil, nil) } type OAuthClientListResult []OAuthClient // List OAuth clients func (s *Service) OAuthClientList(ctx context.Context, lr *ListRange) (OAuthClientListResult, error) { var oauthClient OAuthClientListResult return oauthClient, s.Get(ctx, &oauthClient, fmt.Sprintf("/oauth/clients"), nil, lr) } type OAuthClientUpdateOpts struct { Name *string `json:"name,omitempty" url:"name,omitempty,key"` // OAuth client name RedirectURI *string `json:"redirect_uri,omitempty" url:"redirect_uri,omitempty,key"` // endpoint for redirection after authorization with OAuth client } // Update OAuth client func (s *Service) OAuthClientUpdate(ctx context.Context, oauthClientIdentity string, o OAuthClientUpdateOpts) (*OAuthClient, error) { var oauthClient OAuthClient return &oauthClient, s.Patch(ctx, &oauthClient, fmt.Sprintf("/oauth/clients/%v", oauthClientIdentity), o) } // Rotate credentials for an OAuth client func (s *Service) OAuthClientRotateCredentials(ctx context.Context, oauthClientIdentity string) (*OAuthClient, error) { var oauthClient OAuthClient return &oauthClient, s.Post(ctx, &oauthClient, fmt.Sprintf("/oauth/clients/%v/actions/rotate-credentials", oauthClientIdentity), nil) } // OAuth grants are used to obtain authorizations on behalf of a user. // For more information please refer to the [Heroku OAuth // documentation](https://devcenter.heroku.com/articles/oauth) type OAuthGrant struct{} // OAuth tokens provide access for authorized clients to act on behalf // of a Heroku user to automate, customize or extend their usage of the // platform. For more information please refer to the [Heroku OAuth // documentation](https://devcenter.heroku.com/articles/oauth) type OAuthToken struct { AccessToken struct { ExpiresIn *int `json:"expires_in" url:"expires_in,key"` // seconds until OAuth token expires; may be `null` for tokens with // indefinite lifetime ID string `json:"id" url:"id,key"` // unique identifier of OAuth token Token string `json:"token" url:"token,key"` // contents of the token to be used for authorization } `json:"access_token" url:"access_token,key"` // current access token Authorization struct { ID string `json:"id" url:"id,key"` // unique identifier of OAuth authorization } `json:"authorization" url:"authorization,key"` // authorization for this set of tokens Client *struct { Secret string `json:"secret" url:"secret,key"` // secret used to obtain OAuth authorizations under this client } `json:"client" url:"client,key"` // OAuth client secret used to obtain token CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when OAuth token was created Grant struct { Code string `json:"code" url:"code,key"` // grant code received from OAuth web application authorization Type string `json:"type" url:"type,key"` // type of grant requested, one of `authorization_code` or // `refresh_token` } `json:"grant" url:"grant,key"` // grant used on the underlying authorization ID string `json:"id" url:"id,key"` // unique identifier of OAuth token RefreshToken struct { ExpiresIn *int `json:"expires_in" url:"expires_in,key"` // seconds until OAuth token expires; may be `null` for tokens with // indefinite lifetime ID string `json:"id" url:"id,key"` // unique identifier of OAuth token Token string `json:"token" url:"token,key"` // contents of the token to be used for authorization } `json:"refresh_token" url:"refresh_token,key"` // refresh token for this authorization Session struct { ID string `json:"id" url:"id,key"` // unique identifier of OAuth token } `json:"session" url:"session,key"` // OAuth session using this token UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when OAuth token was updated User struct { ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"user" url:"user,key"` // Reference to the user associated with this token } type OAuthTokenCreateOpts struct { Client struct { Secret *string `json:"secret,omitempty" url:"secret,omitempty,key"` // secret used to obtain OAuth authorizations under this client } `json:"client" url:"client,key"` Grant struct { Code *string `json:"code,omitempty" url:"code,omitempty,key"` // grant code received from OAuth web application authorization Type *string `json:"type,omitempty" url:"type,omitempty,key"` // type of grant requested, one of `authorization_code` or // `refresh_token` } `json:"grant" url:"grant,key"` RefreshToken struct { Token *string `json:"token,omitempty" url:"token,omitempty,key"` // contents of the token to be used for authorization } `json:"refresh_token" url:"refresh_token,key"` } // Create a new OAuth token. func (s *Service) OAuthTokenCreate(ctx context.Context, o OAuthTokenCreateOpts) (*OAuthToken, error) { var oauthToken OAuthToken return &oauthToken, s.Post(ctx, &oauthToken, fmt.Sprintf("/oauth/tokens"), o) } // Revoke OAuth access token. func (s *Service) OAuthTokenDelete(ctx context.Context, oauthTokenIdentity string) (*OAuthToken, error) { var oauthToken OAuthToken return &oauthToken, s.Delete(ctx, &oauthToken, fmt.Sprintf("/oauth/tokens/%v", oauthTokenIdentity)) } // An outbound-ruleset is a collection of rules that specify what hosts // Dynos are allowed to communicate with. type OutboundRuleset struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when outbound-ruleset was created CreatedBy string `json:"created_by" url:"created_by,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an outbound-ruleset Rules []struct { FromPort int `json:"from_port" url:"from_port,key"` // an endpoint of communication in an operating system. Protocol string `json:"protocol" url:"protocol,key"` // formal standards and policies comprised of rules, procedures and // formats that define communication between two or more devices over a // network Target string `json:"target" url:"target,key"` // is the target destination in CIDR notation ToPort int `json:"to_port" url:"to_port,key"` // an endpoint of communication in an operating system. } `json:"rules" url:"rules,key"` Space struct { ID string `json:"id" url:"id,key"` // unique identifier of space Name string `json:"name" url:"name,key"` // unique name of space } `json:"space" url:"space,key"` // identity of space } // Current outbound ruleset for a space func (s *Service) OutboundRulesetCurrent(ctx context.Context, spaceIdentity string) (*OutboundRuleset, error) { var outboundRuleset OutboundRuleset return &outboundRuleset, s.Get(ctx, &outboundRuleset, fmt.Sprintf("/spaces/%v/outbound-ruleset", spaceIdentity), nil, nil) } // Info on an existing Outbound Ruleset func (s *Service) OutboundRulesetInfo(ctx context.Context, spaceIdentity string, outboundRulesetIdentity string) (*OutboundRuleset, error) { var outboundRuleset OutboundRuleset return &outboundRuleset, s.Get(ctx, &outboundRuleset, fmt.Sprintf("/spaces/%v/outbound-rulesets/%v", spaceIdentity, outboundRulesetIdentity), nil, nil) } type OutboundRulesetListResult []OutboundRuleset // List all Outbound Rulesets for a space func (s *Service) OutboundRulesetList(ctx context.Context, spaceIdentity string, lr *ListRange) (OutboundRulesetListResult, error) { var outboundRuleset OutboundRulesetListResult return outboundRuleset, s.Get(ctx, &outboundRuleset, fmt.Sprintf("/spaces/%v/outbound-rulesets", spaceIdentity), nil, lr) } type OutboundRulesetCreateOpts struct { Rules []*struct { FromPort int `json:"from_port" url:"from_port,key"` // an endpoint of communication in an operating system. Protocol string `json:"protocol" url:"protocol,key"` // formal standards and policies comprised of rules, procedures and // formats that define communication between two or more devices over a // network Target string `json:"target" url:"target,key"` // is the target destination in CIDR notation ToPort int `json:"to_port" url:"to_port,key"` // an endpoint of communication in an operating system. } `json:"rules,omitempty" url:"rules,omitempty,key"` } // Create a new outbound ruleset func (s *Service) OutboundRulesetCreate(ctx context.Context, spaceIdentity string, o OutboundRulesetCreateOpts) (*OutboundRuleset, error) { var outboundRuleset OutboundRuleset return &outboundRuleset, s.Put(ctx, &outboundRuleset, fmt.Sprintf("/spaces/%v/outbound-ruleset", spaceIdentity), o) } // A password reset represents a in-process password reset attempt. type PasswordReset struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when password reset was created User struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"user" url:"user,key"` } type PasswordResetResetPasswordOpts struct { Email *string `json:"email,omitempty" url:"email,omitempty,key"` // unique email address of account } // Reset account's password. This will send a reset password link to the // user's email address. func (s *Service) PasswordResetResetPassword(ctx context.Context, o PasswordResetResetPasswordOpts) (*PasswordReset, error) { var passwordReset PasswordReset return &passwordReset, s.Post(ctx, &passwordReset, fmt.Sprintf("/password-resets"), o) } type PasswordResetCompleteResetPasswordOpts struct { Password *string `json:"password,omitempty" url:"password,omitempty,key"` // current password on the account PasswordConfirmation *string `json:"password_confirmation,omitempty" url:"password_confirmation,omitempty,key"` // confirmation of the new password } // Complete password reset. func (s *Service) PasswordResetCompleteResetPassword(ctx context.Context, passwordResetResetPasswordToken string, o PasswordResetCompleteResetPasswordOpts) (*PasswordReset, error) { var passwordReset PasswordReset return &passwordReset, s.Post(ctx, &passwordReset, fmt.Sprintf("/password-resets/%v/actions/finalize", passwordResetResetPasswordToken), o) } // [Peering](https://devcenter.heroku.com/articles/private-space-peering) // provides a way to peer your Private Space VPC to another AWS VPC. type Peering struct { AwsAccountID string `json:"aws_account_id" url:"aws_account_id,key"` // The AWS account ID of your Private Space. AwsRegion string `json:"aws_region" url:"aws_region,key"` // The AWS region of the peer connection. AwsVpcID string `json:"aws_vpc_id" url:"aws_vpc_id,key"` // The AWS VPC ID of the peer. CIDRBlocks []string `json:"cidr_blocks" url:"cidr_blocks,key"` // The CIDR blocks of the peer. Expires time.Time `json:"expires" url:"expires,key"` // When a peering connection will expire. PcxID string `json:"pcx_id" url:"pcx_id,key"` // The AWS VPC Peering Connection ID of the peering. Status string `json:"status" url:"status,key"` // The status of the peering connection. Type string `json:"type" url:"type,key"` // The type of peering connection. } type PeeringListResult []Peering // List peering connections of a private space. func (s *Service) PeeringList(ctx context.Context, spaceIdentity string, lr *ListRange) (PeeringListResult, error) { var peering PeeringListResult return peering, s.Get(ctx, &peering, fmt.Sprintf("/spaces/%v/peerings", spaceIdentity), nil, lr) } // Accept a pending peering connection with a private space. func (s *Service) PeeringAccept(ctx context.Context, spaceIdentity string, peeringPcxID string) (*Peering, error) { var peering Peering return &peering, s.Post(ctx, &peering, fmt.Sprintf("/spaces/%v/peerings/%v/actions/accept", spaceIdentity, peeringPcxID), nil) } // Destroy an active peering connection with a private space. func (s *Service) PeeringDestroy(ctx context.Context, spaceIdentity string, peeringPcxID string) (*Peering, error) { var peering Peering return &peering, s.Delete(ctx, &peering, fmt.Sprintf("/spaces/%v/peerings/%v", spaceIdentity, peeringPcxID)) } // Fetch information for existing peering connection func (s *Service) PeeringInfo(ctx context.Context, spaceIdentity string, peeringPcxID string) (*Peering, error) { var peering Peering return &peering, s.Get(ctx, &peering, fmt.Sprintf("/spaces/%v/peerings/%v", spaceIdentity, peeringPcxID), nil, nil) } // [Peering // Info](https://devcenter.heroku.com/articles/private-space-peering) // gives you the information necessary to peer an AWS VPC to a Private // Space. type PeeringInfo struct { AwsAccountID string `json:"aws_account_id" url:"aws_account_id,key"` // The AWS account ID of your Private Space. AwsRegion string `json:"aws_region" url:"aws_region,key"` // region name used by provider DynoCIDRBlocks []string `json:"dyno_cidr_blocks" url:"dyno_cidr_blocks,key"` // The CIDR ranges that should be routed to the Private Space VPC. SpaceCIDRBlocks []string `json:"space_cidr_blocks" url:"space_cidr_blocks,key"` // The CIDR ranges that should be routed to the Private Space VPC. UnavailableCIDRBlocks []string `json:"unavailable_cidr_blocks" url:"unavailable_cidr_blocks,key"` // The CIDR ranges that you must not conflict with. VpcCIDR string `json:"vpc_cidr" url:"vpc_cidr,key"` // An IP address and the number of significant bits that make up the // routing or networking portion. VpcID string `json:"vpc_id" url:"vpc_id,key"` // The AWS VPC ID of the peer. } // Provides the necessary information to establish an AWS VPC Peering // with your private space. func (s *Service) PeeringInfoInfo(ctx context.Context, spaceIdentity string) (*PeeringInfo, error) { var peeringInfo PeeringInfo return &peeringInfo, s.Get(ctx, &peeringInfo, fmt.Sprintf("/spaces/%v/peering-info", spaceIdentity), nil, nil) } // An owned entity including users' permissions. type PermissionEntity struct { ID string `json:"id" url:"id,key"` // ID of the entity. Name string `json:"name" url:"name,key"` // Name of the entity. TeamID string `json:"team_id" url:"team_id,key"` // unique identifier of team Type string `json:"type" url:"type,key"` // The type of object the entity is referring to. Users []struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account Permissions []string `json:"permissions" url:"permissions,key"` // enterprise account permissions } `json:"users" url:"users,key"` // Users that have access to the entity. } type PermissionEntityListResult []PermissionEntity // List permission entities for a team. func (s *Service) PermissionEntityList(ctx context.Context, teamIdentity string, lr *ListRange) (PermissionEntityListResult, error) { var permissionEntity PermissionEntityListResult return permissionEntity, s.Get(ctx, &permissionEntity, fmt.Sprintf("/teams/%v/permissions", teamIdentity), nil, lr) } // A pipeline allows grouping of apps into different stages. type Pipeline struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when pipeline was created ID string `json:"id" url:"id,key"` // unique identifier of pipeline Name string `json:"name" url:"name,key"` // name of pipeline Owner *struct { ID string `json:"id" url:"id,key"` // unique identifier of a pipeline owner Type string `json:"type" url:"type,key"` // type of pipeline owner } `json:"owner" url:"owner,key"` // Owner of a pipeline. UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when pipeline was updated } type PipelineCreateOpts struct { Name string `json:"name" url:"name,key"` // name of pipeline Owner *struct { ID string `json:"id" url:"id,key"` // unique identifier of a pipeline owner Type string `json:"type" url:"type,key"` // type of pipeline owner } `json:"owner,omitempty" url:"owner,omitempty,key"` // Owner of a pipeline. } // Create a new pipeline. func (s *Service) PipelineCreate(ctx context.Context, o PipelineCreateOpts) (*Pipeline, error) { var pipeline Pipeline return &pipeline, s.Post(ctx, &pipeline, fmt.Sprintf("/pipelines"), o) } // Info for existing pipeline. func (s *Service) PipelineInfo(ctx context.Context, pipelineIdentity string) (*Pipeline, error) { var pipeline Pipeline return &pipeline, s.Get(ctx, &pipeline, fmt.Sprintf("/pipelines/%v", pipelineIdentity), nil, nil) } // Delete an existing pipeline. func (s *Service) PipelineDelete(ctx context.Context, pipelineID string) (*Pipeline, error) { var pipeline Pipeline return &pipeline, s.Delete(ctx, &pipeline, fmt.Sprintf("/pipelines/%v", pipelineID)) } type PipelineUpdateOpts struct { Name *string `json:"name,omitempty" url:"name,omitempty,key"` // name of pipeline } // Update an existing pipeline. func (s *Service) PipelineUpdate(ctx context.Context, pipelineID string, o PipelineUpdateOpts) (*Pipeline, error) { var pipeline Pipeline return &pipeline, s.Patch(ctx, &pipeline, fmt.Sprintf("/pipelines/%v", pipelineID), o) } type PipelineListResult []Pipeline // List existing pipelines. func (s *Service) PipelineList(ctx context.Context, lr *ListRange) error { return s.Get(ctx, nil, fmt.Sprintf("/pipelines"), nil, lr) } // Information about latest builds of apps in a pipeline. type PipelineBuild struct{} type PipelineBuildListResult []struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app } `json:"app" url:"app,key"` // app that the build belongs to Buildpacks []struct { Name string `json:"name" url:"name,key"` // Buildpack Registry name of the buildpack for the app URL string `json:"url" url:"url,key"` // the URL of the buildpack for the app } `json:"buildpacks" url:"buildpacks,key"` // buildpacks executed for this build, in order CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when build was created ID string `json:"id" url:"id,key"` // unique identifier of build OutputStreamURL string `json:"output_stream_url" url:"output_stream_url,key"` // Build process output will be available from this URL as a stream. The // stream is available as either `text/plain` or `text/event-stream`. // Clients should be prepared to handle disconnects and can resume the // stream by sending a `Range` header (for `text/plain`) or a // `Last-Event-Id` header (for `text/event-stream`). Release *struct { ID string `json:"id" url:"id,key"` // unique identifier of release } `json:"release" url:"release,key"` // release resulting from the build Slug *struct { ID string `json:"id" url:"id,key"` // unique identifier of slug } `json:"slug" url:"slug,key"` // slug created by this build SourceBlob struct { Checksum *string `json:"checksum" url:"checksum,key"` // an optional checksum of the gzipped tarball for verifying its // integrity URL string `json:"url" url:"url,key"` // URL where gzipped tar archive of source code for build was // downloaded. Version *string `json:"version" url:"version,key"` // Version of the gzipped tarball. } `json:"source_blob" url:"source_blob,key"` // location of gzipped tarball of source code used to create build Stack string `json:"stack" url:"stack,key"` // stack of build Status string `json:"status" url:"status,key"` // status of build UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when build was updated User struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"user" url:"user,key"` // user that started the build } // List latest builds for each app in a pipeline func (s *Service) PipelineBuildList(ctx context.Context, pipelineID string, lr *ListRange) (PipelineBuildListResult, error) { var pipelineBuild PipelineBuildListResult return pipelineBuild, s.Get(ctx, &pipelineBuild, fmt.Sprintf("/pipelines/%v/latest-builds", pipelineID), nil, lr) } // Pipeline Config Vars allow you to manage the configuration // information provided to a pipeline. type PipelineConfigVar map[string]string type PipelineConfigVarInfoForAppResult map[string]*string // Get config-vars for a pipeline stage. func (s *Service) PipelineConfigVarInfoForApp(ctx context.Context, pipelineID string, pipelineCouplingStage string) (PipelineConfigVarInfoForAppResult, error) { var pipelineConfigVar PipelineConfigVarInfoForAppResult return pipelineConfigVar, s.Get(ctx, &pipelineConfigVar, fmt.Sprintf("/pipelines/%v/stage/%v/config-vars", pipelineID, pipelineCouplingStage), nil, nil) } type PipelineConfigVarUpdateResult map[string]*string // Update config-vars for a pipeline stage. You can update existing // config-vars by setting them again, and remove by setting it to // `null`. func (s *Service) PipelineConfigVarUpdate(ctx context.Context, pipelineID string, pipelineCouplingStage string, o map[string]*string) (PipelineConfigVarUpdateResult, error) { var pipelineConfigVar PipelineConfigVarUpdateResult return pipelineConfigVar, s.Patch(ctx, &pipelineConfigVar, fmt.Sprintf("/pipelines/%v/stage/%v/config-vars", pipelineID, pipelineCouplingStage), o) } // Information about an app's coupling to a pipeline type PipelineCoupling struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app } `json:"app" url:"app,key"` // app involved in the pipeline coupling CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when pipeline coupling was created ID string `json:"id" url:"id,key"` // unique identifier of pipeline coupling Pipeline struct { ID string `json:"id" url:"id,key"` // unique identifier of pipeline } `json:"pipeline" url:"pipeline,key"` // pipeline involved in the coupling Stage string `json:"stage" url:"stage,key"` // target pipeline stage UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when pipeline coupling was updated } type PipelineCouplingListByPipelineResult []PipelineCoupling // List couplings for a pipeline func (s *Service) PipelineCouplingListByPipeline(ctx context.Context, pipelineID string, lr *ListRange) (PipelineCouplingListByPipelineResult, error) { var pipelineCoupling PipelineCouplingListByPipelineResult return pipelineCoupling, s.Get(ctx, &pipelineCoupling, fmt.Sprintf("/pipelines/%v/pipeline-couplings", pipelineID), nil, lr) } type PipelineCouplingListByCurrentUserResult []PipelineCoupling // List pipeline couplings for the current user. func (s *Service) PipelineCouplingListByCurrentUser(ctx context.Context, lr *ListRange) (PipelineCouplingListByCurrentUserResult, error) { var pipelineCoupling PipelineCouplingListByCurrentUserResult return pipelineCoupling, s.Get(ctx, &pipelineCoupling, fmt.Sprintf("/users/~/pipeline-couplings"), nil, lr) } type PipelineCouplingListResult []PipelineCoupling // List pipeline couplings. func (s *Service) PipelineCouplingList(ctx context.Context, lr *ListRange) (PipelineCouplingListResult, error) { var pipelineCoupling PipelineCouplingListResult return pipelineCoupling, s.Get(ctx, &pipelineCoupling, fmt.Sprintf("/pipeline-couplings"), nil, lr) } type PipelineCouplingListByTeamResult []PipelineCoupling // List pipeline couplings for a team. func (s *Service) PipelineCouplingListByTeam(ctx context.Context, teamIdentity string, lr *ListRange) (PipelineCouplingListByTeamResult, error) { var pipelineCoupling PipelineCouplingListByTeamResult return pipelineCoupling, s.Get(ctx, &pipelineCoupling, fmt.Sprintf("/teams/%v/pipeline-couplings", teamIdentity), nil, lr) } type PipelineCouplingCreateOpts struct { App string `json:"app" url:"app,key"` // unique identifier of app Pipeline string `json:"pipeline" url:"pipeline,key"` // unique identifier of pipeline Stage string `json:"stage" url:"stage,key"` // target pipeline stage } // Create a new pipeline coupling. func (s *Service) PipelineCouplingCreate(ctx context.Context, o PipelineCouplingCreateOpts) (*PipelineCoupling, error) { var pipelineCoupling PipelineCoupling return &pipelineCoupling, s.Post(ctx, &pipelineCoupling, fmt.Sprintf("/pipeline-couplings"), o) } // Info for an existing pipeline coupling. func (s *Service) PipelineCouplingInfo(ctx context.Context, pipelineCouplingIdentity string) (*PipelineCoupling, error) { var pipelineCoupling PipelineCoupling return &pipelineCoupling, s.Get(ctx, &pipelineCoupling, fmt.Sprintf("/pipeline-couplings/%v", pipelineCouplingIdentity), nil, nil) } // Delete an existing pipeline coupling. func (s *Service) PipelineCouplingDelete(ctx context.Context, pipelineCouplingIdentity string) (*PipelineCoupling, error) { var pipelineCoupling PipelineCoupling return &pipelineCoupling, s.Delete(ctx, &pipelineCoupling, fmt.Sprintf("/pipeline-couplings/%v", pipelineCouplingIdentity)) } type PipelineCouplingUpdateOpts struct { Stage *string `json:"stage,omitempty" url:"stage,omitempty,key"` // target pipeline stage } // Update an existing pipeline coupling. func (s *Service) PipelineCouplingUpdate(ctx context.Context, pipelineCouplingIdentity string, o PipelineCouplingUpdateOpts) (*PipelineCoupling, error) { var pipelineCoupling PipelineCoupling return &pipelineCoupling, s.Patch(ctx, &pipelineCoupling, fmt.Sprintf("/pipeline-couplings/%v", pipelineCouplingIdentity), o) } // Info for an existing pipeline coupling. func (s *Service) PipelineCouplingInfoByApp(ctx context.Context, appIdentity string) (*PipelineCoupling, error) { var pipelineCoupling PipelineCoupling return &pipelineCoupling, s.Get(ctx, &pipelineCoupling, fmt.Sprintf("/apps/%v/pipeline-couplings", appIdentity), nil, nil) } // Information about latest deployments of apps in a pipeline. type PipelineDeployment struct{} type PipelineDeploymentListResult []struct { AddonPlanNames []string `json:"addon_plan_names" url:"addon_plan_names,key"` // add-on plans installed on the app for this release App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // app involved in the release CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when release was created Current bool `json:"current" url:"current,key"` // indicates this release as being the current one for the app Description string `json:"description" url:"description,key"` // description of changes in this release ID string `json:"id" url:"id,key"` // unique identifier of release OutputStreamURL *string `json:"output_stream_url" url:"output_stream_url,key"` // Release command output will be available from this URL as a stream. // The stream is available as either `text/plain` or // `text/event-stream`. Clients should be prepared to handle disconnects // and can resume the stream by sending a `Range` header (for // `text/plain`) or a `Last-Event-Id` header (for `text/event-stream`). Slug *struct { ID string `json:"id" url:"id,key"` // unique identifier of slug } `json:"slug" url:"slug,key"` // slug running in this release Status string `json:"status" url:"status,key"` // current status of the release UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when release was updated User struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"user" url:"user,key"` // user that created the release Version int `json:"version" url:"version,key"` // unique version assigned to the release } // List latest slug releases for each app in a pipeline func (s *Service) PipelineDeploymentList(ctx context.Context, pipelineID string, lr *ListRange) (PipelineDeploymentListResult, error) { var pipelineDeployment PipelineDeploymentListResult return pipelineDeployment, s.Get(ctx, &pipelineDeployment, fmt.Sprintf("/pipelines/%v/latest-deployments", pipelineID), nil, lr) } // Promotions allow you to move code from an app in a pipeline to all // targets type PipelinePromotion struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when promotion was created ID string `json:"id" url:"id,key"` // unique identifier of promotion Pipeline struct { ID string `json:"id" url:"id,key"` // unique identifier of pipeline } `json:"pipeline" url:"pipeline,key"` // the pipeline which the promotion belongs to Source struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app } `json:"app" url:"app,key"` // the app which was promoted from Release struct { ID string `json:"id" url:"id,key"` // unique identifier of release } `json:"release" url:"release,key"` // the release used to promoted from } `json:"source" url:"source,key"` // the app being promoted from Status string `json:"status" url:"status,key"` // status of promotion UpdatedAt *time.Time `json:"updated_at" url:"updated_at,key"` // when promotion was updated } type PipelinePromotionCreateOpts struct { Pipeline struct { ID string `json:"id" url:"id,key"` // unique identifier of pipeline } `json:"pipeline" url:"pipeline,key"` // pipeline involved in the promotion Source struct { App *struct { ID *string `json:"id,omitempty" url:"id,omitempty,key"` // unique identifier of app } `json:"app,omitempty" url:"app,omitempty,key"` // the app which was promoted from } `json:"source" url:"source,key"` // the app being promoted from Targets []struct { App *struct { ID *string `json:"id,omitempty" url:"id,omitempty,key"` // unique identifier of app } `json:"app,omitempty" url:"app,omitempty,key"` // the app is being promoted to } `json:"targets" url:"targets,key"` } // Create a new promotion. func (s *Service) PipelinePromotionCreate(ctx context.Context, o PipelinePromotionCreateOpts) (*PipelinePromotion, error) { var pipelinePromotion PipelinePromotion return &pipelinePromotion, s.Post(ctx, &pipelinePromotion, fmt.Sprintf("/pipeline-promotions"), o) } // Info for existing pipeline promotion. func (s *Service) PipelinePromotionInfo(ctx context.Context, pipelinePromotionIdentity string) (*PipelinePromotion, error) { var pipelinePromotion PipelinePromotion return &pipelinePromotion, s.Get(ctx, &pipelinePromotion, fmt.Sprintf("/pipeline-promotions/%v", pipelinePromotionIdentity), nil, nil) } // Promotion targets represent an individual app being promoted to type PipelinePromotionTarget struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app } `json:"app" url:"app,key"` // the app which was promoted to ErrorMessage *string `json:"error_message" url:"error_message,key"` // an error message for why the promotion failed ID string `json:"id" url:"id,key"` // unique identifier of promotion target PipelinePromotion struct { ID string `json:"id" url:"id,key"` // unique identifier of promotion } `json:"pipeline_promotion" url:"pipeline_promotion,key"` // the promotion which the target belongs to Release *struct { ID string `json:"id" url:"id,key"` // unique identifier of release } `json:"release" url:"release,key"` // the release which was created on the target app Status string `json:"status" url:"status,key"` // status of promotion } type PipelinePromotionTargetListResult []PipelinePromotionTarget // List promotion targets belonging to an existing promotion. func (s *Service) PipelinePromotionTargetList(ctx context.Context, pipelinePromotionID string, lr *ListRange) (PipelinePromotionTargetListResult, error) { var pipelinePromotionTarget PipelinePromotionTargetListResult return pipelinePromotionTarget, s.Get(ctx, &pipelinePromotionTarget, fmt.Sprintf("/pipeline-promotions/%v/promotion-targets", pipelinePromotionID), nil, lr) } // Information about latest releases of apps in a pipeline. type PipelineRelease struct{} type PipelineReleaseListResult []struct { AddonPlanNames []string `json:"addon_plan_names" url:"addon_plan_names,key"` // add-on plans installed on the app for this release App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // app involved in the release CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when release was created Current bool `json:"current" url:"current,key"` // indicates this release as being the current one for the app Description string `json:"description" url:"description,key"` // description of changes in this release ID string `json:"id" url:"id,key"` // unique identifier of release OutputStreamURL *string `json:"output_stream_url" url:"output_stream_url,key"` // Release command output will be available from this URL as a stream. // The stream is available as either `text/plain` or // `text/event-stream`. Clients should be prepared to handle disconnects // and can resume the stream by sending a `Range` header (for // `text/plain`) or a `Last-Event-Id` header (for `text/event-stream`). Slug *struct { ID string `json:"id" url:"id,key"` // unique identifier of slug } `json:"slug" url:"slug,key"` // slug running in this release Status string `json:"status" url:"status,key"` // current status of the release UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when release was updated User struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"user" url:"user,key"` // user that created the release Version int `json:"version" url:"version,key"` // unique version assigned to the release } // List latest releases for each app in a pipeline func (s *Service) PipelineReleaseList(ctx context.Context, pipelineID string, lr *ListRange) (PipelineReleaseListResult, error) { var pipelineRelease PipelineReleaseListResult return pipelineRelease, s.Get(ctx, &pipelineRelease, fmt.Sprintf("/pipelines/%v/latest-releases", pipelineID), nil, lr) } // A pipeline's stack is determined by the apps in the pipeline. This is // used during creation of CI and Review Apps that have no stack defined // in app.json type PipelineStack struct { Stack *struct { ID string `json:"id" url:"id,key"` // unique identifier of stack Name string `json:"name" url:"name,key"` // unique name of stack } `json:"stack" url:"stack,key"` // identity of the stack that will be used for new builds without a // stack defined in CI and Review Apps } // The stack for a given pipeline, used for CI and Review Apps that have // no stack defined in app.json. func (s *Service) PipelineStackDefaultStack(ctx context.Context, pipelineID string) (*PipelineStack, error) { var pipelineStack PipelineStack return &pipelineStack, s.Get(ctx, &pipelineStack, fmt.Sprintf("/pipelines/%v/pipeline-stack", pipelineID), nil, nil) } // A pipeline transfer is the process of changing pipeline ownership // along with the contained apps. type PipelineTransfer struct { NewOwner *struct { ID string `json:"id" url:"id,key"` // unique identifier of a pipeline owner Type string `json:"type" url:"type,key"` // type of pipeline owner } `json:"new_owner" url:"new_owner,key"` // Owner of a pipeline. Pipeline struct { ID string `json:"id" url:"id,key"` // unique identifier of pipeline } `json:"pipeline" url:"pipeline,key"` // pipeline being transferred PreviousOwner *struct { ID string `json:"id" url:"id,key"` // unique identifier of a pipeline owner Type string `json:"type" url:"type,key"` // type of pipeline owner } `json:"previous_owner" url:"previous_owner,key"` // Owner of a pipeline. } type PipelineTransferCreateOpts struct { NewOwner struct { ID *string `json:"id,omitempty" url:"id,omitempty,key"` // unique identifier of a pipeline owner Type *string `json:"type,omitempty" url:"type,omitempty,key"` // type of pipeline owner } `json:"new_owner" url:"new_owner,key"` // New pipeline owner Pipeline struct { ID *string `json:"id,omitempty" url:"id,omitempty,key"` // unique identifier of pipeline } `json:"pipeline" url:"pipeline,key"` // The pipeline to transfer } // Create a new pipeline transfer. func (s *Service) PipelineTransferCreate(ctx context.Context, o PipelineTransferCreateOpts) (*PipelineTransfer, error) { var pipelineTransfer PipelineTransfer return &pipelineTransfer, s.Post(ctx, &pipelineTransfer, fmt.Sprintf("/pipeline-transfers"), o) } // Plans represent different configurations of add-ons that may be added // to apps. Endpoints under add-on services can be accessed without // authentication. type Plan struct { AddonService struct { ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service Name string `json:"name" url:"name,key"` // unique name of this add-on-service } `json:"addon_service" url:"addon_service,key"` // identity of add-on service Compliance []string `json:"compliance" url:"compliance,key"` // the compliance regimes applied to an add-on plan CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when plan was created Default bool `json:"default" url:"default,key"` // whether this plan is the default for its add-on service Description string `json:"description" url:"description,key"` // description of plan HumanName string `json:"human_name" url:"human_name,key"` // human readable name of the add-on plan ID string `json:"id" url:"id,key"` // unique identifier of this plan InstallableInsidePrivateNetwork bool `json:"installable_inside_private_network" url:"installable_inside_private_network,key"` // whether this plan is installable to a Private Spaces app InstallableOutsidePrivateNetwork bool `json:"installable_outside_private_network" url:"installable_outside_private_network,key"` // whether this plan is installable to a Common Runtime app Name string `json:"name" url:"name,key"` // unique name of this plan Price struct { Cents int `json:"cents" url:"cents,key"` // price in cents per unit of plan Contract bool `json:"contract" url:"contract,key"` // price is negotiated in a contract outside of monthly add-on billing Unit string `json:"unit" url:"unit,key"` // unit of price for plan } `json:"price" url:"price,key"` // price SpaceDefault bool `json:"space_default" url:"space_default,key"` // whether this plan is the default for apps in Private Spaces State string `json:"state" url:"state,key"` // release status for plan UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when plan was updated Visible bool `json:"visible" url:"visible,key"` // whether this plan is publicly visible } // Info for existing plan. func (s *Service) PlanInfo(ctx context.Context, planIdentity string) (*Plan, error) { var plan Plan return &plan, s.Get(ctx, &plan, fmt.Sprintf("/plans/%v", planIdentity), nil, nil) } // Info for existing plan by Add-on. func (s *Service) PlanInfoByAddOn(ctx context.Context, addOnServiceIdentity string, planIdentity string) (*Plan, error) { var plan Plan return &plan, s.Get(ctx, &plan, fmt.Sprintf("/addon-services/%v/plans/%v", addOnServiceIdentity, planIdentity), nil, nil) } type PlanListByAddOnResult []Plan // List existing plans by Add-on. func (s *Service) PlanListByAddOn(ctx context.Context, addOnServiceIdentity string, lr *ListRange) (PlanListByAddOnResult, error) { var plan PlanListByAddOnResult return plan, s.Get(ctx, &plan, fmt.Sprintf("/addon-services/%v/plans", addOnServiceIdentity), nil, lr) } // Rate Limit represents the number of request tokens each account // holds. Requests to this endpoint do not count towards the rate limit. type RateLimit struct { Remaining int `json:"remaining" url:"remaining,key"` // allowed requests remaining in current interval } // Info for rate limits. func (s *Service) RateLimitInfo(ctx context.Context) (*RateLimit, error) { var rateLimit RateLimit return &rateLimit, s.Get(ctx, &rateLimit, fmt.Sprintf("/account/rate-limits"), nil, nil) } // A region represents a geographic location in which your application // may run. type Region struct { Country string `json:"country" url:"country,key"` // country where the region exists CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when region was created Description string `json:"description" url:"description,key"` // description of region ID string `json:"id" url:"id,key"` // unique identifier of region Locale string `json:"locale" url:"locale,key"` // area in the country where the region exists Name string `json:"name" url:"name,key"` // unique name of region PrivateCapable bool `json:"private_capable" url:"private_capable,key"` // whether or not region is available for creating a Private Space Provider struct { Name string `json:"name" url:"name,key"` // name of provider Region string `json:"region" url:"region,key"` // region name used by provider } `json:"provider" url:"provider,key"` // provider of underlying substrate UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when region was updated } // Info for existing region. func (s *Service) RegionInfo(ctx context.Context, regionIdentity string) (*Region, error) { var region Region return ®ion, s.Get(ctx, ®ion, fmt.Sprintf("/regions/%v", regionIdentity), nil, nil) } type RegionListResult []Region // List existing regions. func (s *Service) RegionList(ctx context.Context, lr *ListRange) (RegionListResult, error) { var region RegionListResult return region, s.Get(ctx, ®ion, fmt.Sprintf("/regions"), nil, lr) } // A release represents a combination of code, config vars and add-ons // for an app on Heroku. type Release struct { AddonPlanNames []string `json:"addon_plan_names" url:"addon_plan_names,key"` // add-on plans installed on the app for this release App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // app involved in the release CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when release was created Current bool `json:"current" url:"current,key"` // indicates this release as being the current one for the app Description string `json:"description" url:"description,key"` // description of changes in this release ID string `json:"id" url:"id,key"` // unique identifier of release OutputStreamURL *string `json:"output_stream_url" url:"output_stream_url,key"` // Release command output will be available from this URL as a stream. // The stream is available as either `text/plain` or // `text/event-stream`. Clients should be prepared to handle disconnects // and can resume the stream by sending a `Range` header (for // `text/plain`) or a `Last-Event-Id` header (for `text/event-stream`). Slug *struct { ID string `json:"id" url:"id,key"` // unique identifier of slug } `json:"slug" url:"slug,key"` // slug running in this release Status string `json:"status" url:"status,key"` // current status of the release UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when release was updated User struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"user" url:"user,key"` // user that created the release Version int `json:"version" url:"version,key"` // unique version assigned to the release } // Info for existing release. func (s *Service) ReleaseInfo(ctx context.Context, appIdentity string, releaseIdentity string) (*Release, error) { var release Release return &release, s.Get(ctx, &release, fmt.Sprintf("/apps/%v/releases/%v", appIdentity, releaseIdentity), nil, nil) } type ReleaseListResult []Release // List existing releases. func (s *Service) ReleaseList(ctx context.Context, appIdentity string, lr *ListRange) (ReleaseListResult, error) { var release ReleaseListResult return release, s.Get(ctx, &release, fmt.Sprintf("/apps/%v/releases", appIdentity), nil, lr) } type ReleaseCreateOpts struct { Description *string `json:"description,omitempty" url:"description,omitempty,key"` // description of changes in this release Slug string `json:"slug" url:"slug,key"` // unique identifier of slug } // Create new release. func (s *Service) ReleaseCreate(ctx context.Context, appIdentity string, o ReleaseCreateOpts) (*Release, error) { var release Release return &release, s.Post(ctx, &release, fmt.Sprintf("/apps/%v/releases", appIdentity), o) } type ReleaseRollbackOpts struct { Release string `json:"release" url:"release,key"` // unique identifier of release } // Rollback to an existing release. func (s *Service) ReleaseRollback(ctx context.Context, appIdentity string, o ReleaseRollbackOpts) (*Release, error) { var release Release return &release, s.Post(ctx, &release, fmt.Sprintf("/apps/%v/releases", appIdentity), o) } // An ephemeral app to review a set of changes type ReviewApp struct { App *struct { ID string `json:"id" url:"id,key"` // unique identifier of app } `json:"app" url:"app,key"` // the Heroku app associated to this review app AppSetup *struct { ID string `json:"id" url:"id,key"` // unique identifier of app setup } `json:"app_setup" url:"app_setup,key"` // the app setup for this review app Branch string `json:"branch" url:"branch,key"` // the branch of the repository which the review app is based on CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when test run was created Creator struct{} `json:"creator" url:"creator,key"` // The user who created the review app ErrorStatus *string `json:"error_status" url:"error_status,key"` // error message from creating the review app if any ForkRepo *struct { ID *int `json:"id" url:"id,key"` // repository id of the fork the branch resides in } `json:"fork_repo" url:"fork_repo,key"` ID string `json:"id" url:"id,key"` // unique identifier of the review app Message *string `json:"message" url:"message,key"` // message from creating the review app if any Pipeline struct { ID string `json:"id" url:"id,key"` // unique identifier of pipeline } `json:"pipeline" url:"pipeline,key"` // the pipeline which this review app belongs to PrNumber *int `json:"pr_number" url:"pr_number,key"` // pull request number the review app is built for Status string `json:"status" url:"status,key"` // current state of the review app UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when review app was updated WaitForCi bool `json:"wait_for_ci" url:"wait_for_ci,key"` // wait for ci before building the app } type ReviewAppCreateOpts struct { Branch string `json:"branch" url:"branch,key"` // the branch of the repository which the review app is based on Environment map[string]*string `json:"environment,omitempty" url:"environment,omitempty,key"` // hash of config vars ForkRepoID *int `json:"fork_repo_id,omitempty" url:"fork_repo_id,omitempty,key"` // repository id of the fork the branch resides in Pipeline string `json:"pipeline" url:"pipeline,key"` // unique identifier of pipeline PrNumber *int `json:"pr_number,omitempty" url:"pr_number,omitempty,key"` // pull request number the review app is built for SourceBlob struct { URL *string `json:"url,omitempty" url:"url,omitempty,key"` // URL where gzipped tar archive of source code for build was // downloaded. Version *string `json:"version,omitempty" url:"version,omitempty,key"` // The version number (or SHA) of the code to build. } `json:"source_blob" url:"source_blob,key"` // The download location for the review app's source code } // Create a new review app func (s *Service) ReviewAppCreate(ctx context.Context, o ReviewAppCreateOpts) (*ReviewApp, error) { var reviewApp ReviewApp return &reviewApp, s.Post(ctx, &reviewApp, fmt.Sprintf("/review-apps"), o) } // Gets an existing review app func (s *Service) ReviewAppGetReviewApp(ctx context.Context, reviewAppID string) (*ReviewApp, error) { var reviewApp ReviewApp return &reviewApp, s.Get(ctx, &reviewApp, fmt.Sprintf("/review-apps/%v", reviewAppID), nil, nil) } // Delete an existing review app func (s *Service) ReviewAppDelete(ctx context.Context, reviewAppID string) (*ReviewApp, error) { var reviewApp ReviewApp return &reviewApp, s.Delete(ctx, &reviewApp, fmt.Sprintf("/review-apps/%v", reviewAppID)) } // Get a review app using the associated app_id func (s *Service) ReviewAppGetReviewAppByAppID(ctx context.Context, appIdentity string) (*ReviewApp, error) { var reviewApp ReviewApp return &reviewApp, s.Get(ctx, &reviewApp, fmt.Sprintf("/apps/%v/review-app", appIdentity), nil, nil) } type ReviewAppListResult []ReviewApp // List review apps for a pipeline func (s *Service) ReviewAppList(ctx context.Context, pipelineID string, lr *ListRange) (ReviewAppListResult, error) { var reviewApp ReviewAppListResult return reviewApp, s.Get(ctx, &reviewApp, fmt.Sprintf("/pipelines/%v/review-apps", pipelineID), nil, lr) } // Review apps can be configured for pipelines. type ReviewAppConfig struct { AutomaticReviewApps bool `json:"automatic_review_apps" url:"automatic_review_apps,key"` // enable automatic review apps for pull requests BaseName *string `json:"base_name" url:"base_name,key"` // A unique prefix that will be used to create review app names DeployTarget *struct { ID string `json:"id" url:"id,key"` // unique identifier of deploy target Type string `json:"type" url:"type,key"` // type of deploy target } `json:"deploy_target" url:"deploy_target,key"` // the deploy target for the review apps of a pipeline DestroyStaleApps bool `json:"destroy_stale_apps" url:"destroy_stale_apps,key"` // automatically destroy review apps when they haven't been deployed for // a number of days PipelineID string `json:"pipeline_id" url:"pipeline_id,key"` // unique identifier of pipeline Repo struct { ID int `json:"id" url:"id,key"` // repository id } `json:"repo" url:"repo,key"` StaleDays int `json:"stale_days" url:"stale_days,key"` // number of days without a deployment after which to consider a review // app stale WaitForCi bool `json:"wait_for_ci" url:"wait_for_ci,key"` // If true, review apps are created only when CI passes } type ReviewAppConfigEnableOpts struct { AutomaticReviewApps *bool `json:"automatic_review_apps,omitempty" url:"automatic_review_apps,omitempty,key"` // enable automatic review apps for pull requests BaseName *string `json:"base_name,omitempty" url:"base_name,omitempty,key"` // A unique prefix that will be used to create review app names DeployTarget *struct { ID string `json:"id" url:"id,key"` // unique identifier of deploy target Type string `json:"type" url:"type,key"` // type of deploy target } `json:"deploy_target,omitempty" url:"deploy_target,omitempty,key"` // the deploy target for the review apps of a pipeline DestroyStaleApps *bool `json:"destroy_stale_apps,omitempty" url:"destroy_stale_apps,omitempty,key"` // automatically destroy review apps when they haven't been deployed for // a number of days Repo string `json:"repo" url:"repo,key"` // repository name StaleDays *int `json:"stale_days,omitempty" url:"stale_days,omitempty,key"` // number of days without a deployment after which to consider a review // app stale WaitForCi *bool `json:"wait_for_ci,omitempty" url:"wait_for_ci,omitempty,key"` // If true, review apps are created only when CI passes } // Enable review apps for a pipeline func (s *Service) ReviewAppConfigEnable(ctx context.Context, pipelineID string, o ReviewAppConfigEnableOpts) (*ReviewAppConfig, error) { var reviewAppConfig ReviewAppConfig return &reviewAppConfig, s.Post(ctx, &reviewAppConfig, fmt.Sprintf("/pipelines/%v/review-app-config", pipelineID), o) } // Get review apps configuration for a pipeline func (s *Service) ReviewAppConfigInfo(ctx context.Context, pipelineID string) (*ReviewAppConfig, error) { var reviewAppConfig ReviewAppConfig return &reviewAppConfig, s.Get(ctx, &reviewAppConfig, fmt.Sprintf("/pipelines/%v/review-app-config", pipelineID), nil, nil) } type ReviewAppConfigUpdateOpts struct { AutomaticReviewApps *bool `json:"automatic_review_apps,omitempty" url:"automatic_review_apps,omitempty,key"` // enable automatic review apps for pull requests BaseName *string `json:"base_name,omitempty" url:"base_name,omitempty,key"` // A unique prefix that will be used to create review app names DeployTarget *struct { ID string `json:"id" url:"id,key"` // unique identifier of deploy target Type string `json:"type" url:"type,key"` // type of deploy target } `json:"deploy_target,omitempty" url:"deploy_target,omitempty,key"` // the deploy target for the review apps of a pipeline DestroyStaleApps *bool `json:"destroy_stale_apps,omitempty" url:"destroy_stale_apps,omitempty,key"` // automatically destroy review apps when they haven't been deployed for // a number of days StaleDays *int `json:"stale_days,omitempty" url:"stale_days,omitempty,key"` // number of days without a deployment after which to consider a review // app stale WaitForCi *bool `json:"wait_for_ci,omitempty" url:"wait_for_ci,omitempty,key"` // If true, review apps are created only when CI passes } // Update review app configuration for a pipeline func (s *Service) ReviewAppConfigUpdate(ctx context.Context, pipelineID string, o ReviewAppConfigUpdateOpts) (*ReviewAppConfig, error) { var reviewAppConfig ReviewAppConfig return &reviewAppConfig, s.Patch(ctx, &reviewAppConfig, fmt.Sprintf("/pipelines/%v/review-app-config", pipelineID), o) } // Disable review apps for a pipeline func (s *Service) ReviewAppConfigDelete(ctx context.Context, pipelineID string) (*ReviewAppConfig, error) { var reviewAppConfig ReviewAppConfig return &reviewAppConfig, s.Delete(ctx, &reviewAppConfig, fmt.Sprintf("/pipelines/%v/review-app-config", pipelineID)) } // A slug is a snapshot of your application code that is ready to run on // the platform. type Slug struct { Blob struct { Method string `json:"method" url:"method,key"` // method to be used to interact with the slug blob URL string `json:"url" url:"url,key"` // URL to interact with the slug blob } `json:"blob" url:"blob,key"` // pointer to the url where clients can fetch or store the actual // release binary BuildpackProvidedDescription *string `json:"buildpack_provided_description" url:"buildpack_provided_description,key"` // description from buildpack of slug Checksum *string `json:"checksum" url:"checksum,key"` // an optional checksum of the slug for verifying its integrity Commit *string `json:"commit" url:"commit,key"` // identification of the code with your version control system (eg: SHA // of the git HEAD) CommitDescription *string `json:"commit_description" url:"commit_description,key"` // an optional description of the provided commit CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when slug was created ID string `json:"id" url:"id,key"` // unique identifier of slug ProcessTypes map[string]string `json:"process_types" url:"process_types,key"` // hash mapping process type names to their respective command Size *int `json:"size" url:"size,key"` // size of slug, in bytes Stack struct { ID string `json:"id" url:"id,key"` // unique identifier of stack Name string `json:"name" url:"name,key"` // unique name of stack } `json:"stack" url:"stack,key"` // identity of slug stack UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when slug was updated } // Info for existing slug. func (s *Service) SlugInfo(ctx context.Context, appIdentity string, slugIdentity string) (*Slug, error) { var slug Slug return &slug, s.Get(ctx, &slug, fmt.Sprintf("/apps/%v/slugs/%v", appIdentity, slugIdentity), nil, nil) } type SlugCreateOpts struct { BuildpackProvidedDescription *string `json:"buildpack_provided_description,omitempty" url:"buildpack_provided_description,omitempty,key"` // description from buildpack of slug Checksum *string `json:"checksum,omitempty" url:"checksum,omitempty,key"` // an optional checksum of the slug for verifying its integrity Commit *string `json:"commit,omitempty" url:"commit,omitempty,key"` // identification of the code with your version control system (eg: SHA // of the git HEAD) CommitDescription *string `json:"commit_description,omitempty" url:"commit_description,omitempty,key"` // an optional description of the provided commit ProcessTypes map[string]string `json:"process_types" url:"process_types,key"` // hash mapping process type names to their respective command Stack *string `json:"stack,omitempty" url:"stack,omitempty,key"` // unique name of stack } // Create a new slug. For more information please refer to [Deploying // Slugs using the Platform // API](https://devcenter.heroku.com/articles/platform-api-deploying-slug // s). func (s *Service) SlugCreate(ctx context.Context, appIdentity string, o SlugCreateOpts) (*Slug, error) { var slug Slug return &slug, s.Post(ctx, &slug, fmt.Sprintf("/apps/%v/slugs", appIdentity), o) } // SMS numbers are used for recovery on accounts with two-factor // authentication enabled. type SmsNumber struct { SmsNumber *string `json:"sms_number" url:"sms_number,key"` // SMS number of account } // Recover an account using an SMS recovery code func (s *Service) SmsNumberSMSNumber(ctx context.Context, accountIdentity string) (*SmsNumber, error) { var smsNumber SmsNumber return &smsNumber, s.Get(ctx, &smsNumber, fmt.Sprintf("/users/%v/sms-number", accountIdentity), nil, nil) } // Recover an account using an SMS recovery code func (s *Service) SmsNumberRecover(ctx context.Context, accountIdentity string) (*SmsNumber, error) { var smsNumber SmsNumber return &smsNumber, s.Post(ctx, &smsNumber, fmt.Sprintf("/users/%v/sms-number/actions/recover", accountIdentity), nil) } // Confirm an SMS number change with a confirmation code func (s *Service) SmsNumberConfirm(ctx context.Context, accountIdentity string) (*SmsNumber, error) { var smsNumber SmsNumber return &smsNumber, s.Post(ctx, &smsNumber, fmt.Sprintf("/users/%v/sms-number/actions/confirm", accountIdentity), nil) } // SNI Endpoint is a public address serving a custom SSL cert for HTTPS // traffic, using the SNI TLS extension, to a Heroku app. type SniEndpoint struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // application that this SSL certificate is on CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file) CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when endpoint was created DisplayName *string `json:"display_name" url:"display_name,key"` // unique name for SSL certificate Domains []string `json:"domains" url:"domains,key"` // domains associated with this SSL certificate ID string `json:"id" url:"id,key"` // unique identifier of this SNI endpoint Name string `json:"name" url:"name,key"` // unique name for SNI endpoint SSLCert struct { IsCaSigned bool `json:"ca_signed?" url:"ca_signed?,key"` CertDomains []interface{} `json:"cert_domains" url:"cert_domains,key"` ExpiresAt time.Time `json:"expires_at" url:"expires_at,key"` ID string `json:"id" url:"id,key"` // unique identifier of this SSL certificate Issuer string `json:"issuer" url:"issuer,key"` IsSelfSigned bool `json:"self_signed?" url:"self_signed?,key"` StartsAt time.Time `json:"starts_at" url:"starts_at,key"` Subject string `json:"subject" url:"subject,key"` } `json:"ssl_cert" url:"ssl_cert,key"` // certificate provided by this endpoint UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when SNI endpoint was updated } type SniEndpointCreateOpts struct { CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file) PrivateKey string `json:"private_key" url:"private_key,key"` // contents of the private key (eg .key file) } // Create a new SNI endpoint. func (s *Service) SniEndpointCreate(ctx context.Context, appIdentity string, o SniEndpointCreateOpts) (*SniEndpoint, error) { var sniEndpoint SniEndpoint return &sniEndpoint, s.Post(ctx, &sniEndpoint, fmt.Sprintf("/apps/%v/sni-endpoints", appIdentity), o) } // Delete existing SNI endpoint. func (s *Service) SniEndpointDelete(ctx context.Context, appIdentity string, sniEndpointIdentity string) (*SniEndpoint, error) { var sniEndpoint SniEndpoint return &sniEndpoint, s.Delete(ctx, &sniEndpoint, fmt.Sprintf("/apps/%v/sni-endpoints/%v", appIdentity, sniEndpointIdentity)) } // Info for existing SNI endpoint. func (s *Service) SniEndpointInfo(ctx context.Context, appIdentity string, sniEndpointIdentity string) (*SniEndpoint, error) { var sniEndpoint SniEndpoint return &sniEndpoint, s.Get(ctx, &sniEndpoint, fmt.Sprintf("/apps/%v/sni-endpoints/%v", appIdentity, sniEndpointIdentity), nil, nil) } type SniEndpointListResult []SniEndpoint // List existing SNI endpoints. func (s *Service) SniEndpointList(ctx context.Context, appIdentity string, lr *ListRange) (SniEndpointListResult, error) { var sniEndpoint SniEndpointListResult return sniEndpoint, s.Get(ctx, &sniEndpoint, fmt.Sprintf("/apps/%v/sni-endpoints", appIdentity), nil, lr) } type SniEndpointUpdateOpts struct { CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file) PrivateKey string `json:"private_key" url:"private_key,key"` // contents of the private key (eg .key file) } // Update an existing SNI endpoint. func (s *Service) SniEndpointUpdate(ctx context.Context, appIdentity string, sniEndpointIdentity string, o SniEndpointUpdateOpts) (*SniEndpoint, error) { var sniEndpoint SniEndpoint return &sniEndpoint, s.Patch(ctx, &sniEndpoint, fmt.Sprintf("/apps/%v/sni-endpoints/%v", appIdentity, sniEndpointIdentity), o) } // A source is a location for uploading and downloading an application's // source code. type Source struct { SourceBlob struct { GetURL string `json:"get_url" url:"get_url,key"` // URL to download the source PutURL string `json:"put_url" url:"put_url,key"` // URL to upload the source } `json:"source_blob" url:"source_blob,key"` // pointer to the URL where clients can fetch or store the source } // Create URLs for uploading and downloading source. func (s *Service) SourceCreate(ctx context.Context) (*Source, error) { var source Source return &source, s.Post(ctx, &source, fmt.Sprintf("/sources"), nil) } // Create URLs for uploading and downloading source. Deprecated in favor // of `POST /sources` func (s *Service) SourceCreateDeprecated(ctx context.Context, appIdentity string) (*Source, error) { var source Source return &source, s.Post(ctx, &source, fmt.Sprintf("/apps/%v/sources", appIdentity), nil) } // A space is an isolated, highly available, secure app execution // environment. type Space struct { CIDR string `json:"cidr" url:"cidr,key"` // The RFC-1918 CIDR the Private Space will use. It must be a /16 in // 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when space was created DataCIDR string `json:"data_cidr" url:"data_cidr,key"` // The RFC-1918 CIDR that the Private Space will use for the // Heroku-managed peering connection that's automatically created when // using Heroku Data add-ons. It must be between a /16 and a /20 ID string `json:"id" url:"id,key"` // unique identifier of space Name string `json:"name" url:"name,key"` // unique name of space Organization struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"organization" url:"organization,key"` // organization that owns this space Region struct { ID string `json:"id" url:"id,key"` // unique identifier of region Name string `json:"name" url:"name,key"` // unique name of region } `json:"region" url:"region,key"` // identity of space region Shield bool `json:"shield" url:"shield,key"` // true if this space has shield enabled State string `json:"state" url:"state,key"` // availability of this space Team struct { ID string `json:"id" url:"id,key"` // unique identifier of team Name string `json:"name" url:"name,key"` // unique name of team } `json:"team" url:"team,key"` // team that owns this space UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when space was updated } type SpaceListResult []Space // List existing spaces. func (s *Service) SpaceList(ctx context.Context, lr *ListRange) (SpaceListResult, error) { var space SpaceListResult return space, s.Get(ctx, &space, fmt.Sprintf("/spaces"), nil, lr) } // Info for existing space. func (s *Service) SpaceInfo(ctx context.Context, spaceIdentity string) (*Space, error) { var space Space return &space, s.Get(ctx, &space, fmt.Sprintf("/spaces/%v", spaceIdentity), nil, nil) } type SpaceUpdateOpts struct { Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of space } // Update an existing space. func (s *Service) SpaceUpdate(ctx context.Context, spaceIdentity string, o SpaceUpdateOpts) (*Space, error) { var space Space return &space, s.Patch(ctx, &space, fmt.Sprintf("/spaces/%v", spaceIdentity), o) } // Delete an existing space. func (s *Service) SpaceDelete(ctx context.Context, spaceIdentity string) (*Space, error) { var space Space return &space, s.Delete(ctx, &space, fmt.Sprintf("/spaces/%v", spaceIdentity)) } type SpaceCreateOpts struct { CIDR *string `json:"cidr,omitempty" url:"cidr,omitempty,key"` // The RFC-1918 CIDR the Private Space will use. It must be a /16 in // 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16 DataCIDR *string `json:"data_cidr,omitempty" url:"data_cidr,omitempty,key"` // The RFC-1918 CIDR that the Private Space will use for the // Heroku-managed peering connection that's automatically created when // using Heroku Data add-ons. It must be between a /16 and a /20 LogDrainURL *string `json:"log_drain_url,omitempty" url:"log_drain_url,omitempty,key"` // URL to which all apps will drain logs. Only settable during space // creation and enables direct logging. Must use HTTPS. Name string `json:"name" url:"name,key"` // unique name of space Region *string `json:"region,omitempty" url:"region,omitempty,key"` // unique identifier of region Shield *bool `json:"shield,omitempty" url:"shield,omitempty,key"` // true if this space has shield enabled Team string `json:"team" url:"team,key"` // unique name of team } // Create a new space. func (s *Service) SpaceCreate(ctx context.Context, o SpaceCreateOpts) (*Space, error) { var space Space return &space, s.Post(ctx, &space, fmt.Sprintf("/spaces"), o) } // Space access represents the permissions a particular user has on a // particular space. type SpaceAppAccess struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when space was created ID string `json:"id" url:"id,key"` // unique identifier of space Permissions []struct { Description string `json:"description" url:"description,key"` Name string `json:"name" url:"name,key"` } `json:"permissions" url:"permissions,key"` // user space permissions Space struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"space" url:"space,key"` // space user belongs to UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when space was updated User struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"user" url:"user,key"` // identity of user account } // List permissions for a given user on a given space. func (s *Service) SpaceAppAccessInfo(ctx context.Context, spaceIdentity string, accountIdentity string) (*SpaceAppAccess, error) { var spaceAppAccess SpaceAppAccess return &spaceAppAccess, s.Get(ctx, &spaceAppAccess, fmt.Sprintf("/spaces/%v/members/%v", spaceIdentity, accountIdentity), nil, nil) } type SpaceAppAccessUpdateOpts struct { Permissions []struct { Name *string `json:"name,omitempty" url:"name,omitempty,key"` } `json:"permissions" url:"permissions,key"` } // Update an existing user's set of permissions on a space. func (s *Service) SpaceAppAccessUpdate(ctx context.Context, spaceIdentity string, accountIdentity string, o SpaceAppAccessUpdateOpts) (*SpaceAppAccess, error) { var spaceAppAccess SpaceAppAccess return &spaceAppAccess, s.Patch(ctx, &spaceAppAccess, fmt.Sprintf("/spaces/%v/members/%v", spaceIdentity, accountIdentity), o) } type SpaceAppAccessListResult []SpaceAppAccess // List all users and their permissions on a space. func (s *Service) SpaceAppAccessList(ctx context.Context, spaceIdentity string, lr *ListRange) (SpaceAppAccessListResult, error) { var spaceAppAccess SpaceAppAccessListResult return spaceAppAccess, s.Get(ctx, &spaceAppAccess, fmt.Sprintf("/spaces/%v/members", spaceIdentity), nil, lr) } // Network address translation (NAT) for stable outbound IP addresses // from a space type SpaceNAT struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when network address translation for a space was created Sources []string `json:"sources" url:"sources,key"` // potential IPs from which outbound network traffic will originate State string `json:"state" url:"state,key"` // availability of network address translation for a space UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when network address translation for a space was updated } // Current state of network address translation for a space. func (s *Service) SpaceNATInfo(ctx context.Context, spaceIdentity string) (*SpaceNAT, error) { var spaceNAT SpaceNAT return &spaceNAT, s.Get(ctx, &spaceNAT, fmt.Sprintf("/spaces/%v/nat", spaceIdentity), nil, nil) } // Space Topology provides you with a mechanism for viewing all the // running dynos, formations and applications for a space. This is the // same data thats used to power our DNS Service Discovery. type SpaceTopology struct { Apps []struct { Domains []interface{} `json:"domains" url:"domains,key"` Formation []struct { Dynos []struct { Hostname string `json:"hostname" url:"hostname,key"` // localspace hostname of resource ID string `json:"id" url:"id,key"` // unique identifier of this dyno Number int `json:"number" url:"number,key"` // process number, e.g. 1 in web.1 PrivateIP string `json:"private_ip" url:"private_ip,key"` // RFC1918 Address of Dyno } `json:"dynos" url:"dynos,key"` // Current dynos for application ID string `json:"id" url:"id,key"` // unique identifier of this process type ProcessType string `json:"process_type" url:"process_type,key"` // Name of process type } `json:"formation" url:"formation,key"` // formations for application ID string `json:"id" url:"id,key"` // unique identifier of app } `json:"apps" url:"apps,key"` // The apps within this space Version int `json:"version" url:"version,key"` // version of the space topology payload } // Current space topology func (s *Service) SpaceTopologyTopology(ctx context.Context, spaceIdentity string) (*SpaceTopology, error) { var spaceTopology SpaceTopology return &spaceTopology, s.Get(ctx, &spaceTopology, fmt.Sprintf("/spaces/%v/topology", spaceIdentity), nil, nil) } // Transfer spaces between enterprise teams with the same Enterprise // Account. type SpaceTransfer struct{} type SpaceTransferTransferOpts struct { NewOwner string `json:"new_owner" url:"new_owner,key"` // unique name of team } type SpaceTransferTransferResult struct { CIDR string `json:"cidr" url:"cidr,key"` // The RFC-1918 CIDR the Private Space will use. It must be a /16 in // 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when space was created DataCIDR string `json:"data_cidr" url:"data_cidr,key"` // The RFC-1918 CIDR that the Private Space will use for the // Heroku-managed peering connection that's automatically created when // using Heroku Data add-ons. It must be between a /16 and a /20 ID string `json:"id" url:"id,key"` // unique identifier of space Name string `json:"name" url:"name,key"` // unique name of space Organization struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"organization" url:"organization,key"` // organization that owns this space Region struct { ID string `json:"id" url:"id,key"` // unique identifier of region Name string `json:"name" url:"name,key"` // unique name of region } `json:"region" url:"region,key"` // identity of space region Shield bool `json:"shield" url:"shield,key"` // true if this space has shield enabled State string `json:"state" url:"state,key"` // availability of this space Team struct { ID string `json:"id" url:"id,key"` // unique identifier of team Name string `json:"name" url:"name,key"` // unique name of team } `json:"team" url:"team,key"` // team that owns this space UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when space was updated } // Transfer space between enterprise teams func (s *Service) SpaceTransferTransfer(ctx context.Context, spaceIdentity string, o SpaceTransferTransferOpts) (*SpaceTransferTransferResult, error) { var spaceTransfer SpaceTransferTransferResult return &spaceTransfer, s.Post(ctx, &spaceTransfer, fmt.Sprintf("/spaces/%v/transfer", spaceIdentity), o) } // [SSL Endpoint](https://devcenter.heroku.com/articles/ssl-endpoint) is // a public address serving custom SSL cert for HTTPS traffic to a // Heroku app. Note that an app must have the `ssl:endpoint` add-on // installed before it can provision an SSL Endpoint using these APIs. type SSLEndpoint struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // application associated with this ssl-endpoint CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file) CName string `json:"cname" url:"cname,key"` // canonical name record, the address to point a domain at CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when endpoint was created DisplayName *string `json:"display_name" url:"display_name,key"` // unique name for SSL endpoint Domains []string `json:"domains" url:"domains,key"` // domains associated with this endpoint ID string `json:"id" url:"id,key"` // unique identifier of this SSL endpoint Name string `json:"name" url:"name,key"` // unique name for SSL endpoint SSLCert struct { IsCaSigned bool `json:"ca_signed?" url:"ca_signed?,key"` CertDomains []interface{} `json:"cert_domains" url:"cert_domains,key"` ExpiresAt time.Time `json:"expires_at" url:"expires_at,key"` ID string `json:"id" url:"id,key"` // unique identifier of this SSL certificate Issuer string `json:"issuer" url:"issuer,key"` IsSelfSigned bool `json:"self_signed?" url:"self_signed?,key"` StartsAt time.Time `json:"starts_at" url:"starts_at,key"` Subject string `json:"subject" url:"subject,key"` } `json:"ssl_cert" url:"ssl_cert,key"` // certificate provided by this endpoint UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when endpoint was updated } type SSLEndpointCreateOpts struct { CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file) Preprocess *bool `json:"preprocess,omitempty" url:"preprocess,omitempty,key"` // allow Heroku to modify an uploaded public certificate chain if deemed // advantageous by adding missing intermediaries, stripping unnecessary // ones, etc. PrivateKey string `json:"private_key" url:"private_key,key"` // contents of the private key (eg .key file) } // Create a new SSL endpoint. func (s *Service) SSLEndpointCreate(ctx context.Context, appIdentity string, o SSLEndpointCreateOpts) (*SSLEndpoint, error) { var sslEndpoint SSLEndpoint return &sslEndpoint, s.Post(ctx, &sslEndpoint, fmt.Sprintf("/apps/%v/ssl-endpoints", appIdentity), o) } // Delete existing SSL endpoint. func (s *Service) SSLEndpointDelete(ctx context.Context, appIdentity string, sslEndpointIdentity string) (*SSLEndpoint, error) { var sslEndpoint SSLEndpoint return &sslEndpoint, s.Delete(ctx, &sslEndpoint, fmt.Sprintf("/apps/%v/ssl-endpoints/%v", appIdentity, sslEndpointIdentity)) } // Info for existing SSL endpoint. func (s *Service) SSLEndpointInfo(ctx context.Context, appIdentity string, sslEndpointIdentity string) (*SSLEndpoint, error) { var sslEndpoint SSLEndpoint return &sslEndpoint, s.Get(ctx, &sslEndpoint, fmt.Sprintf("/apps/%v/ssl-endpoints/%v", appIdentity, sslEndpointIdentity), nil, nil) } type SSLEndpointListResult []SSLEndpoint // List existing SSL endpoints. func (s *Service) SSLEndpointList(ctx context.Context, appIdentity string, lr *ListRange) (SSLEndpointListResult, error) { var sslEndpoint SSLEndpointListResult return sslEndpoint, s.Get(ctx, &sslEndpoint, fmt.Sprintf("/apps/%v/ssl-endpoints", appIdentity), nil, lr) } type SSLEndpointUpdateOpts struct { CertificateChain *string `json:"certificate_chain,omitempty" url:"certificate_chain,omitempty,key"` // raw contents of the public certificate chain (eg: .crt or .pem file) Preprocess *bool `json:"preprocess,omitempty" url:"preprocess,omitempty,key"` // allow Heroku to modify an uploaded public certificate chain if deemed // advantageous by adding missing intermediaries, stripping unnecessary // ones, etc. PrivateKey *string `json:"private_key,omitempty" url:"private_key,omitempty,key"` // contents of the private key (eg .key file) } // Update an existing SSL endpoint. func (s *Service) SSLEndpointUpdate(ctx context.Context, appIdentity string, sslEndpointIdentity string, o SSLEndpointUpdateOpts) (*SSLEndpoint, error) { var sslEndpoint SSLEndpoint return &sslEndpoint, s.Patch(ctx, &sslEndpoint, fmt.Sprintf("/apps/%v/ssl-endpoints/%v", appIdentity, sslEndpointIdentity), o) } // Stacks are the different application execution environments available // in the Heroku platform. type Stack struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when stack was introduced Default bool `json:"default" url:"default,key"` // indicates this stack is the default for new apps ID string `json:"id" url:"id,key"` // unique identifier of stack Name string `json:"name" url:"name,key"` // unique name of stack State string `json:"state" url:"state,key"` // availability of this stack: beta, deprecated or public UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when stack was last modified } // Stack info. func (s *Service) StackInfo(ctx context.Context, stackIdentity string) (*Stack, error) { var stack Stack return &stack, s.Get(ctx, &stack, fmt.Sprintf("/stacks/%v", stackIdentity), nil, nil) } type StackListResult []Stack // List available stacks. func (s *Service) StackList(ctx context.Context, lr *ListRange) (StackListResult, error) { var stack StackListResult return stack, s.Get(ctx, &stack, fmt.Sprintf("/stacks"), nil, lr) } // Teams allow you to manage access to a shared group of applications // and other resources. type Team struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the team was created CreditCardCollections bool `json:"credit_card_collections" url:"credit_card_collections,key"` // whether charges incurred by the team are paid by credit card. Default bool `json:"default" url:"default,key"` // whether to use this team when none is specified EnterpriseAccount *struct { ID string `json:"id" url:"id,key"` // unique identifier of the enterprise account Name string `json:"name" url:"name,key"` // unique name of the enterprise account } `json:"enterprise_account" url:"enterprise_account,key"` ID string `json:"id" url:"id,key"` // unique identifier of team IdentityProvider *struct { ID string `json:"id" url:"id,key"` // unique identifier of this identity provider Name string `json:"name" url:"name,key"` // user-friendly unique identifier for this identity provider Owner struct { ID string `json:"id" url:"id,key"` // unique identifier of the owner Name string `json:"name" url:"name,key"` // name of the owner Type string `json:"type" url:"type,key"` // type of the owner } `json:"owner" url:"owner,key"` // entity that owns this identity provider } `json:"identity_provider" url:"identity_provider,key"` // Identity Provider associated with the Team MembershipLimit *float64 `json:"membership_limit" url:"membership_limit,key"` // upper limit of members allowed in a team. Name string `json:"name" url:"name,key"` // unique name of team ProvisionedLicenses bool `json:"provisioned_licenses" url:"provisioned_licenses,key"` // whether the team is provisioned licenses by salesforce. Role *string `json:"role" url:"role,key"` // role in the team Type string `json:"type" url:"type,key"` // type of team. UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the team was updated } type TeamListResult []Team // List teams in which you are a member. func (s *Service) TeamList(ctx context.Context, lr *ListRange) (TeamListResult, error) { var team TeamListResult return team, s.Get(ctx, &team, fmt.Sprintf("/teams"), nil, lr) } // Info for a team. func (s *Service) TeamInfo(ctx context.Context, teamIdentity string) (*Team, error) { var team Team return &team, s.Get(ctx, &team, fmt.Sprintf("/teams/%v", teamIdentity), nil, nil) } type TeamUpdateOpts struct { Default *bool `json:"default,omitempty" url:"default,omitempty,key"` // whether to use this team when none is specified Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of team } // Update team properties. func (s *Service) TeamUpdate(ctx context.Context, teamIdentity string, o TeamUpdateOpts) (*Team, error) { var team Team return &team, s.Patch(ctx, &team, fmt.Sprintf("/teams/%v", teamIdentity), o) } type TeamCreateOpts struct { Address1 *string `json:"address_1,omitempty" url:"address_1,omitempty,key"` // street address line 1 Address2 *string `json:"address_2,omitempty" url:"address_2,omitempty,key"` // street address line 2 CardNumber *string `json:"card_number,omitempty" url:"card_number,omitempty,key"` // encrypted card number of payment method City *string `json:"city,omitempty" url:"city,omitempty,key"` // city Country *string `json:"country,omitempty" url:"country,omitempty,key"` // country Cvv *string `json:"cvv,omitempty" url:"cvv,omitempty,key"` // card verification value DeviceData *string `json:"device_data,omitempty" url:"device_data,omitempty,key"` // Device data string generated by the client ExpirationMonth *string `json:"expiration_month,omitempty" url:"expiration_month,omitempty,key"` // expiration month ExpirationYear *string `json:"expiration_year,omitempty" url:"expiration_year,omitempty,key"` // expiration year FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty,key"` // the first name for payment method LastName *string `json:"last_name,omitempty" url:"last_name,omitempty,key"` // the last name for payment method Name string `json:"name" url:"name,key"` // unique name of team Nonce *string `json:"nonce,omitempty" url:"nonce,omitempty,key"` // Nonce generated by Braintree hosted fields form Other *string `json:"other,omitempty" url:"other,omitempty,key"` // metadata PostalCode *string `json:"postal_code,omitempty" url:"postal_code,omitempty,key"` // postal code State *string `json:"state,omitempty" url:"state,omitempty,key"` // state } // Create a new team. func (s *Service) TeamCreate(ctx context.Context, o TeamCreateOpts) (*Team, error) { var team Team return &team, s.Post(ctx, &team, fmt.Sprintf("/teams"), o) } // Delete an existing team. func (s *Service) TeamDelete(ctx context.Context, teamIdentity string) (*Team, error) { var team Team return &team, s.Delete(ctx, &team, fmt.Sprintf("/teams/%v", teamIdentity)) } type TeamListByEnterpriseAccountResult []Team // List teams for an enterprise account. func (s *Service) TeamListByEnterpriseAccount(ctx context.Context, enterpriseAccountIdentity string, lr *ListRange) (TeamListByEnterpriseAccountResult, error) { var team TeamListByEnterpriseAccountResult return team, s.Get(ctx, &team, fmt.Sprintf("/enterprise-accounts/%v/teams", enterpriseAccountIdentity), nil, lr) } type TeamCreateInEnterpriseAccountOpts struct { Name string `json:"name" url:"name,key"` // unique name of team } // Create a team in an enterprise account. func (s *Service) TeamCreateInEnterpriseAccount(ctx context.Context, enterpriseAccountIdentity string, o TeamCreateInEnterpriseAccountOpts) (*Team, error) { var team Team return &team, s.Post(ctx, &team, fmt.Sprintf("/enterprise-accounts/%v/teams", enterpriseAccountIdentity), o) } type TeamAddOn struct{} type TeamAddOnListForTeamResult []struct { Actions []struct{} `json:"actions" url:"actions,key"` // provider actions for this specific add-on AddonService struct { ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service Name string `json:"name" url:"name,key"` // unique name of this add-on-service } `json:"addon_service" url:"addon_service,key"` // identity of add-on service App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // billing application associated with this add-on BilledPrice *struct { Cents int `json:"cents" url:"cents,key"` // price in cents per unit of plan Contract bool `json:"contract" url:"contract,key"` // price is negotiated in a contract outside of monthly add-on billing Unit string `json:"unit" url:"unit,key"` // unit of price for plan } `json:"billed_price" url:"billed_price,key"` // billed price BillingEntity struct { ID string `json:"id" url:"id,key"` // unique identifier of the billing entity Name string `json:"name" url:"name,key"` // name of the billing entity Type string `json:"type" url:"type,key"` // type of Object of the billing entity; new types allowed at any time. } `json:"billing_entity" url:"billing_entity,key"` // billing entity associated with this add-on ConfigVars []string `json:"config_vars" url:"config_vars,key"` // config vars exposed to the owning app by this add-on CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on was created ID string `json:"id" url:"id,key"` // unique identifier of add-on Name string `json:"name" url:"name,key"` // globally unique name of the add-on Plan struct { ID string `json:"id" url:"id,key"` // unique identifier of this plan Name string `json:"name" url:"name,key"` // unique name of this plan } `json:"plan" url:"plan,key"` // identity of add-on plan ProviderID string `json:"provider_id" url:"provider_id,key"` // id of this add-on with its provider State string `json:"state" url:"state,key"` // state in the add-on's lifecycle UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on was updated WebURL *string `json:"web_url" url:"web_url,key"` // URL for logging into web interface of add-on (e.g. a dashboard) } // List add-ons used across all Team apps func (s *Service) TeamAddOnListForTeam(ctx context.Context, teamIdentity string, lr *ListRange) (TeamAddOnListForTeamResult, error) { var teamAddOn TeamAddOnListForTeamResult return teamAddOn, s.Get(ctx, &teamAddOn, fmt.Sprintf("/teams/%v/addons", teamIdentity), nil, lr) } // A team app encapsulates the team specific functionality of Heroku // apps. type TeamApp struct { ArchivedAt *time.Time `json:"archived_at" url:"archived_at,key"` // when app was archived BuildStack struct { ID string `json:"id" url:"id,key"` // unique identifier of stack Name string `json:"name" url:"name,key"` // unique name of stack } `json:"build_stack" url:"build_stack,key"` // identity of the stack that will be used for new builds BuildpackProvidedDescription *string `json:"buildpack_provided_description" url:"buildpack_provided_description,key"` // description from buildpack of app CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app was created GitURL string `json:"git_url" url:"git_url,key"` // git repo URL of app ID string `json:"id" url:"id,key"` // unique identifier of app InternalRouting *bool `json:"internal_routing" url:"internal_routing,key"` // describes whether a Private Spaces app is externally routable or not Joined bool `json:"joined" url:"joined,key"` // is the current member a collaborator on this app. Locked bool `json:"locked" url:"locked,key"` // are other team members forbidden from joining this app. Maintenance bool `json:"maintenance" url:"maintenance,key"` // maintenance status of app Name string `json:"name" url:"name,key"` // unique name of app Owner *struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"owner" url:"owner,key"` // identity of app owner Region struct { ID string `json:"id" url:"id,key"` // unique identifier of region Name string `json:"name" url:"name,key"` // unique name of region } `json:"region" url:"region,key"` // identity of app region ReleasedAt *time.Time `json:"released_at" url:"released_at,key"` // when app was released RepoSize *int `json:"repo_size" url:"repo_size,key"` // git repo size in bytes of app SlugSize *int `json:"slug_size" url:"slug_size,key"` // slug size in bytes of app Space *struct { ID string `json:"id" url:"id,key"` // unique identifier of space Name string `json:"name" url:"name,key"` // unique name of space } `json:"space" url:"space,key"` // identity of space Stack struct { ID string `json:"id" url:"id,key"` // unique identifier of stack Name string `json:"name" url:"name,key"` // unique name of stack } `json:"stack" url:"stack,key"` // identity of app stack Team *struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"team" url:"team,key"` // team that owns this app UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app was updated WebURL string `json:"web_url" url:"web_url,key"` // web URL of app } type TeamAppCreateOpts struct { InternalRouting *bool `json:"internal_routing,omitempty" url:"internal_routing,omitempty,key"` // describes whether a Private Spaces app is externally routable or not Locked *bool `json:"locked,omitempty" url:"locked,omitempty,key"` // are other team members forbidden from joining this app. Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of app Personal *bool `json:"personal,omitempty" url:"personal,omitempty,key"` // force creation of the app in the user account even if a default team // is set. Region *string `json:"region,omitempty" url:"region,omitempty,key"` // unique name of region Space *string `json:"space,omitempty" url:"space,omitempty,key"` // unique name of space Stack *string `json:"stack,omitempty" url:"stack,omitempty,key"` // unique name of stack Team *string `json:"team,omitempty" url:"team,omitempty,key"` // unique name of team } // Create a new app in the specified team, in the default team if // unspecified, or in personal account, if default team is not set. func (s *Service) TeamAppCreate(ctx context.Context, o TeamAppCreateOpts) (*TeamApp, error) { var teamApp TeamApp return &teamApp, s.Post(ctx, &teamApp, fmt.Sprintf("/teams/apps"), o) } // Info for a team app. func (s *Service) TeamAppInfo(ctx context.Context, teamAppIdentity string) (*TeamApp, error) { var teamApp TeamApp return &teamApp, s.Get(ctx, &teamApp, fmt.Sprintf("/teams/apps/%v", teamAppIdentity), nil, nil) } type TeamAppUpdateLockedOpts struct { Locked bool `json:"locked" url:"locked,key"` // are other team members forbidden from joining this app. } // Lock or unlock a team app. func (s *Service) TeamAppUpdateLocked(ctx context.Context, teamAppIdentity string, o TeamAppUpdateLockedOpts) (*TeamApp, error) { var teamApp TeamApp return &teamApp, s.Patch(ctx, &teamApp, fmt.Sprintf("/teams/apps/%v", teamAppIdentity), o) } type TeamAppTransferToAccountOpts struct { Owner string `json:"owner" url:"owner,key"` // unique email address of account } // Transfer an existing team app to another Heroku account. func (s *Service) TeamAppTransferToAccount(ctx context.Context, teamAppIdentity string, o TeamAppTransferToAccountOpts) (*TeamApp, error) { var teamApp TeamApp return &teamApp, s.Patch(ctx, &teamApp, fmt.Sprintf("/teams/apps/%v", teamAppIdentity), o) } type TeamAppTransferToTeamOpts struct { Owner string `json:"owner" url:"owner,key"` // unique name of team } // Transfer an existing team app to another team. func (s *Service) TeamAppTransferToTeam(ctx context.Context, teamAppIdentity string, o TeamAppTransferToTeamOpts) (*TeamApp, error) { var teamApp TeamApp return &teamApp, s.Patch(ctx, &teamApp, fmt.Sprintf("/teams/apps/%v", teamAppIdentity), o) } type TeamAppListByTeamResult []TeamApp // List team apps. func (s *Service) TeamAppListByTeam(ctx context.Context, teamIdentity string, lr *ListRange) (TeamAppListByTeamResult, error) { var teamApp TeamAppListByTeamResult return teamApp, s.Get(ctx, &teamApp, fmt.Sprintf("/teams/%v/apps", teamIdentity), nil, lr) } // A team collaborator represents an account that has been given access // to a team app on Heroku. type TeamAppCollaborator struct { App struct { ID string `json:"id" url:"id,key"` // unique identifier of app Name string `json:"name" url:"name,key"` // unique name of app } `json:"app" url:"app,key"` // app collaborator belongs to CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when collaborator was created ID string `json:"id" url:"id,key"` // unique identifier of collaborator Permissions []struct { Description string `json:"description" url:"description,key"` // A description of what the app permission allows. Name string `json:"name" url:"name,key"` // The name of the app permission. } `json:"permissions" url:"permissions,key"` // array of permissions for the collaborator (only applicable if the app // is on a team) Role *string `json:"role" url:"role,key"` // role in the team UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when collaborator was updated User struct { Email string `json:"email" url:"email,key"` // unique email address of account Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"user" url:"user,key"` // identity of collaborated account } type TeamAppCollaboratorCreateOpts struct { Permissions []*string `json:"permissions,omitempty" url:"permissions,omitempty,key"` // An array of permissions to give to the collaborator. Silent *bool `json:"silent,omitempty" url:"silent,omitempty,key"` // whether to suppress email invitation when creating collaborator User string `json:"user" url:"user,key"` // unique email address of account } // Create a new collaborator on a team app. Use this endpoint instead of // the `/apps/{app_id_or_name}/collaborator` endpoint when you want the // collaborator to be granted [permissions] // (https://devcenter.heroku.com/articles/org-users-access#roles-and-perm // issions) according to their role in the team. func (s *Service) TeamAppCollaboratorCreate(ctx context.Context, appIdentity string, o TeamAppCollaboratorCreateOpts) (*TeamAppCollaborator, error) { var teamAppCollaborator TeamAppCollaborator return &teamAppCollaborator, s.Post(ctx, &teamAppCollaborator, fmt.Sprintf("/teams/apps/%v/collaborators", appIdentity), o) } // Delete an existing collaborator from a team app. func (s *Service) TeamAppCollaboratorDelete(ctx context.Context, teamAppIdentity string, teamAppCollaboratorIdentity string) (*TeamAppCollaborator, error) { var teamAppCollaborator TeamAppCollaborator return &teamAppCollaborator, s.Delete(ctx, &teamAppCollaborator, fmt.Sprintf("/teams/apps/%v/collaborators/%v", teamAppIdentity, teamAppCollaboratorIdentity)) } // Info for a collaborator on a team app. func (s *Service) TeamAppCollaboratorInfo(ctx context.Context, teamAppIdentity string, teamAppCollaboratorIdentity string) (*TeamAppCollaborator, error) { var teamAppCollaborator TeamAppCollaborator return &teamAppCollaborator, s.Get(ctx, &teamAppCollaborator, fmt.Sprintf("/teams/apps/%v/collaborators/%v", teamAppIdentity, teamAppCollaboratorIdentity), nil, nil) } type TeamAppCollaboratorUpdateOpts struct { Permissions []string `json:"permissions" url:"permissions,key"` // An array of permissions to give to the collaborator. } // Update an existing collaborator from a team app. func (s *Service) TeamAppCollaboratorUpdate(ctx context.Context, teamAppIdentity string, teamAppCollaboratorIdentity string, o TeamAppCollaboratorUpdateOpts) (*TeamAppCollaborator, error) { var teamAppCollaborator TeamAppCollaborator return &teamAppCollaborator, s.Patch(ctx, &teamAppCollaborator, fmt.Sprintf("/teams/apps/%v/collaborators/%v", teamAppIdentity, teamAppCollaboratorIdentity), o) } type TeamAppCollaboratorListResult []TeamAppCollaborator // List collaborators on a team app. func (s *Service) TeamAppCollaboratorList(ctx context.Context, teamAppIdentity string, lr *ListRange) (TeamAppCollaboratorListResult, error) { var teamAppCollaborator TeamAppCollaboratorListResult return teamAppCollaborator, s.Get(ctx, &teamAppCollaborator, fmt.Sprintf("/teams/apps/%v/collaborators", teamAppIdentity), nil, lr) } // A team app permission is a behavior that is assigned to a user in a // team app. type TeamAppPermission struct { Description string `json:"description" url:"description,key"` // A description of what the app permission allows. Name string `json:"name" url:"name,key"` // The name of the app permission. } type TeamAppPermissionListResult []TeamAppPermission // Lists permissions available to teams. func (s *Service) TeamAppPermissionList(ctx context.Context, lr *ListRange) (TeamAppPermissionListResult, error) { var teamAppPermission TeamAppPermissionListResult return teamAppPermission, s.Get(ctx, &teamAppPermission, fmt.Sprintf("/teams/permissions"), nil, lr) } // Usage for an enterprise team at a daily resolution. type TeamDailyUsage struct { Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used Apps []struct { Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used AppName string `json:"app_name" url:"app_name,key"` // unique name of app Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons } `json:"apps" url:"apps,key"` // app usage in the team Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons Date string `json:"date" url:"date,key"` // date of the usage Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used ID string `json:"id" url:"id,key"` // team identifier Name string `json:"name" url:"name,key"` // name of the team Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons Space float64 `json:"space" url:"space,key"` // space credits used } type TeamDailyUsageInfoOpts struct { End *string `json:"end,omitempty" url:"end,omitempty,key"` // range end date Start string `json:"start" url:"start,key"` // range start date } type TeamDailyUsageInfoResult []TeamDailyUsage // Retrieves usage for an enterprise team for a range of days. Start and // end dates can be specified as query parameters using the date format // YYYY-MM-DD. // The team identifier can be found from the [team list // endpoint](https://devcenter.heroku.com/articles/platform-api-reference // #team-list). // func (s *Service) TeamDailyUsageInfo(ctx context.Context, teamID string, o TeamDailyUsageInfoOpts, lr *ListRange) (TeamDailyUsageInfoResult, error) { var teamDailyUsage TeamDailyUsageInfoResult return teamDailyUsage, s.Get(ctx, &teamDailyUsage, fmt.Sprintf("/teams/%v/usage/daily", teamID), o, lr) } // A team feature represents a feature enabled on a team account. type TeamFeature struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when team feature was created Description string `json:"description" url:"description,key"` // description of team feature DisplayName string `json:"display_name" url:"display_name,key"` // user readable feature name DocURL string `json:"doc_url" url:"doc_url,key"` // documentation URL of team feature Enabled bool `json:"enabled" url:"enabled,key"` // whether or not team feature has been enabled FeedbackEmail string `json:"feedback_email" url:"feedback_email,key"` // e-mail to send feedback about the feature ID string `json:"id" url:"id,key"` // unique identifier of team feature Name string `json:"name" url:"name,key"` // unique name of team feature State string `json:"state" url:"state,key"` // state of team feature UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when team feature was updated } // Info for an existing team feature. func (s *Service) TeamFeatureInfo(ctx context.Context, teamIdentity string, teamFeatureIdentity string) (*TeamFeature, error) { var teamFeature TeamFeature return &teamFeature, s.Get(ctx, &teamFeature, fmt.Sprintf("/teams/%v/features/%v", teamIdentity, teamFeatureIdentity), nil, nil) } type TeamFeatureListResult []TeamFeature // List existing team features. func (s *Service) TeamFeatureList(ctx context.Context, teamIdentity string, lr *ListRange) (TeamFeatureListResult, error) { var teamFeature TeamFeatureListResult return teamFeature, s.Get(ctx, &teamFeature, fmt.Sprintf("/teams/%v/features", teamIdentity), nil, lr) } // A team invitation represents an invite to a team. type TeamInvitation struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when invitation was created ID string `json:"id" url:"id,key"` // unique identifier of an invitation InvitedBy struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account Name *string `json:"name" url:"name,key"` // full name of the account owner } `json:"invited_by" url:"invited_by,key"` Role *string `json:"role" url:"role,key"` // role in the team Team struct { ID string `json:"id" url:"id,key"` // unique identifier of team Name string `json:"name" url:"name,key"` // unique name of team } `json:"team" url:"team,key"` UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when invitation was updated User struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account Name *string `json:"name" url:"name,key"` // full name of the account owner } `json:"user" url:"user,key"` } type TeamInvitationListResult []TeamInvitation // Get a list of a team's Identity Providers func (s *Service) TeamInvitationList(ctx context.Context, teamName string, lr *ListRange) (TeamInvitationListResult, error) { var teamInvitation TeamInvitationListResult return teamInvitation, s.Get(ctx, &teamInvitation, fmt.Sprintf("/teams/%v/invitations", teamName), nil, lr) } type TeamInvitationCreateOpts struct { Email string `json:"email" url:"email,key"` // unique email address of account Role *string `json:"role" url:"role,key"` // role in the team } // Create Team Invitation func (s *Service) TeamInvitationCreate(ctx context.Context, teamIdentity string, o TeamInvitationCreateOpts) (*TeamInvitation, error) { var teamInvitation TeamInvitation return &teamInvitation, s.Put(ctx, &teamInvitation, fmt.Sprintf("/teams/%v/invitations", teamIdentity), o) } // Revoke a team invitation. func (s *Service) TeamInvitationRevoke(ctx context.Context, teamIdentity string, teamInvitationIdentity string) (*TeamInvitation, error) { var teamInvitation TeamInvitation return &teamInvitation, s.Delete(ctx, &teamInvitation, fmt.Sprintf("/teams/%v/invitations/%v", teamIdentity, teamInvitationIdentity)) } // Get an invitation by its token func (s *Service) TeamInvitationGet(ctx context.Context, teamInvitationToken string, lr *ListRange) (*TeamInvitation, error) { var teamInvitation TeamInvitation return &teamInvitation, s.Get(ctx, &teamInvitation, fmt.Sprintf("/teams/invitations/%v", teamInvitationToken), nil, lr) } type TeamInvitationAcceptResult struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the membership record was created Email string `json:"email" url:"email,key"` // email address of the team member Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider ID string `json:"id" url:"id,key"` // unique identifier of the team member IdentityProvider *struct { ID string `json:"id" url:"id,key"` // unique identifier of this identity provider Name string `json:"name" url:"name,key"` // name of the identity provider Owner struct { ID string `json:"id" url:"id,key"` // unique identifier of the owner Name string `json:"name" url:"name,key"` // name of the owner Type string `json:"type" url:"type,key"` // type of the owner } `json:"owner" url:"owner,key"` // entity that owns this identity provider Redacted bool `json:"redacted" url:"redacted,key"` // whether the identity_provider information is redacted or not } `json:"identity_provider" url:"identity_provider,key"` // Identity Provider information the member is federated with Role *string `json:"role" url:"role,key"` // role in the team TwoFactorAuthentication bool `json:"two_factor_authentication" url:"two_factor_authentication,key"` // whether the Enterprise team member has two factor authentication // enabled UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the membership record was updated User struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account Name *string `json:"name" url:"name,key"` // full name of the account owner } `json:"user" url:"user,key"` // user information for the membership } // Accept Team Invitation func (s *Service) TeamInvitationAccept(ctx context.Context, teamInvitationToken string) (*TeamInvitationAcceptResult, error) { var teamInvitation TeamInvitationAcceptResult return &teamInvitation, s.Post(ctx, &teamInvitation, fmt.Sprintf("/teams/invitations/%v/accept", teamInvitationToken), nil) } // A Team Invoice is an itemized bill of goods for a team which includes // pricing and charges. type TeamInvoice struct { AddonsTotal int `json:"addons_total" url:"addons_total,key"` // total add-ons charges in on this invoice ChargesTotal int `json:"charges_total" url:"charges_total,key"` // total charges on this invoice CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when invoice was created CreditsTotal int `json:"credits_total" url:"credits_total,key"` // total credits on this invoice DatabaseTotal int `json:"database_total" url:"database_total,key"` // total database charges on this invoice DynoUnits float64 `json:"dyno_units" url:"dyno_units,key"` // total amount of dyno units consumed across dyno types. ID string `json:"id" url:"id,key"` // unique identifier of this invoice Number int `json:"number" url:"number,key"` // human readable invoice number PaymentStatus string `json:"payment_status" url:"payment_status,key"` // status of the invoice payment PeriodEnd string `json:"period_end" url:"period_end,key"` // the ending date that the invoice covers PeriodStart string `json:"period_start" url:"period_start,key"` // the starting date that this invoice covers PlatformTotal int `json:"platform_total" url:"platform_total,key"` // total platform charges on this invoice State int `json:"state" url:"state,key"` // payment status for this invoice (pending, successful, failed) Total int `json:"total" url:"total,key"` // combined total of charges and credits on this invoice UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when invoice was updated WeightedDynoHours float64 `json:"weighted_dyno_hours" url:"weighted_dyno_hours,key"` // The total amount of hours consumed across dyno types. } // Info for existing invoice. func (s *Service) TeamInvoiceInfo(ctx context.Context, teamIdentity string, teamInvoiceIdentity int) (*TeamInvoice, error) { var teamInvoice TeamInvoice return &teamInvoice, s.Get(ctx, &teamInvoice, fmt.Sprintf("/teams/%v/invoices/%v", teamIdentity, teamInvoiceIdentity), nil, nil) } type TeamInvoiceListResult []TeamInvoice // List existing invoices. func (s *Service) TeamInvoiceList(ctx context.Context, teamIdentity string, lr *ListRange) (TeamInvoiceListResult, error) { var teamInvoice TeamInvoiceListResult return teamInvoice, s.Get(ctx, &teamInvoice, fmt.Sprintf("/teams/%v/invoices", teamIdentity), nil, lr) } // A team member is an individual with access to a team. type TeamMember struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the membership record was created Email string `json:"email" url:"email,key"` // email address of the team member Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider ID string `json:"id" url:"id,key"` // unique identifier of the team member IdentityProvider *struct { ID string `json:"id" url:"id,key"` // unique identifier of this identity provider Name string `json:"name" url:"name,key"` // name of the identity provider Owner struct { ID string `json:"id" url:"id,key"` // unique identifier of the owner Name string `json:"name" url:"name,key"` // name of the owner Type string `json:"type" url:"type,key"` // type of the owner } `json:"owner" url:"owner,key"` // entity that owns this identity provider Redacted bool `json:"redacted" url:"redacted,key"` // whether the identity_provider information is redacted or not } `json:"identity_provider" url:"identity_provider,key"` // Identity Provider information the member is federated with Role *string `json:"role" url:"role,key"` // role in the team TwoFactorAuthentication bool `json:"two_factor_authentication" url:"two_factor_authentication,key"` // whether the Enterprise team member has two factor authentication // enabled UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the membership record was updated User struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account Name *string `json:"name" url:"name,key"` // full name of the account owner } `json:"user" url:"user,key"` // user information for the membership } type TeamMemberCreateOrUpdateOpts struct { Email string `json:"email" url:"email,key"` // email address of the team member Federated *bool `json:"federated,omitempty" url:"federated,omitempty,key"` // whether the user is federated and belongs to an Identity Provider Role string `json:"role" url:"role,key"` // role in the team } // Create a new team member, or update their role. func (s *Service) TeamMemberCreateOrUpdate(ctx context.Context, teamIdentity string, o TeamMemberCreateOrUpdateOpts) (*TeamMember, error) { var teamMember TeamMember return &teamMember, s.Put(ctx, &teamMember, fmt.Sprintf("/teams/%v/members", teamIdentity), o) } type TeamMemberCreateOpts struct { Email string `json:"email" url:"email,key"` // email address of the team member Federated *bool `json:"federated,omitempty" url:"federated,omitempty,key"` // whether the user is federated and belongs to an Identity Provider Role string `json:"role" url:"role,key"` // role in the team } // Create a new team member. func (s *Service) TeamMemberCreate(ctx context.Context, teamIdentity string, o TeamMemberCreateOpts) (*TeamMember, error) { var teamMember TeamMember return &teamMember, s.Post(ctx, &teamMember, fmt.Sprintf("/teams/%v/members", teamIdentity), o) } type TeamMemberUpdateOpts struct { Email string `json:"email" url:"email,key"` // email address of the team member Federated *bool `json:"federated,omitempty" url:"federated,omitempty,key"` // whether the user is federated and belongs to an Identity Provider Role string `json:"role" url:"role,key"` // role in the team } // Update a team member. func (s *Service) TeamMemberUpdate(ctx context.Context, teamIdentity string, o TeamMemberUpdateOpts) (*TeamMember, error) { var teamMember TeamMember return &teamMember, s.Patch(ctx, &teamMember, fmt.Sprintf("/teams/%v/members", teamIdentity), o) } // Remove a member from the team. func (s *Service) TeamMemberDelete(ctx context.Context, teamIdentity string, teamMemberIdentity string) (*TeamMember, error) { var teamMember TeamMember return &teamMember, s.Delete(ctx, &teamMember, fmt.Sprintf("/teams/%v/members/%v", teamIdentity, teamMemberIdentity)) } type TeamMemberListResult []TeamMember // List members of the team. func (s *Service) TeamMemberList(ctx context.Context, teamIdentity string, lr *ListRange) (TeamMemberListResult, error) { var teamMember TeamMemberListResult return teamMember, s.Get(ctx, &teamMember, fmt.Sprintf("/teams/%v/members", teamIdentity), nil, lr) } type TeamMemberListByMemberResult []struct { ArchivedAt *time.Time `json:"archived_at" url:"archived_at,key"` // when app was archived BuildStack struct { ID string `json:"id" url:"id,key"` // unique identifier of stack Name string `json:"name" url:"name,key"` // unique name of stack } `json:"build_stack" url:"build_stack,key"` // identity of the stack that will be used for new builds BuildpackProvidedDescription *string `json:"buildpack_provided_description" url:"buildpack_provided_description,key"` // description from buildpack of app CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app was created GitURL string `json:"git_url" url:"git_url,key"` // git repo URL of app ID string `json:"id" url:"id,key"` // unique identifier of app InternalRouting *bool `json:"internal_routing" url:"internal_routing,key"` // describes whether a Private Spaces app is externally routable or not Joined bool `json:"joined" url:"joined,key"` // is the current member a collaborator on this app. Locked bool `json:"locked" url:"locked,key"` // are other team members forbidden from joining this app. Maintenance bool `json:"maintenance" url:"maintenance,key"` // maintenance status of app Name string `json:"name" url:"name,key"` // unique name of app Owner *struct { Email string `json:"email" url:"email,key"` // unique email address of account ID string `json:"id" url:"id,key"` // unique identifier of an account } `json:"owner" url:"owner,key"` // identity of app owner Region struct { ID string `json:"id" url:"id,key"` // unique identifier of region Name string `json:"name" url:"name,key"` // unique name of region } `json:"region" url:"region,key"` // identity of app region ReleasedAt *time.Time `json:"released_at" url:"released_at,key"` // when app was released RepoSize *int `json:"repo_size" url:"repo_size,key"` // git repo size in bytes of app SlugSize *int `json:"slug_size" url:"slug_size,key"` // slug size in bytes of app Space *struct { ID string `json:"id" url:"id,key"` // unique identifier of space Name string `json:"name" url:"name,key"` // unique name of space } `json:"space" url:"space,key"` // identity of space Stack struct { ID string `json:"id" url:"id,key"` // unique identifier of stack Name string `json:"name" url:"name,key"` // unique name of stack } `json:"stack" url:"stack,key"` // identity of app stack Team *struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"team" url:"team,key"` // team that owns this app UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app was updated WebURL string `json:"web_url" url:"web_url,key"` // web URL of app } // List the apps of a team member. func (s *Service) TeamMemberListByMember(ctx context.Context, teamIdentity string, teamMemberIdentity string, lr *ListRange) (TeamMemberListByMemberResult, error) { var teamMember TeamMemberListByMemberResult return teamMember, s.Get(ctx, &teamMember, fmt.Sprintf("/teams/%v/members/%v/apps", teamIdentity, teamMemberIdentity), nil, lr) } // Usage for an enterprise team at a monthly resolution. type TeamMonthlyUsage struct { Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used Apps []struct { Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used AppName string `json:"app_name" url:"app_name,key"` // unique name of app Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons } `json:"apps" url:"apps,key"` // app usage in the team Connect float64 `json:"connect" url:"connect,key"` // average connect rows synced Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used ID string `json:"id" url:"id,key"` // team identifier Month string `json:"month" url:"month,key"` // year and month of the usage Name string `json:"name" url:"name,key"` // name of the team Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons Space float64 `json:"space" url:"space,key"` // space credits used } type TeamMonthlyUsageInfoOpts struct { End *string `json:"end,omitempty" url:"end,omitempty,key"` // range end date Start string `json:"start" url:"start,key"` // range start date } type TeamMonthlyUsageInfoResult []TeamMonthlyUsage // Retrieves usage for an enterprise team for a range of months. Start // and end dates can be specified as query parameters using the date, // YYYY-MM. If no end date is specified, one month of usage is returned. // The team identifier can be found from the [team list // endpoint](https://devcenter.heroku.com/articles/platform-api-reference // #team-list). // func (s *Service) TeamMonthlyUsageInfo(ctx context.Context, teamID string, o TeamMonthlyUsageInfoOpts, lr *ListRange) (TeamMonthlyUsageInfoResult, error) { var teamMonthlyUsage TeamMonthlyUsageInfoResult return teamMonthlyUsage, s.Get(ctx, &teamMonthlyUsage, fmt.Sprintf("/teams/%v/usage/monthly", teamID), o, lr) } // Tracks a Team's Preferences type TeamPreferences struct { AddonsControls *bool `json:"addons-controls" url:"addons-controls,key"` // Whether add-on service rules should be applied to add-on // installations DefaultPermission *string `json:"default-permission" url:"default-permission,key"` // The default permission used when adding new members to the team } // Retrieve Team Preferences func (s *Service) TeamPreferencesList(ctx context.Context, teamPreferencesIdentity string) (*TeamPreferences, error) { var teamPreferences TeamPreferences return &teamPreferences, s.Get(ctx, &teamPreferences, fmt.Sprintf("/teams/%v/preferences", teamPreferencesIdentity), nil, nil) } type TeamPreferencesUpdateOpts struct { AddonsControls *bool `json:"addons-controls,omitempty" url:"addons-controls,omitempty,key"` // Whether add-on service rules should be applied to add-on // installations } // Update Team Preferences func (s *Service) TeamPreferencesUpdate(ctx context.Context, teamPreferencesIdentity string, o TeamPreferencesUpdateOpts) (*TeamPreferences, error) { var teamPreferences TeamPreferences return &teamPreferences, s.Patch(ctx, &teamPreferences, fmt.Sprintf("/teams/%v/preferences", teamPreferencesIdentity), o) } // A space is an isolated, highly available, secure app execution // environment. type TeamSpace struct{} type TeamSpaceListResult []struct { CIDR string `json:"cidr" url:"cidr,key"` // The RFC-1918 CIDR the Private Space will use. It must be a /16 in // 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when space was created DataCIDR string `json:"data_cidr" url:"data_cidr,key"` // The RFC-1918 CIDR that the Private Space will use for the // Heroku-managed peering connection that's automatically created when // using Heroku Data add-ons. It must be between a /16 and a /20 ID string `json:"id" url:"id,key"` // unique identifier of space Name string `json:"name" url:"name,key"` // unique name of space Organization struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"organization" url:"organization,key"` // organization that owns this space Region struct { ID string `json:"id" url:"id,key"` // unique identifier of region Name string `json:"name" url:"name,key"` // unique name of region } `json:"region" url:"region,key"` // identity of space region Shield bool `json:"shield" url:"shield,key"` // true if this space has shield enabled State string `json:"state" url:"state,key"` // availability of this space Team struct { ID string `json:"id" url:"id,key"` // unique identifier of team Name string `json:"name" url:"name,key"` // unique name of team } `json:"team" url:"team,key"` // team that owns this space UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when space was updated } // List spaces owned by the team func (s *Service) TeamSpaceList(ctx context.Context, teamIdentity string, lr *ListRange) (TeamSpaceListResult, error) { var teamSpace TeamSpaceListResult return teamSpace, s.Get(ctx, &teamSpace, fmt.Sprintf("/teams/%v/spaces", teamIdentity), nil, lr) } // A single test case belonging to a test run type TestCase struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when test case was created Description string `json:"description" url:"description,key"` // description of the test case Diagnostic string `json:"diagnostic" url:"diagnostic,key"` // meta information about the test case Directive string `json:"directive" url:"directive,key"` // special note about the test case e.g. skipped, todo ID string `json:"id" url:"id,key"` // unique identifier of a test case Number int `json:"number" url:"number,key"` // the test number Passed bool `json:"passed" url:"passed,key"` // whether the test case was successful TestNode struct { ID string `json:"id" url:"id,key"` // unique identifier of a test node } `json:"test_node" url:"test_node,key"` // the test node which executed this test case TestRun struct { ID string `json:"id" url:"id,key"` // unique identifier of a test run } `json:"test_run" url:"test_run,key"` // the test run which owns this test case UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when test case was updated } type TestCaseListResult []TestCase // List test cases func (s *Service) TestCaseList(ctx context.Context, testRunID string, lr *ListRange) error { return s.Get(ctx, nil, fmt.Sprintf("/test-runs/%v/test-cases", testRunID), nil, lr) } // A single test node belonging to a test run type TestNode struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when test node was created Dyno *struct { AttachURL *string `json:"attach_url" url:"attach_url,key"` // a URL to stream output from for debug runs or null for non-debug runs ID string `json:"id" url:"id,key"` // unique identifier of this dyno } `json:"dyno" url:"dyno,key"` // the dyno which belongs to this test node ErrorStatus *string `json:"error_status" url:"error_status,key"` // the status of the test run when the error occured ExitCode *int `json:"exit_code" url:"exit_code,key"` // the exit code of the test script ID string `json:"id" url:"id,key"` // unique identifier of a test node Index int `json:"index" url:"index,key"` // The index of the test node Message *string `json:"message" url:"message,key"` // human friendly message indicating reason for an error OutputStreamURL string `json:"output_stream_url" url:"output_stream_url,key"` // the streaming output for the test node Pipeline struct { ID string `json:"id" url:"id,key"` // unique identifier of pipeline } `json:"pipeline" url:"pipeline,key"` // the pipeline which owns this test node SetupStreamURL string `json:"setup_stream_url" url:"setup_stream_url,key"` // the streaming test setup output for the test node Status string `json:"status" url:"status,key"` // current state of the test run TestRun struct { ID string `json:"id" url:"id,key"` // unique identifier of a test run } `json:"test_run" url:"test_run,key"` // the test run which owns this test node UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when test node was updated } type TestNodeListResult []TestNode // List test nodes func (s *Service) TestNodeList(ctx context.Context, testRunIdentity string, lr *ListRange) error { return s.Get(ctx, nil, fmt.Sprintf("/test-runs/%v/test-nodes", testRunIdentity), nil, lr) } // An execution or trial of one or more tests type TestRun struct { ActorEmail string `json:"actor_email" url:"actor_email,key"` // the email of the actor triggering the test run AppSetup *struct{} `json:"app_setup" url:"app_setup,key"` // the app setup for the test run ClearCache *bool `json:"clear_cache" url:"clear_cache,key"` // whether the test was run with an empty cache CommitBranch string `json:"commit_branch" url:"commit_branch,key"` // the branch of the repository that the test run concerns CommitMessage string `json:"commit_message" url:"commit_message,key"` // the message for the commit under test CommitSha string `json:"commit_sha" url:"commit_sha,key"` // the SHA hash of the commit under test CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when test run was created Debug bool `json:"debug" url:"debug,key"` // whether the test run was started for interactive debugging Dyno *struct { Size string `json:"size" url:"size,key"` // dyno size (default: "standard-1X") } `json:"dyno" url:"dyno,key"` // the type of dynos used for this test-run ID string `json:"id" url:"id,key"` // unique identifier of a test run Message *string `json:"message" url:"message,key"` // human friendly message indicating reason for an error Number int `json:"number" url:"number,key"` // the auto incrementing test run number Organization *struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"organization" url:"organization,key"` // the team that owns this test-run Pipeline struct { ID string `json:"id" url:"id,key"` // unique identifier of pipeline } `json:"pipeline" url:"pipeline,key"` // the pipeline which owns this test-run SourceBlobURL string `json:"source_blob_url" url:"source_blob_url,key"` // The download location for the source code to be tested Status string `json:"status" url:"status,key"` // current state of the test run UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when test-run was updated User struct { AllowTracking bool `json:"allow_tracking" url:"allow_tracking,key"` // whether to allow third party web activity tracking Beta bool `json:"beta" url:"beta,key"` // whether allowed to utilize beta Heroku features CountryOfResidence *string `json:"country_of_residence" url:"country_of_residence,key"` // country where account owner resides CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when account was created DefaultOrganization *struct { ID string `json:"id" url:"id,key"` // unique identifier of team Name string `json:"name" url:"name,key"` // unique name of team } `json:"default_organization" url:"default_organization,key"` // team selected by default DefaultTeam *struct { ID string `json:"id" url:"id,key"` // unique identifier of team Name string `json:"name" url:"name,key"` // unique name of team } `json:"default_team" url:"default_team,key"` // team selected by default DelinquentAt *time.Time `json:"delinquent_at" url:"delinquent_at,key"` // when account became delinquent Email string `json:"email" url:"email,key"` // unique email address of account Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider ID string `json:"id" url:"id,key"` // unique identifier of an account IdentityProvider *struct { ID string `json:"id" url:"id,key"` // unique identifier of this identity provider Name string `json:"name" url:"name,key"` // user-friendly unique identifier for this identity provider Organization struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"organization" url:"organization,key"` Owner struct { ID string `json:"id" url:"id,key"` // unique identifier of the owner Name string `json:"name" url:"name,key"` // name of the owner Type string `json:"type" url:"type,key"` // type of the owner } `json:"owner" url:"owner,key"` // entity that owns this identity provider Team struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"team" url:"team,key"` } `json:"identity_provider" url:"identity_provider,key"` // Identity Provider details for federated users. LastLogin *time.Time `json:"last_login" url:"last_login,key"` // when account last authorized with Heroku Name *string `json:"name" url:"name,key"` // full name of the account owner SmsNumber *string `json:"sms_number" url:"sms_number,key"` // SMS number of account SuspendedAt *time.Time `json:"suspended_at" url:"suspended_at,key"` // when account was suspended TwoFactorAuthentication bool `json:"two_factor_authentication" url:"two_factor_authentication,key"` // whether two-factor auth is enabled on the account UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when account was updated Verified bool `json:"verified" url:"verified,key"` // whether account has been verified with billing information } `json:"user" url:"user,key"` // An account represents an individual signed up to use the Heroku // platform. WarningMessage *string `json:"warning_message" url:"warning_message,key"` // human friently warning emitted during the test run } type TestRunCreateOpts struct { CommitBranch string `json:"commit_branch" url:"commit_branch,key"` // the branch of the repository that the test run concerns CommitMessage string `json:"commit_message" url:"commit_message,key"` // the message for the commit under test CommitSha string `json:"commit_sha" url:"commit_sha,key"` // the SHA hash of the commit under test Debug *bool `json:"debug,omitempty" url:"debug,omitempty,key"` // whether the test run was started for interactive debugging Organization *string `json:"organization,omitempty" url:"organization,omitempty,key"` // unique name of team Pipeline string `json:"pipeline" url:"pipeline,key"` // unique identifier of pipeline SourceBlobURL string `json:"source_blob_url" url:"source_blob_url,key"` // The download location for the source code to be tested } // Create a new test-run. func (s *Service) TestRunCreate(ctx context.Context, o TestRunCreateOpts) (*TestRun, error) { var testRun TestRun return &testRun, s.Post(ctx, &testRun, fmt.Sprintf("/test-runs"), o) } // Info for existing test-run. func (s *Service) TestRunInfo(ctx context.Context, testRunID string) (*TestRun, error) { var testRun TestRun return &testRun, s.Get(ctx, &testRun, fmt.Sprintf("/test-runs/%v", testRunID), nil, nil) } type TestRunListResult []TestRun // List existing test-runs for a pipeline. func (s *Service) TestRunList(ctx context.Context, pipelineID string, lr *ListRange) error { return s.Get(ctx, nil, fmt.Sprintf("/pipelines/%v/test-runs", pipelineID), nil, lr) } // Info for existing test-run by Pipeline func (s *Service) TestRunInfoByPipeline(ctx context.Context, pipelineID string, testRunNumber int) (*TestRun, error) { var testRun TestRun return &testRun, s.Get(ctx, &testRun, fmt.Sprintf("/pipelines/%v/test-runs/%v", pipelineID, testRunNumber), nil, nil) } type TestRunUpdateOpts struct { Message *string `json:"message" url:"message,key"` // human friendly message indicating reason for an error Status string `json:"status" url:"status,key"` // current state of the test run } // Update a test-run's status. func (s *Service) TestRunUpdate(ctx context.Context, testRunNumber int, o TestRunUpdateOpts) (*TestRun, error) { var testRun TestRun return &testRun, s.Patch(ctx, &testRun, fmt.Sprintf("/test-runs/%v", testRunNumber), o) } // Tracks a user's preferences and message dismissals type UserPreferences struct { DefaultOrganization *string `json:"default-organization" url:"default-organization,key"` // User's default team DismissedGettingStarted *bool `json:"dismissed-getting-started" url:"dismissed-getting-started,key"` // Whether the user has dismissed the getting started banner DismissedGithubBanner *bool `json:"dismissed-github-banner" url:"dismissed-github-banner,key"` // Whether the user has dismissed the GitHub link banner DismissedOrgAccessControls *bool `json:"dismissed-org-access-controls" url:"dismissed-org-access-controls,key"` // Whether the user has dismissed the Organization Access Controls // banner DismissedOrgWizardNotification *bool `json:"dismissed-org-wizard-notification" url:"dismissed-org-wizard-notification,key"` // Whether the user has dismissed the Organization Wizard DismissedPipelinesBanner *bool `json:"dismissed-pipelines-banner" url:"dismissed-pipelines-banner,key"` // Whether the user has dismissed the Pipelines banner DismissedPipelinesGithubBanner *bool `json:"dismissed-pipelines-github-banner" url:"dismissed-pipelines-github-banner,key"` // Whether the user has dismissed the GitHub banner on a pipeline // overview DismissedPipelinesGithubBanners []string `json:"dismissed-pipelines-github-banners" url:"dismissed-pipelines-github-banners,key"` // Which pipeline uuids the user has dismissed the GitHub banner for DismissedSmsBanner *bool `json:"dismissed-sms-banner" url:"dismissed-sms-banner,key"` // Whether the user has dismissed the 2FA SMS banner Timezone *string `json:"timezone" url:"timezone,key"` // User's default timezone } // Retrieve User Preferences func (s *Service) UserPreferencesList(ctx context.Context, userPreferencesIdentity string) (*UserPreferences, error) { var userPreferences UserPreferences return &userPreferences, s.Get(ctx, &userPreferences, fmt.Sprintf("/users/%v/preferences", userPreferencesIdentity), nil, nil) } type UserPreferencesUpdateOpts struct { DefaultOrganization *string `json:"default-organization,omitempty" url:"default-organization,omitempty,key"` // User's default team DismissedGettingStarted *bool `json:"dismissed-getting-started,omitempty" url:"dismissed-getting-started,omitempty,key"` // Whether the user has dismissed the getting started banner DismissedGithubBanner *bool `json:"dismissed-github-banner,omitempty" url:"dismissed-github-banner,omitempty,key"` // Whether the user has dismissed the GitHub link banner DismissedOrgAccessControls *bool `json:"dismissed-org-access-controls,omitempty" url:"dismissed-org-access-controls,omitempty,key"` // Whether the user has dismissed the Organization Access Controls // banner DismissedOrgWizardNotification *bool `json:"dismissed-org-wizard-notification,omitempty" url:"dismissed-org-wizard-notification,omitempty,key"` // Whether the user has dismissed the Organization Wizard DismissedPipelinesBanner *bool `json:"dismissed-pipelines-banner,omitempty" url:"dismissed-pipelines-banner,omitempty,key"` // Whether the user has dismissed the Pipelines banner DismissedPipelinesGithubBanner *bool `json:"dismissed-pipelines-github-banner,omitempty" url:"dismissed-pipelines-github-banner,omitempty,key"` // Whether the user has dismissed the GitHub banner on a pipeline // overview DismissedPipelinesGithubBanners []*string `json:"dismissed-pipelines-github-banners,omitempty" url:"dismissed-pipelines-github-banners,omitempty,key"` // Which pipeline uuids the user has dismissed the GitHub banner for DismissedSmsBanner *bool `json:"dismissed-sms-banner,omitempty" url:"dismissed-sms-banner,omitempty,key"` // Whether the user has dismissed the 2FA SMS banner Timezone *string `json:"timezone,omitempty" url:"timezone,omitempty,key"` // User's default timezone } // Update User Preferences func (s *Service) UserPreferencesUpdate(ctx context.Context, userPreferencesIdentity string, o UserPreferencesUpdateOpts) (*UserPreferences, error) { var userPreferences UserPreferences return &userPreferences, s.Patch(ctx, &userPreferences, fmt.Sprintf("/users/%v/preferences", userPreferencesIdentity), o) } // [VPN](https://devcenter.heroku.com/articles/private-space-vpn-connecti // on) provides a way to connect your Private Spaces to your network via // VPN. type VPNConnection struct { ID string `json:"id" url:"id,key"` // VPN ID IKEVersion int `json:"ike_version" url:"ike_version,key"` // IKE Version Name string `json:"name" url:"name,key"` // VPN Name PublicIP string `json:"public_ip" url:"public_ip,key"` // Public IP of VPN customer gateway RoutableCidrs []string `json:"routable_cidrs" url:"routable_cidrs,key"` // Routable CIDRs of VPN SpaceCIDRBlock string `json:"space_cidr_block" url:"space_cidr_block,key"` // CIDR Block of the Private Space Status string `json:"status" url:"status,key"` // Status of the VPN StatusMessage string `json:"status_message" url:"status_message,key"` // Details of the status Tunnels []struct { CustomerIP string `json:"customer_ip" url:"customer_ip,key"` // Public IP address for the customer side of the tunnel IP string `json:"ip" url:"ip,key"` // Public IP address for the tunnel LastStatusChange string `json:"last_status_change" url:"last_status_change,key"` // Timestamp of last status changed PreSharedKey string `json:"pre_shared_key" url:"pre_shared_key,key"` // Pre-shared key Status string `json:"status" url:"status,key"` // Status of the tunnel StatusMessage string `json:"status_message" url:"status_message,key"` // Details of the status } `json:"tunnels" url:"tunnels,key"` } type VPNConnectionCreateOpts struct { Name string `json:"name" url:"name,key"` // VPN Name PublicIP string `json:"public_ip" url:"public_ip,key"` // Public IP of VPN customer gateway RoutableCidrs []string `json:"routable_cidrs" url:"routable_cidrs,key"` // Routable CIDRs of VPN } // Create a new VPN connection in a private space. func (s *Service) VPNConnectionCreate(ctx context.Context, spaceIdentity string, o VPNConnectionCreateOpts) (*VPNConnection, error) { var vpnConnection VPNConnection return &vpnConnection, s.Post(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections", spaceIdentity), o) } // Destroy existing VPN Connection func (s *Service) VPNConnectionDestroy(ctx context.Context, spaceIdentity string, vpnConnectionIdentity string) (*VPNConnection, error) { var vpnConnection VPNConnection return &vpnConnection, s.Delete(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections/%v", spaceIdentity, vpnConnectionIdentity)) } type VPNConnectionListResult []VPNConnection // List VPN connections for a space. func (s *Service) VPNConnectionList(ctx context.Context, spaceIdentity string, lr *ListRange) (VPNConnectionListResult, error) { var vpnConnection VPNConnectionListResult return vpnConnection, s.Get(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections", spaceIdentity), nil, lr) } // Info for an existing vpn-connection. func (s *Service) VPNConnectionInfo(ctx context.Context, spaceIdentity string, vpnConnectionIdentity string) (*VPNConnection, error) { var vpnConnection VPNConnection return &vpnConnection, s.Get(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections/%v", spaceIdentity, vpnConnectionIdentity), nil, nil) } type VPNConnectionUpdateOpts struct { RoutableCidrs []string `json:"routable_cidrs" url:"routable_cidrs,key"` // Routable CIDRs of VPN } // Update a VPN connection in a private space. func (s *Service) VPNConnectionUpdate(ctx context.Context, spaceIdentity string, vpnConnectionIdentity string, o VPNConnectionUpdateOpts) (*VPNConnection, error) { var vpnConnection VPNConnection return &vpnConnection, s.Patch(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections/%v", spaceIdentity, vpnConnectionIdentity), o) } heroku-go-5.4.0/v5/round_trip_with_retry_backoff.go000066400000000000000000000047241413703571500224360ustar00rootroot00000000000000package v5 import ( "fmt" "log" "net/http" "time" "github.com/cenkalti/backoff" ) // net/http RoundTripper interface, a.k.a. Transport // https://godoc.org/net/http#RoundTripper type RoundTripWithRetryBackoff struct { // Configuration fields for backoff.ExponentialBackOff InitialIntervalSeconds int64 RandomizationFactor float64 Multiplier float64 MaxIntervalSeconds int64 // After MaxElapsedTime the ExponentialBackOff stops. // It never stops if MaxElapsedTime == 0. MaxElapsedTimeSeconds int64 } func (r RoundTripWithRetryBackoff) RoundTrip(req *http.Request) (*http.Response, error) { var lastResponse *http.Response var lastError error retryableRoundTrip := func() error { lastResponse = nil lastError = nil lastResponse, lastError = http.DefaultTransport.RoundTrip(req) // Detect Heroku API rate limiting // https://devcenter.heroku.com/articles/platform-api-reference#client-error-responses if lastResponse != nil && lastResponse.StatusCode == 429 { return fmt.Errorf("Heroku API rate limited: 429 Too Many Requests") } return nil } rateLimitRetryConfig := &backoff.ExponentialBackOff{ Clock: backoff.SystemClock, InitialInterval: time.Duration(int64WithDefault(r.InitialIntervalSeconds, int64(30))) * time.Second, RandomizationFactor: float64WithDefault(r.RandomizationFactor, float64(0.25)), Multiplier: float64WithDefault(r.Multiplier, float64(2)), MaxInterval: time.Duration(int64WithDefault(r.MaxIntervalSeconds, int64(900))) * time.Second, MaxElapsedTime: time.Duration(int64WithDefault(r.MaxElapsedTimeSeconds, int64(0))) * time.Second, } rateLimitRetryConfig.Reset() err := backoff.RetryNotify(retryableRoundTrip, rateLimitRetryConfig, notifyLog) // Propagate the rate limit error when retries eventually fail. if err != nil { if lastResponse != nil { lastResponse.Body.Close() } return nil, err } // Propagate all other response errors. if lastError != nil { if lastResponse != nil { lastResponse.Body.Close() } return nil, lastError } return lastResponse, nil } func int64WithDefault(v int64, defaultV int64) int64 { if v == int64(0) { return defaultV } else { return v } } func float64WithDefault(v float64, defaultV float64) float64 { if v == float64(0) { return defaultV } else { return v } } func notifyLog(err error, waitDuration time.Duration) { log.Printf("Will retry Heroku API request in %s, because %s", waitDuration, err) } heroku-go-5.4.0/v5/schema.json000066400000000000000000020211521413703571500161160ustar00rootroot00000000000000{ "$schema": "http://interagent.github.io/interagent-hyper-schema", "type": [ "object" ], "definitions": { "account-feature": { "description": "An account feature represents a Heroku labs capability that can be enabled or disabled for an account on Heroku.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Account Feature", "type": [ "object" ], "definitions": { "created_at": { "description": "when account feature was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "description": { "description": "description of account feature", "example": "Causes account to example.", "readOnly": true, "type": [ "string" ] }, "doc_url": { "description": "documentation URL of account feature", "example": "http://devcenter.heroku.com/articles/example", "readOnly": true, "type": [ "string" ] }, "enabled": { "description": "whether or not account feature has been enabled", "example": true, "readOnly": false, "type": [ "boolean" ] }, "id": { "description": "unique identifier of account feature", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/account-feature/definitions/id" }, { "$ref": "#/definitions/account-feature/definitions/name" } ] }, "name": { "description": "unique name of account feature", "example": "name", "readOnly": true, "type": [ "string" ] }, "state": { "description": "state of account feature", "example": "public", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when account feature was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "display_name": { "description": "user readable feature name", "example": "My Feature", "readOnly": true, "type": [ "string" ] }, "feedback_email": { "description": "e-mail to send feedback about the feature", "example": "feedback@heroku.com", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Info for an existing account feature.", "href": "/account/features/{(%23%2Fdefinitions%2Faccount-feature%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/account-feature" }, "title": "Info" }, { "description": "List existing account features.", "href": "/account/features", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/account-feature" }, "type": [ "array" ] }, "title": "List" }, { "description": "Update an existing account feature.", "href": "/account/features/{(%23%2Fdefinitions%2Faccount-feature%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "enabled": { "$ref": "#/definitions/account-feature/definitions/enabled" } }, "required": [ "enabled" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/account-feature" }, "title": "Update" } ], "properties": { "created_at": { "$ref": "#/definitions/account-feature/definitions/created_at" }, "description": { "$ref": "#/definitions/account-feature/definitions/description" }, "doc_url": { "$ref": "#/definitions/account-feature/definitions/doc_url" }, "enabled": { "$ref": "#/definitions/account-feature/definitions/enabled" }, "id": { "$ref": "#/definitions/account-feature/definitions/id" }, "name": { "$ref": "#/definitions/account-feature/definitions/name" }, "state": { "$ref": "#/definitions/account-feature/definitions/state" }, "updated_at": { "$ref": "#/definitions/account-feature/definitions/updated_at" }, "display_name": { "$ref": "#/definitions/account-feature/definitions/display_name" }, "feedback_email": { "$ref": "#/definitions/account-feature/definitions/feedback_email" } } }, "account": { "description": "An account represents an individual signed up to use the Heroku platform.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Account", "type": [ "object" ], "definitions": { "allow_tracking": { "default": true, "description": "whether to allow third party web activity tracking", "example": true, "readOnly": false, "type": [ "boolean" ] }, "beta": { "default": false, "description": "whether allowed to utilize beta Heroku features", "example": false, "readOnly": false, "type": [ "boolean" ] }, "created_at": { "description": "when account was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "country_of_residence": { "description": "country where account owner resides", "example": "United States", "readOnly": false, "type": [ "string", "null" ] }, "email": { "description": "unique email address of account", "example": "username@example.com", "format": "email", "readOnly": false, "type": [ "string" ] }, "federated": { "description": "whether the user is federated and belongs to an Identity Provider", "example": false, "readOnly": true, "type": [ "boolean" ] }, "id": { "description": "unique identifier of an account", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/account/definitions/email" }, { "$ref": "#/definitions/account/definitions/id" }, { "$ref": "#/definitions/account/definitions/self" } ] }, "last_login": { "description": "when account last authorized with Heroku", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string", "null" ] }, "name": { "description": "full name of the account owner", "example": "Tina Edmonds", "readOnly": false, "type": [ "string", "null" ] }, "password": { "description": "current password on the account", "example": "currentpassword", "readOnly": true, "type": [ "string" ] }, "self": { "description": "Implicit reference to currently authorized user", "enum": [ "~" ], "example": "~", "readOnly": true, "type": [ "string" ] }, "sms_number": { "description": "SMS number of account", "example": "+1 ***-***-1234", "readOnly": true, "type": [ "string", "null" ] }, "suspended_at": { "description": "when account was suspended", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string", "null" ] }, "delinquent_at": { "description": "when account became delinquent", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string", "null" ] }, "two_factor_authentication": { "description": "whether two-factor auth is enabled on the account", "example": false, "readOnly": true, "type": [ "boolean" ] }, "updated_at": { "description": "when account was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "verified": { "default": false, "description": "whether account has been verified with billing information", "example": false, "readOnly": true, "type": [ "boolean" ] } }, "links": [ { "description": "Info for account.", "href": "/account", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/account" }, "title": "Info" }, { "description": "Update account.", "href": "/account", "method": "PATCH", "rel": "update", "schema": { "properties": { "allow_tracking": { "$ref": "#/definitions/account/definitions/allow_tracking" }, "beta": { "$ref": "#/definitions/account/definitions/beta" }, "name": { "$ref": "#/definitions/account/definitions/name" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/account" }, "title": "Update" }, { "description": "Delete account. Note that this action cannot be undone.", "href": "/account", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/account" }, "title": "Delete" }, { "description": "Info for account.", "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/account" }, "title": "Info By User" }, { "description": "Update account.", "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "allow_tracking": { "$ref": "#/definitions/account/definitions/allow_tracking" }, "beta": { "$ref": "#/definitions/account/definitions/beta" }, "name": { "$ref": "#/definitions/account/definitions/name" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/account" }, "title": "Update By User" }, { "description": "Delete account. Note that this action cannot be undone.", "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/account" }, "title": "Delete By User" } ], "properties": { "allow_tracking": { "$ref": "#/definitions/account/definitions/allow_tracking" }, "beta": { "$ref": "#/definitions/account/definitions/beta" }, "created_at": { "$ref": "#/definitions/account/definitions/created_at" }, "email": { "$ref": "#/definitions/account/definitions/email" }, "federated": { "$ref": "#/definitions/account/definitions/federated" }, "id": { "$ref": "#/definitions/account/definitions/id" }, "identity_provider": { "description": "Identity Provider details for federated users.", "strictProperties": true, "properties": { "id": { "$ref": "#/definitions/identity-provider/definitions/id" }, "name": { "$ref": "#/definitions/identity-provider/definitions/name" }, "team": { "type": [ "object" ], "properties": { "name": { "$ref": "#/definitions/team/definitions/name" } } }, "organization": { "type": [ "object" ], "properties": { "name": { "$ref": "#/definitions/team/definitions/name" } } }, "owner": { "$ref": "#/definitions/identity-provider/definitions/owner" } }, "type": [ "object", "null" ] }, "last_login": { "$ref": "#/definitions/account/definitions/last_login" }, "name": { "$ref": "#/definitions/account/definitions/name" }, "sms_number": { "$ref": "#/definitions/account/definitions/sms_number" }, "suspended_at": { "$ref": "#/definitions/account/definitions/suspended_at" }, "delinquent_at": { "$ref": "#/definitions/account/definitions/delinquent_at" }, "two_factor_authentication": { "$ref": "#/definitions/account/definitions/two_factor_authentication" }, "updated_at": { "$ref": "#/definitions/account/definitions/updated_at" }, "verified": { "$ref": "#/definitions/account/definitions/verified" }, "country_of_residence": { "$ref": "#/definitions/account/definitions/country_of_residence" }, "default_organization": { "description": "team selected by default", "properties": { "id": { "$ref": "#/definitions/team/definitions/id" }, "name": { "$ref": "#/definitions/team/definitions/name" } }, "strictProperties": true, "type": [ "object", "null" ] }, "default_team": { "description": "team selected by default", "properties": { "id": { "$ref": "#/definitions/team/definitions/id" }, "name": { "$ref": "#/definitions/team/definitions/name" } }, "strictProperties": true, "type": [ "object", "null" ] } } }, "add-on-action": { "description": "Add-on Actions are lifecycle operations for add-on provisioning and deprovisioning. They allow add-on providers to (de)provision add-ons in the background and then report back when (de)provisioning is complete.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Add-on Action", "type": [ "object" ], "definitions": { }, "links": [ { "description": "Mark an add-on as provisioned for use.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/actions/provision", "method": "POST", "rel": "create", "targetSchema": { "$ref": "#/definitions/add-on" }, "title": "Provision" }, { "description": "Mark an add-on as deprovisioned.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/actions/deprovision", "method": "POST", "rel": "create", "targetSchema": { "$ref": "#/definitions/add-on" }, "title": "Deprovision" } ], "properties": { } }, "add-on-attachment": { "description": "An add-on attachment represents a connection between an app and an add-on that it has been given access to.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "prototype", "strictProperties": true, "title": "Heroku Platform API - Add-on Attachment", "type": [ "object" ], "definitions": { "confirm": { "description": "name of owning app for confirmation", "example": "example", "type": [ "string" ] }, "created_at": { "description": "when add-on attachment was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of this add-on attachment", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/add-on-attachment/definitions/id" } ] }, "scopedIdentity": { "anyOf": [ { "$ref": "#/definitions/add-on-attachment/definitions/id" }, { "$ref": "#/definitions/add-on-attachment/definitions/name" } ] }, "name": { "description": "unique name for this add-on attachment to this app", "example": "DATABASE", "readOnly": true, "type": [ "string" ] }, "namespace": { "description": "attachment namespace", "example": "role:analytics", "readOnly": true, "type": [ "null", "string" ] }, "updated_at": { "description": "when add-on attachment was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "web_url": { "description": "URL for logging into web interface of add-on in attached app context", "example": "https://postgres.heroku.com/databases/01234567-89ab-cdef-0123-456789abcdef", "format": "uri", "readOnly": true, "type": [ "null", "string" ] }, "log_input_url": { "description": "URL for add-on partners to write to an add-on's logs", "example": "https://token:t.abcdef12-3456-7890-abcd-ef1234567890@1.us.logplex.io/logs", "type": [ "null", "string" ], "readOnly": true } }, "links": [ { "description": "Create a new add-on attachment.", "href": "/addon-attachments", "method": "POST", "rel": "create", "schema": { "properties": { "addon": { "$ref": "#/definitions/add-on/definitions/identity" }, "app": { "$ref": "#/definitions/app/definitions/identity" }, "confirm": { "$ref": "#/definitions/add-on-attachment/definitions/confirm" }, "name": { "$ref": "#/definitions/add-on-attachment/definitions/name" }, "namespace": { "$ref": "#/definitions/add-on-attachment/definitions/namespace" } }, "required": [ "addon", "app" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/add-on-attachment" }, "title": "Create" }, { "description": "Delete an existing add-on attachment.", "href": "/addon-attachments/{(%23%2Fdefinitions%2Fadd-on-attachment%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/add-on-attachment" }, "title": "Delete" }, { "description": "Info for existing add-on attachment.", "href": "/addon-attachments/{(%23%2Fdefinitions%2Fadd-on-attachment%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/add-on-attachment" }, "title": "Info" }, { "description": "List existing add-on attachments.", "href": "/addon-attachments", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on-attachment" }, "type": [ "array" ] }, "title": "List" }, { "description": "List existing add-on attachments for an add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/addon-attachments", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on-attachment" }, "type": [ "array" ] }, "title": "List by Add-on" }, { "description": "List existing add-on attachments for an app.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addon-attachments", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on-attachment" }, "type": [ "array" ] }, "title": "List by App" }, { "description": "Info for existing add-on attachment for an app.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addon-attachments/{(%23%2Fdefinitions%2Fadd-on-attachment%2Fdefinitions%2FscopedIdentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/add-on-attachment" }, "title": "Info by App" }, { "description": "Resolve an add-on attachment from a name, optionally passing an app name. If there are matches it returns at least one add-on attachment (exact match) or many.", "href": "/actions/addon-attachments/resolve", "method": "POST", "rel": "resolve", "schema": { "properties": { "addon_attachment": { "$ref": "#/definitions/add-on-attachment/definitions/name" }, "app": { "$ref": "#/definitions/app/definitions/name" }, "addon_service": { "$ref": "#/definitions/add-on-service/definitions/name" } }, "required": [ "addon_attachment" ], "type": [ "object" ] }, "targetSchema": { "items": { "$ref": "#/definitions/add-on-attachment" }, "type": [ "array" ] }, "title": "Resolution" } ], "properties": { "addon": { "description": "identity of add-on", "properties": { "id": { "$ref": "#/definitions/add-on/definitions/id" }, "name": { "$ref": "#/definitions/add-on/definitions/name" }, "app": { "description": "billing application associated with this add-on", "type": [ "object" ], "properties": { "id": { "$ref": "#/definitions/app/definitions/id" }, "name": { "$ref": "#/definitions/app/definitions/name" } }, "strictProperties": true } }, "additionalProperties": false, "required": [ "id", "name", "app" ], "type": [ "object" ] }, "app": { "description": "application that is attached to add-on", "properties": { "id": { "$ref": "#/definitions/app/definitions/id" }, "name": { "$ref": "#/definitions/app/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/add-on-attachment/definitions/created_at" }, "id": { "$ref": "#/definitions/add-on-attachment/definitions/id" }, "name": { "$ref": "#/definitions/add-on-attachment/definitions/name" }, "namespace": { "$ref": "#/definitions/add-on-attachment/definitions/namespace" }, "updated_at": { "$ref": "#/definitions/add-on-attachment/definitions/updated_at" }, "web_url": { "$ref": "#/definitions/add-on-attachment/definitions/web_url" }, "log_input_url": { "$ref": "#/definitions/add-on-attachment/definitions/log_input_url" } } }, "add-on-config": { "description": "Configuration of an Add-on", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Add-on Config", "type": [ "object" ], "definitions": { "identity": { "anyOf": [ { "$ref": "#/definitions/add-on-config/definitions/name" } ] }, "name": { "description": "unique name of the config", "example": "FOO", "type": [ "string" ] }, "value": { "description": "value of the config", "example": "bar", "type": [ "string", "null" ] } }, "links": [ { "description": "Get an add-on's config. Accessible by customers with access and by the add-on partner providing this add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/config", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on-config" }, "type": [ "array" ] }, "title": "List" }, { "description": "Update an add-on's config. Can only be accessed by the add-on partner providing this add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/config", "method": "PATCH", "rel": "update", "schema": { "properties": { "config": { "items": { "$ref": "#/definitions/add-on-config" }, "type": [ "array" ] } }, "type": [ "object" ] }, "targetSchema": { "type": [ "array" ], "items": { "$ref": "#/definitions/add-on-config" } }, "title": "Update" } ], "properties": { "name": { "$ref": "#/definitions/add-on-config/definitions/name" }, "value": { "$ref": "#/definitions/add-on-config/definitions/value" } } }, "add-on-plan-action": { "description": "Add-on Plan Actions are Provider functionality for specific add-on installations", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Add-on Plan Action", "type": [ "object" ], "definitions": { "id": { "description": "a unique identifier", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "$ref": "#/definitions/add-on-plan-action/definitions/id" }, "label": { "description": "the display text shown in Dashboard", "example": "Example", "readOnly": true, "type": [ "string" ] }, "action": { "description": "identifier of the action to take that is sent via SSO", "example": "example", "readOnly": true, "type": [ "string" ] }, "url": { "description": "absolute URL to use instead of an action", "example": "http://example.com?resource_id=:resource_id", "readOnly": true, "type": [ "string" ] }, "requires_owner": { "description": "if the action requires the user to own the app", "example": true, "readOnly": true, "type": [ "boolean" ] } }, "properties": { "id": { "$ref": "#/definitions/add-on-plan-action/definitions/id" }, "label": { "$ref": "#/definitions/add-on-plan-action/definitions/label" }, "action": { "$ref": "#/definitions/add-on-plan-action/definitions/action" }, "url": { "$ref": "#/definitions/add-on-plan-action/definitions/url" }, "requires_owner": { "$ref": "#/definitions/add-on-plan-action/definitions/requires_owner" } } }, "add-on-region-capability": { "description": "Add-on region capabilities represent the relationship between an Add-on Service and a specific Region. Only Beta and GA add-ons are returned by these endpoints.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Add-on Region Capability", "type": [ "object" ], "definitions": { "id": { "description": "unique identifier of this add-on-region-capability", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "supports_private_networking": { "description": "whether the add-on can be installed to a Space", "readOnly": true, "type": [ "boolean" ] }, "identity": { "$ref": "#/definitions/add-on-region-capability/definitions/id" } }, "links": [ { "description": "List all existing add-on region capabilities.", "href": "/addon-region-capabilities", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on-region-capability" }, "type": [ "array" ] }, "title": "List" }, { "description": "List existing add-on region capabilities for an add-on-service", "href": "/addon-services/{(%23%2Fdefinitions%2Fadd-on-service%2Fdefinitions%2Fidentity)}/region-capabilities", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on-region-capability" }, "type": [ "array" ] }, "title": "List by Add-on Service" }, { "description": "List existing add-on region capabilities for a region.", "href": "/regions/{(%23%2Fdefinitions%2Fregion%2Fdefinitions%2Fidentity)}/addon-region-capabilities", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on-region-capability" }, "type": [ "array" ] }, "title": "List By Region" } ], "properties": { "id": { "$ref": "#/definitions/add-on-region-capability/definitions/id" }, "supports_private_networking": { "$ref": "#/definitions/add-on-region-capability/definitions/supports_private_networking" }, "addon_service": { "$ref": "#/definitions/add-on-service" }, "region": { "$ref": "#/definitions/region" } } }, "add-on-service": { "description": "Add-on services represent add-ons that may be provisioned for apps. Endpoints under add-on services can be accessed without authentication.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Add-on Service", "type": [ "object" ], "definitions": { "cli_plugin_name": { "description": "npm package name of the add-on service's Heroku CLI plugin", "example": "heroku-papertrail", "readOnly": true, "type": [ "string", "null" ] }, "created_at": { "description": "when add-on-service was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "human_name": { "description": "human-readable name of the add-on service provider", "example": "Heroku Postgres", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of this add-on-service", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/add-on-service/definitions/id" }, { "$ref": "#/definitions/add-on-service/definitions/name" } ] }, "name": { "description": "unique name of this add-on-service", "example": "heroku-postgresql", "readOnly": true, "type": [ "string" ] }, "state": { "description": "release status for add-on service", "enum": [ "alpha", "beta", "ga", "shutdown" ], "example": "ga", "readOnly": true, "type": [ "string" ] }, "supports_multiple_installations": { "default": false, "description": "whether or not apps can have access to more than one instance of this add-on at the same time", "example": false, "readOnly": true, "type": [ "boolean" ] }, "supports_sharing": { "default": false, "description": "whether or not apps can have access to add-ons billed to a different app", "example": false, "readOnly": true, "type": [ "boolean" ] }, "updated_at": { "description": "when add-on-service was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Info for existing add-on-service.", "href": "/addon-services/{(%23%2Fdefinitions%2Fadd-on-service%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/add-on-service" }, "title": "Info" }, { "description": "List existing add-on-services.", "href": "/addon-services", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on-service" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "cli_plugin_name": { "$ref": "#/definitions/add-on-service/definitions/cli_plugin_name" }, "created_at": { "$ref": "#/definitions/add-on-service/definitions/created_at" }, "human_name": { "$ref": "#/definitions/add-on-service/definitions/human_name" }, "id": { "$ref": "#/definitions/add-on-service/definitions/id" }, "name": { "$ref": "#/definitions/add-on-service/definitions/name" }, "state": { "$ref": "#/definitions/add-on-service/definitions/state" }, "supports_multiple_installations": { "$ref": "#/definitions/add-on-service/definitions/supports_multiple_installations" }, "supports_sharing": { "$ref": "#/definitions/add-on-service/definitions/supports_sharing" }, "updated_at": { "$ref": "#/definitions/add-on-service/definitions/updated_at" } } }, "add-on-webhook-delivery": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Heroku Platform API - Add-on Webhook Delivery", "description": "Represents the delivery of a webhook notification, including its current status.", "stability": "production", "strictProperties": true, "type": [ "object" ], "links": [ { "description": "Returns the info for an existing delivery. Can only be accessed by the add-on partner providing this add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhook-deliveries/{(%23%2Fdefinitions%2Fapp-webhook-delivery%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/app-webhook-delivery" }, "title": "Info" }, { "description": "Lists existing deliveries for an add-on. Can only be accessed by the add-on partner providing this add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhook-deliveries", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/app-webhook-delivery" }, "type": [ "array" ] }, "title": "List" } ] }, "add-on-webhook-event": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Heroku Platform API - Add-on Webhook Event", "description": "Represents a webhook event that occurred.", "stability": "production", "strictProperties": true, "type": [ "object" ], "links": [ { "description": "Returns the info for a specified webhook event. Can only be accessed by the add-on partner providing this add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhook-events/{(%23%2Fdefinitions%2Fapp-webhook-event%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/app-webhook-event" }, "title": "Info" }, { "description": "Lists existing webhook events for an add-on. Can only be accessed by the add-on partner providing this add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhook-events", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/app-webhook-event" }, "type": [ "array" ] }, "title": "List" } ] }, "add-on-webhook": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Heroku Platform API - Add-on Webhook", "description": "Represents the details of a webhook subscription", "stability": "production", "strictProperties": false, "additionalProperties": false, "required": [ "created_at", "id", "include", "level", "updated_at", "url" ], "type": [ "object" ], "definitions": { "addon_webhook": { "properties": { "addon": { "description": "identity of add-on. Only used for add-on partner webhooks.", "properties": { "id": { "$ref": "#/definitions/add-on/definitions/id" }, "name": { "$ref": "#/definitions/add-on/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/app-webhook/definitions/created_at" }, "id": { "$ref": "#/definitions/app-webhook/definitions/id" }, "include": { "$ref": "#/definitions/app-webhook/definitions/include" }, "level": { "$ref": "#/definitions/app-webhook/definitions/level" }, "updated_at": { "$ref": "#/definitions/app-webhook/definitions/updated_at" }, "url": { "$ref": "#/definitions/app-webhook/definitions/url" } }, "description": "add-on webhook", "type": [ "object" ] } }, "links": [ { "description": "Create an add-on webhook subscription. Can only be accessed by the add-on partner providing this add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhooks", "method": "POST", "rel": "create", "schema": { "properties": { "authorization": { "$ref": "#/definitions/app-webhook/definitions/authorization" }, "include": { "$ref": "#/definitions/app-webhook/definitions/include" }, "level": { "$ref": "#/definitions/app-webhook/definitions/level" }, "secret": { "$ref": "#/definitions/app-webhook/definitions/secret" }, "url": { "$ref": "#/definitions/app-webhook/definitions/url" } }, "additionalProperties": false, "required": [ "include", "level", "url" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/add-on-webhook/definitions/addon_webhook" }, "title": "Create" }, { "description": "Removes an add-on webhook subscription. Can only be accessed by the add-on partner providing this add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhooks/{(%23%2Fdefinitions%2Fapp-webhook%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/add-on-webhook/definitions/addon_webhook" }, "title": "Delete" }, { "description": "Returns the info for an add-on webhook subscription. Can only be accessed by the add-on partner providing this add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhooks/{(%23%2Fdefinitions%2Fapp-webhook%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/add-on-webhook/definitions/addon_webhook" }, "title": "Info" }, { "description": "List all webhook subscriptions for a particular add-on. Can only be accessed by the add-on partner providing this add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhooks", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on-webhook/definitions/addon_webhook" }, "type": [ "array" ] }, "title": "List" }, { "description": "Updates the details of an add-on webhook subscription. Can only be accessed by the add-on partner providing this add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhooks/{(%23%2Fdefinitions%2Fapp-webhook%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "authorization": { "$ref": "#/definitions/app-webhook/definitions/authorization" }, "include": { "$ref": "#/definitions/app-webhook/definitions/include" }, "level": { "$ref": "#/definitions/app-webhook/definitions/level" }, "secret": { "$ref": "#/definitions/app-webhook/definitions/secret" }, "url": { "$ref": "#/definitions/app-webhook/definitions/url" } }, "strictProperties": false, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/add-on-webhook/definitions/addon_webhook" }, "title": "Update" } ], "properties": { "created_at": { "$ref": "#/definitions/app-webhook/definitions/created_at" }, "id": { "$ref": "#/definitions/app-webhook/definitions/id" }, "include": { "$ref": "#/definitions/app-webhook/definitions/include" }, "level": { "$ref": "#/definitions/app-webhook/definitions/level" }, "updated_at": { "$ref": "#/definitions/app-webhook/definitions/updated_at" }, "url": { "$ref": "#/definitions/app-webhook/definitions/url" } } }, "add-on": { "description": "Add-ons represent add-ons that have been provisioned and attached to one or more apps.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Add-on", "type": [ "object" ], "definitions": { "actions": { "description": "provider actions for this specific add-on", "type": [ "array" ], "items": { "type": [ "object" ] }, "readOnly": true, "properties": { "id": { "$ref": "#/definitions/add-on-plan-action/definitions/id" }, "label": { "$ref": "#/definitions/add-on-plan-action/definitions/label" }, "action": { "$ref": "#/definitions/add-on-plan-action/definitions/action" }, "url": { "$ref": "#/definitions/add-on-plan-action/definitions/url" }, "requires_owner": { "$ref": "#/definitions/add-on-plan-action/definitions/requires_owner" } } }, "cents": { "description": "price in cents per unit of add-on", "example": 0, "readOnly": true, "type": [ "integer" ] }, "config": { "additionalProperties": false, "description": "custom add-on provisioning options", "example": { "db-version": "1.2.3" }, "patternProperties": { "^\\w+$": { "type": [ "string" ] } }, "type": [ "object" ] }, "config_vars": { "description": "config vars exposed to the owning app by this add-on", "example": [ "FOO", "BAZ" ], "items": { "type": [ "string" ] }, "readOnly": true, "type": [ "array" ] }, "confirm": { "description": "name of billing entity for confirmation", "example": "example", "type": [ "string" ] }, "created_at": { "description": "when add-on was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of add-on", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/add-on/definitions/id" }, { "$ref": "#/definitions/add-on/definitions/name" } ] }, "name": { "description": "globally unique name of the add-on", "example": "acme-inc-primary-database", "pattern": "^[a-zA-Z][A-Za-z0-9_-]+$", "type": [ "string" ] }, "provider_id": { "description": "id of this add-on with its provider", "example": "abcd1234", "readOnly": true, "type": [ "string" ] }, "state": { "description": "state in the add-on's lifecycle", "enum": [ "provisioning", "provisioned", "deprovisioned" ], "example": "provisioned", "readOnly": true, "type": [ "string" ] }, "unit": { "description": "unit of price for add-on", "example": "month", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when add-on was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "web_url": { "description": "URL for logging into web interface of add-on (e.g. a dashboard)", "example": "https://postgres.heroku.com/databases/01234567-89ab-cdef-0123-456789abcdef", "format": "uri", "readOnly": true, "type": [ "null", "string" ] } }, "links": [ { "description": "List all existing add-ons.", "href": "/addons", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on" }, "type": [ "array" ] }, "title": "List" }, { "description": "Info for an existing add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/add-on" }, "title": "Info" }, { "description": "Create a new add-on.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons", "method": "POST", "rel": "create", "schema": { "properties": { "attachment": { "description": "name for add-on's initial attachment", "example": { "name": "DATABASE_FOLLOWER" }, "properties": { "name": { "$ref": "#/definitions/add-on-attachment/definitions/name" } }, "type": [ "object" ] }, "config": { "$ref": "#/definitions/add-on/definitions/config" }, "confirm": { "$ref": "#/definitions/add-on/definitions/confirm" }, "plan": { "$ref": "#/definitions/plan/definitions/identity" }, "name": { "$ref": "#/definitions/add-on/definitions/name" } }, "required": [ "plan" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/add-on" }, "title": "Create" }, { "description": "Delete an existing add-on.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/add-on" }, "title": "Delete" }, { "description": "Info for an existing add-on.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/add-on" }, "title": "Info By App" }, { "description": "List existing add-ons for an app.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on" }, "type": [ "array" ] }, "title": "List By App" }, { "description": "Change add-on plan. Some add-ons may not support changing plans. In that case, an error will be returned.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "name": { "$ref": "#/definitions/add-on/definitions/name" }, "plan": { "$ref": "#/definitions/plan/definitions/identity" } }, "required": [ "plan" ], "type": [ "object" ] }, "title": "Update" }, { "description": "List all existing add-ons a user has access to", "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/addons", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on" }, "type": [ "array" ] }, "title": "List By User" }, { "description": "List add-ons used across all Team apps", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/addons", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on" }, "type": [ "array" ] }, "title": "List By Team" }, { "description": "Resolve an add-on from a name, optionally passing an app name. If there are matches it returns at least one add-on (exact match) or many.", "href": "/actions/addons/resolve", "method": "POST", "rel": "resolve", "schema": { "properties": { "addon": { "$ref": "#/definitions/add-on/definitions/name" }, "app": { "$ref": "#/definitions/app/definitions/name" }, "addon_service": { "$ref": "#/definitions/add-on-service/definitions/name" } }, "required": [ "addon" ], "type": [ "object" ] }, "targetSchema": { "items": { "$ref": "#/definitions/add-on" }, "type": [ "array" ] }, "title": "Resolution" } ], "properties": { "actions": { "$ref": "#/definitions/add-on/definitions/actions" }, "addon_service": { "description": "identity of add-on service", "properties": { "id": { "$ref": "#/definitions/add-on-service/definitions/id" }, "name": { "$ref": "#/definitions/add-on-service/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "billing_entity": { "description": "billing entity associated with this add-on", "type": [ "object" ], "properties": { "id": { "description": "unique identifier of the billing entity", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "name": { "description": "name of the billing entity", "example": "example", "readOnly": true, "type": [ "string" ] }, "type": { "description": "type of Object of the billing entity; new types allowed at any time.", "enum": [ "app", "team" ], "example": "app", "readOnly": true, "type": [ "string" ] } }, "strictProperties": true }, "app": { "description": "billing application associated with this add-on", "type": [ "object" ], "properties": { "id": { "$ref": "#/definitions/app/definitions/id" }, "name": { "$ref": "#/definitions/app/definitions/name" } }, "strictProperties": true }, "billed_price": { "description": "billed price", "properties": { "cents": { "$ref": "#/definitions/plan/definitions/cents" }, "contract": { "$ref": "#/definitions/plan/definitions/contract" }, "unit": { "$ref": "#/definitions/plan/definitions/unit" } }, "strictProperties": true, "type": [ "object", "null" ] }, "config_vars": { "$ref": "#/definitions/add-on/definitions/config_vars" }, "created_at": { "$ref": "#/definitions/add-on/definitions/created_at" }, "id": { "$ref": "#/definitions/add-on/definitions/id" }, "name": { "$ref": "#/definitions/add-on/definitions/name" }, "plan": { "description": "identity of add-on plan", "properties": { "id": { "$ref": "#/definitions/plan/definitions/id" }, "name": { "$ref": "#/definitions/plan/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "provider_id": { "$ref": "#/definitions/add-on/definitions/provider_id" }, "state": { "$ref": "#/definitions/add-on/definitions/state" }, "updated_at": { "$ref": "#/definitions/add-on/definitions/updated_at" }, "web_url": { "$ref": "#/definitions/add-on/definitions/web_url" } } }, "allowed-add-on-service": { "description": "Entities that have been allowed to be used by a Team", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "prototype", "strictProperties": true, "title": "Heroku Platform API - Allowed Add-on Service", "type": [ "object" ], "definitions": { "added_at": { "description": "when the add-on service was allowed", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "added_by": { "description": "the user which allowed the add-on service", "properties": { "email": { "$ref": "#/definitions/account/definitions/email", "type": [ "string", "null" ] }, "id": { "$ref": "#/definitions/account/definitions/id", "type": [ "string", "null" ] } }, "readOnly": true, "type": [ "object" ] }, "addon_service": { "description": "the add-on service allowed for use", "properties": { "id": { "$ref": "#/definitions/add-on-service/definitions/id" }, "name": { "$ref": "#/definitions/add-on-service/definitions/name" }, "human_name": { "$ref": "#/definitions/add-on-service/definitions/human_name" } }, "readOnly": true, "type": [ "object" ] }, "id": { "description": "unique identifier for this allowed add-on service record", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/allowed-add-on-service/definitions/id" }, { "$ref": "#/definitions/add-on-service/definitions/name" } ] } }, "links": [ { "description": "List all allowed add-on services for a team", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/allowed-addon-services", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/allowed-add-on-service" }, "type": [ "array" ] }, "title": "List By Team" }, { "description": "Allow an Add-on Service", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/allowed-addon-services", "method": "POST", "rel": "create", "schema": { "type": [ "object" ], "properties": { "addon_service": { "description": "name of the add-on service to allow", "example": "heroku-postgresql", "type": [ "string" ] } } }, "targetSchema": { "items": { "$ref": "#/definitions/allowed-add-on-service" }, "type": [ "array" ] }, "title": "Create By Team" }, { "description": "Remove an allowed add-on service", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/allowed-addon-services/{(%23%2Fdefinitions%2Fallowed-add-on-service%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/allowed-add-on-service" }, "title": "Delete By Team" } ], "properties": { "added_at": { "$ref": "#/definitions/allowed-add-on-service/definitions/added_at" }, "added_by": { "$ref": "#/definitions/allowed-add-on-service/definitions/added_by" }, "addon_service": { "$ref": "#/definitions/allowed-add-on-service/definitions/addon_service" }, "id": { "$ref": "#/definitions/allowed-add-on-service/definitions/id" } } }, "app-feature": { "description": "An app feature represents a Heroku labs capability that can be enabled or disabled for an app on Heroku.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - App Feature", "type": [ "object" ], "definitions": { "created_at": { "description": "when app feature was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "description": { "description": "description of app feature", "example": "Causes app to example.", "readOnly": true, "type": [ "string" ] }, "doc_url": { "description": "documentation URL of app feature", "example": "http://devcenter.heroku.com/articles/example", "readOnly": true, "type": [ "string" ] }, "enabled": { "description": "whether or not app feature has been enabled", "example": true, "readOnly": false, "type": [ "boolean" ] }, "id": { "description": "unique identifier of app feature", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/app-feature/definitions/id" }, { "$ref": "#/definitions/app-feature/definitions/name" } ] }, "name": { "description": "unique name of app feature", "example": "name", "readOnly": true, "type": [ "string" ] }, "state": { "description": "state of app feature", "example": "public", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when app feature was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "display_name": { "description": "user readable feature name", "example": "My Feature", "readOnly": true, "type": [ "string" ] }, "feedback_email": { "description": "e-mail to send feedback about the feature", "example": "feedback@heroku.com", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Info for an existing app feature.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/features/{(%23%2Fdefinitions%2Fapp-feature%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/app-feature" }, "title": "Info" }, { "description": "List existing app features.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/features", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/app-feature" }, "type": [ "array" ] }, "title": "List" }, { "description": "Update an existing app feature.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/features/{(%23%2Fdefinitions%2Fapp-feature%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "enabled": { "$ref": "#/definitions/app-feature/definitions/enabled" } }, "required": [ "enabled" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/app-feature" }, "title": "Update" } ], "properties": { "created_at": { "$ref": "#/definitions/app-feature/definitions/created_at" }, "description": { "$ref": "#/definitions/app-feature/definitions/description" }, "doc_url": { "$ref": "#/definitions/app-feature/definitions/doc_url" }, "enabled": { "$ref": "#/definitions/app-feature/definitions/enabled" }, "id": { "$ref": "#/definitions/app-feature/definitions/id" }, "name": { "$ref": "#/definitions/app-feature/definitions/name" }, "state": { "$ref": "#/definitions/app-feature/definitions/state" }, "updated_at": { "$ref": "#/definitions/app-feature/definitions/updated_at" }, "display_name": { "$ref": "#/definitions/app-feature/definitions/display_name" }, "feedback_email": { "$ref": "#/definitions/app-feature/definitions/feedback_email" } } }, "app-formation-set": { "description": "App formation set describes the combination of process types with their quantities and sizes as well as application process tier", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Application Formation Set", "type": [ "object" ], "properties": { "description": { "description": "a string representation of the formation set", "example": "web@2:Standard-2X worker@3:Performance-M", "readOnly": true, "type": [ "string" ] }, "process_tier": { "description": "application process tier", "enum": [ "production", "free", "hobby", "private" ], "example": "production", "readOnly": true, "type": [ "string" ] }, "app": { "description": "app being described by the formation-set", "properties": { "name": { "$ref": "#/definitions/app/definitions/name" }, "id": { "$ref": "#/definitions/app/definitions/id" } }, "type": [ "object" ] }, "updated_at": { "description": "last time fomation-set was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } } }, "app-setup": { "description": "An app setup represents an app on Heroku that is setup using an environment, addons, and scripts described in an app.json manifest file.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Setup API - App Setup", "type": [ "object" ], "definitions": { "id": { "description": "unique identifier of app setup", "example": "01234567-89ab-cdef-0123-456789abcdef", "readOnly": true, "type": [ "string" ], "format": "uuid" }, "identity": { "anyOf": [ { "$ref": "#/definitions/app-setup/definitions/id" } ] }, "buildpack_override": { "description": "a buildpack override", "properties": { "url": { "description": "location of the buildpack", "example": "https://example.com/buildpack.tgz", "type": [ "string" ] } }, "type": [ "object" ] }, "created_at": { "description": "when app setup was created", "example": "2012-01-01T12:00:00Z", "readOnly": true, "type": [ "string" ], "format": "date-time" }, "updated_at": { "description": "when app setup was updated", "example": "2012-01-01T12:00:00Z", "readOnly": true, "type": [ "string" ], "format": "date-time" }, "status": { "description": "the overall status of app setup", "example": "failed", "enum": [ "failed", "pending", "succeeded" ], "readOnly": true, "type": [ "string" ] }, "resolved_success_url": { "description": "fully qualified success url", "example": "https://example.herokuapp.com/welcome", "readOnly": true, "type": [ "string", "null" ] }, "failure_message": { "description": "reason that app setup has failed", "example": "invalid app.json", "readOnly": true, "type": [ "string", "null" ] }, "manifest_errors": { "description": "errors associated with invalid app.json manifest file", "example": [ "config var FOO is required" ], "readOnly": true, "items": { "type": [ "string" ] }, "type": [ "array" ] }, "overrides": { "description": "overrides of keys in the app.json manifest file", "example": { "buildpacks": [ { "url": "https://example.com/buildpack.tgz" } ], "env": { "FOO": "bar", "BAZ": "qux" } }, "properties": { "buildpacks": { "description": "overrides the buildpacks specified in the app.json manifest file", "example": [ { "url": "https://example.com/buildpack.tgz" } ], "items": { "$ref": "#/definitions/app-setup/definitions/buildpack_override" }, "type": [ "array" ] }, "env": { "description": "overrides of the env specified in the app.json manifest file", "example": { "FOO": "bar", "BAZ": "qux" }, "readOnly": true, "additionalProperties": false, "patternProperties": { "^\\w+$": { "type": [ "string" ] } }, "type": [ "object" ] } }, "type": [ "object" ] }, "postdeploy": { "description": "result of postdeploy script", "type": [ "object", "null" ], "properties": { "output": { "description": "output of the postdeploy script", "example": "assets precompiled", "readOnly": true, "type": [ "string" ] }, "exit_code": { "description": "The exit code of the postdeploy script", "example": 1, "readOnly": true, "type": [ "integer" ] } }, "readOnly": true } }, "properties": { "id": { "$ref": "#/definitions/app-setup/definitions/id" }, "created_at": { "$ref": "#/definitions/app-setup/definitions/created_at" }, "updated_at": { "$ref": "#/definitions/app-setup/definitions/updated_at" }, "status": { "$ref": "#/definitions/app-setup/definitions/status" }, "failure_message": { "$ref": "#/definitions/app-setup/definitions/failure_message" }, "app": { "description": "identity of app", "strictProperties": true, "type": [ "object" ], "properties": { "id": { "$ref": "#/definitions/app/definitions/id" }, "name": { "$ref": "#/definitions/app/definitions/name" } } }, "build": { "description": "identity and status of build", "strictProperties": true, "type": [ "null", "object" ], "properties": { "id": { "$ref": "#/definitions/build/definitions/id" }, "status": { "$ref": "#/definitions/build/definitions/status" }, "output_stream_url": { "$ref": "#/definitions/build/definitions/output_stream_url" } } }, "manifest_errors": { "$ref": "#/definitions/app-setup/definitions/manifest_errors" }, "postdeploy": { "$ref": "#/definitions/app-setup/definitions/postdeploy" }, "resolved_success_url": { "$ref": "#/definitions/app-setup/definitions/resolved_success_url" } }, "links": [ { "description": "Create a new app setup from a gzipped tar archive containing an app.json manifest file.", "title": "Create", "rel": "create", "method": "POST", "href": "/app-setups", "schema": { "required": [ "source_blob" ], "type": [ "object" ], "properties": { "app": { "description": "optional parameters for created app", "properties": { "locked": { "$ref": "#/definitions/team-app/definitions/locked" }, "name": { "$ref": "#/definitions/app/definitions/name" }, "organization": { "$ref": "#/definitions/team/definitions/name" }, "personal": { "$ref": "#/definitions/team-app/definitions/personal" }, "region": { "$ref": "#/definitions/region/definitions/name" }, "space": { "$ref": "#/definitions/space/definitions/name" }, "stack": { "$ref": "#/definitions/stack/definitions/name" } }, "type": [ "object" ] }, "source_blob": { "description": "gzipped tarball of source code containing app.json manifest file", "properties": { "checksum": { "description": "an optional checksum of the gzipped tarball for verifying its integrity", "example": "SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "readOnly": true, "type": [ "null", "string" ] }, "url": { "description": "URL of gzipped tarball of source code containing app.json manifest file", "example": "https://example.com/source.tgz?token=xyz", "readOnly": true, "type": [ "string" ] }, "version": { "description": "Version of the gzipped tarball.", "example": "v1.3.0", "readOnly": true, "type": [ "string", "null" ] } }, "type": [ "object" ] }, "overrides": { "$ref": "#/definitions/app-setup/definitions/overrides" } } }, "targetSchema": { "$ref": "#/definitions/app-setup" } }, { "description": "Get the status of an app setup.", "title": "Info", "rel": "self", "method": "GET", "href": "/app-setups/{(%23%2Fdefinitions%2Fapp-setup%2Fdefinitions%2Fidentity)}", "targetSchema": { "$ref": "#/definitions/app-setup" } } ] }, "app-transfer": { "description": "An app transfer represents a two party interaction for transferring ownership of an app.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - App Transfer", "type": [ "object" ], "definitions": { "created_at": { "description": "when app transfer was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of app transfer", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/app-transfer/definitions/id" }, { "$ref": "#/definitions/app/definitions/name" } ] }, "silent": { "default": false, "description": "whether to suppress email notification when transferring apps", "example": false, "readOnly": true, "type": [ "boolean" ] }, "state": { "description": "the current state of an app transfer", "enum": [ "pending", "accepted", "declined" ], "example": "pending", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when app transfer was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Create a new app transfer.", "href": "/account/app-transfers", "method": "POST", "rel": "create", "schema": { "properties": { "app": { "$ref": "#/definitions/app/definitions/identity" }, "recipient": { "$ref": "#/definitions/account/definitions/identity" }, "silent": { "$ref": "#/definitions/app-transfer/definitions/silent" } }, "required": [ "app", "recipient" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/app-transfer" }, "title": "Create" }, { "description": "Delete an existing app transfer", "href": "/account/app-transfers/{(%23%2Fdefinitions%2Fapp-transfer%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/app-transfer" }, "title": "Delete" }, { "description": "Info for existing app transfer.", "href": "/account/app-transfers/{(%23%2Fdefinitions%2Fapp-transfer%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/app-transfer" }, "title": "Info" }, { "description": "List existing apps transfers.", "href": "/account/app-transfers", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/app-transfer" }, "type": [ "array" ] }, "title": "List" }, { "description": "Update an existing app transfer.", "href": "/account/app-transfers/{(%23%2Fdefinitions%2Fapp-transfer%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "state": { "$ref": "#/definitions/app-transfer/definitions/state" } }, "required": [ "state" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/app-transfer" }, "title": "Update" } ], "properties": { "app": { "description": "app involved in the transfer", "properties": { "name": { "$ref": "#/definitions/app/definitions/name" }, "id": { "$ref": "#/definitions/app/definitions/id" } }, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/app-transfer/definitions/created_at" }, "id": { "$ref": "#/definitions/app-transfer/definitions/id" }, "owner": { "description": "identity of the owner of the transfer", "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "id": { "$ref": "#/definitions/account/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "recipient": { "description": "identity of the recipient of the transfer", "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "id": { "$ref": "#/definitions/account/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "state": { "$ref": "#/definitions/app-transfer/definitions/state" }, "updated_at": { "$ref": "#/definitions/app-transfer/definitions/updated_at" } } }, "app-webhook-delivery": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Heroku Platform API - App Webhook Delivery", "description": "Represents the delivery of a webhook notification, including its current status.", "stability": "production", "strictProperties": true, "type": [ "object" ], "definitions": { "attempt_id": { "description": "unique identifier of attempt", "readOnly": true, "format": "uuid", "type": [ "string" ] }, "attempt_error_class": { "description": "error class encountered during attempt", "readOnly": true, "type": [ "string", "null" ] }, "attempt_code": { "description": "http response code received during attempt", "readOnly": true, "type": [ "integer", "null" ] }, "attempt_created_at": { "description": "when attempt was created", "format": "date-time", "type": [ "string" ] }, "attempt_updated_at": { "description": "when attempt was updated", "format": "date-time", "type": [ "string" ] }, "attempt_status": { "description": "status of an attempt", "enum": [ "scheduled", "succeeded", "failed" ], "example": "scheduled", "type": [ "string" ] }, "created_at": { "description": "when the delivery was created", "format": "date-time", "type": [ "string" ] }, "id": { "description": "the delivery's unique identifier", "readOnly": true, "format": "uuid", "type": [ "string" ] }, "num_attempts": { "description": "number of times a delivery has been attempted", "readOnly": true, "type": [ "integer" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/app-webhook-delivery/definitions/id" } ] }, "next_attempt_at": { "description": "when delivery will be attempted again", "format": "date-time", "type": [ "string", "null" ] }, "status": { "description": "the delivery's status", "enum": [ "pending", "scheduled", "retrying", "failed", "succeeded" ], "example": "pending", "type": [ "string" ] }, "updated_at": { "description": "when the delivery was last updated", "format": "date-time", "type": [ "string" ] } }, "links": [ { "description": "Returns the info for an existing delivery.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhook-deliveries/{(%23%2Fdefinitions%2Fapp-webhook-delivery%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/app-webhook-delivery" }, "title": "Info" }, { "description": "Lists existing deliveries for an app.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhook-deliveries", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/app-webhook-delivery" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "created_at": { "$ref": "#/definitions/app-webhook-delivery/definitions/created_at" }, "event": { "description": "identity of event", "properties": { "id": { "$ref": "#/definitions/app-webhook-event/definitions/id" }, "include": { "$ref": "#/definitions/app-webhook-event/definitions/include" } }, "strictProperties": true, "type": [ "object" ] }, "id": { "$ref": "#/definitions/app-webhook-delivery/definitions/id" }, "num_attempts": { "$ref": "#/definitions/app-webhook-delivery/definitions/num_attempts" }, "next_attempt_at": { "$ref": "#/definitions/app-webhook-delivery/definitions/next_attempt_at" }, "last_attempt": { "description": "last attempt of a delivery", "properties": { "id": { "$ref": "#/definitions/app-webhook-delivery/definitions/attempt_id" }, "code": { "$ref": "#/definitions/app-webhook-delivery/definitions/attempt_code" }, "error_class": { "$ref": "#/definitions/app-webhook-delivery/definitions/attempt_error_class" }, "status": { "$ref": "#/definitions/app-webhook-delivery/definitions/attempt_status" }, "created_at": { "$ref": "#/definitions/app-webhook-delivery/definitions/attempt_created_at" }, "updated_at": { "$ref": "#/definitions/app-webhook-delivery/definitions/attempt_updated_at" } }, "strictProperties": true, "type": [ "object", "null" ] }, "status": { "$ref": "#/definitions/app-webhook-delivery/definitions/status" }, "updated_at": { "$ref": "#/definitions/app-webhook-delivery/definitions/updated_at" }, "webhook": { "description": "identity of webhook", "properties": { "id": { "$ref": "#/definitions/app-webhook/definitions/id" }, "level": { "$ref": "#/definitions/app-webhook/definitions/level" } }, "strictProperties": true, "type": [ "object" ] } } }, "app-webhook-event": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Heroku Platform API - App Webhook Event", "description": "Represents a webhook event that occurred.", "stability": "production", "strictProperties": true, "type": [ "object" ], "definitions": { "action": { "description": "the type of event that occurred", "example": "create", "type": [ "string" ] }, "actor": { "description": "user that caused event", "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "id": { "$ref": "#/definitions/account/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "created_at": { "description": "when event was created", "format": "date-time", "type": [ "string" ] }, "data": { "description": "the current details of the event", "type": [ "object" ] }, "id": { "description": "the event's unique identifier", "readOnly": true, "format": "uuid", "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/app-webhook-event/definitions/id" } ] }, "include": { "description": "the type of entity that the event is related to", "example": "api:release", "type": [ "string" ] }, "payload": { "description": "payload of event", "properties": { "action": { "$ref": "#/definitions/app-webhook-event/definitions/action" }, "actor": { "$ref": "#/definitions/app-webhook-event/definitions/actor" }, "data": { "$ref": "#/definitions/app-webhook-event/definitions/data" }, "previous_data": { "$ref": "#/definitions/app-webhook-event/definitions/previous_data" }, "resource": { "$ref": "#/definitions/app-webhook-event/definitions/resource" }, "version": { "$ref": "#/definitions/app-webhook-event/definitions/version" } }, "strictProperties": true, "type": [ "object" ] }, "previous_data": { "description": "previous details of the event (if any)", "type": [ "object" ] }, "resource": { "description": "the type of resource associated with the event", "example": "release", "type": [ "string" ] }, "updated_at": { "description": "when the event was last updated", "format": "date-time", "type": [ "string" ] }, "version": { "description": "the version of the details provided for the event", "example": "1", "type": [ "string" ] } }, "links": [ { "description": "Returns the info for a specified webhook event.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhook-events/{(%23%2Fdefinitions%2Fapp-webhook-event%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/app-webhook-event" }, "title": "Info" }, { "description": "Lists existing webhook events for an app.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhook-events", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/app-webhook-event" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "created_at": { "$ref": "#/definitions/app-webhook-event/definitions/created_at" }, "id": { "$ref": "#/definitions/app-webhook-event/definitions/id" }, "include": { "$ref": "#/definitions/app-webhook-event/definitions/include" }, "payload": { "$ref": "#/definitions/app-webhook-event/definitions/payload" }, "updated_at": { "$ref": "#/definitions/app-webhook-event/definitions/updated_at" } } }, "app-webhook": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Heroku Platform API - App Webhook", "description": "Represents the details of a webhook subscription", "stability": "production", "strictProperties": false, "additionalProperties": false, "required": [ "created_at", "id", "include", "level", "updated_at", "url" ], "type": [ "object" ], "definitions": { "authorization": { "description": "a custom `Authorization` header that Heroku will include with all webhook notifications", "example": "Bearer 9266671b2767f804c9d5809c2d384ed57d8f8ce1abd1043e1fb3fbbcb8c3", "type": [ "null", "string" ] }, "created_at": { "description": "when the webhook was created", "format": "date-time", "type": [ "string" ] }, "id": { "description": "the webhook's unique identifier", "readOnly": true, "format": "uuid", "type": [ "string" ] }, "include": { "description": "the entities that the subscription provides notifications for", "items": { "example": "api:release", "type": [ "string" ] }, "type": [ "array" ] }, "level": { "description": "if `notify`, Heroku makes a single, fire-and-forget delivery attempt. If `sync`, Heroku attempts multiple deliveries until the request is successful or a limit is reached", "enum": [ "notify", "sync" ], "example": "notify", "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/app-webhook/definitions/id" } ] }, "secret": { "description": "a value that Heroku will use to sign all webhook notification requests (the signature is included in the request’s `Heroku-Webhook-Hmac-SHA256` header)", "example": "dcbff0c4430a2960a2552389d587bc58d30a37a8cf3f75f8fb77abe667ad", "type": [ "null", "string" ] }, "updated_at": { "description": "when the webhook was updated", "format": "date-time", "type": [ "string" ] }, "url": { "description": "the URL where the webhook's notification requests are sent", "format": "uri", "type": [ "string" ] }, "app_webhook": { "properties": { "app": { "description": "identity of app. Only used for customer webhooks.", "properties": { "id": { "$ref": "#/definitions/app/definitions/id" }, "name": { "$ref": "#/definitions/app/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/app-webhook/definitions/created_at" }, "id": { "$ref": "#/definitions/app-webhook/definitions/id" }, "include": { "$ref": "#/definitions/app-webhook/definitions/include" }, "level": { "$ref": "#/definitions/app-webhook/definitions/level" }, "updated_at": { "$ref": "#/definitions/app-webhook/definitions/updated_at" }, "url": { "$ref": "#/definitions/app-webhook/definitions/url" } }, "description": "app webhook", "type": [ "object" ] } }, "links": [ { "description": "Create an app webhook subscription.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhooks", "method": "POST", "rel": "create", "schema": { "properties": { "authorization": { "$ref": "#/definitions/app-webhook/definitions/authorization" }, "include": { "$ref": "#/definitions/app-webhook/definitions/include" }, "level": { "$ref": "#/definitions/app-webhook/definitions/level" }, "secret": { "$ref": "#/definitions/app-webhook/definitions/secret" }, "url": { "$ref": "#/definitions/app-webhook/definitions/url" } }, "additionalProperties": false, "required": [ "include", "level", "url" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/app-webhook/definitions/app_webhook" }, "title": "Create" }, { "description": "Removes an app webhook subscription.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhooks/{(%23%2Fdefinitions%2Fapp-webhook%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/app-webhook/definitions/app_webhook" }, "title": "Delete" }, { "description": "Returns the info for an app webhook subscription.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhooks/{(%23%2Fdefinitions%2Fapp-webhook%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/app-webhook/definitions/app_webhook" }, "title": "Info" }, { "description": "List all webhook subscriptions for a particular app.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhooks", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/app-webhook/definitions/app_webhook" }, "type": [ "array" ] }, "title": "List" }, { "description": "Updates the details of an app webhook subscription.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhooks/{(%23%2Fdefinitions%2Fapp-webhook%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "authorization": { "$ref": "#/definitions/app-webhook/definitions/authorization" }, "include": { "$ref": "#/definitions/app-webhook/definitions/include" }, "level": { "$ref": "#/definitions/app-webhook/definitions/level" }, "secret": { "$ref": "#/definitions/app-webhook/definitions/secret" }, "url": { "$ref": "#/definitions/app-webhook/definitions/url" } }, "strictProperties": false, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/app-webhook/definitions/app_webhook" }, "title": "Update" } ] }, "app": { "description": "An app represents the program that you would like to deploy and run on Heroku.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - App", "type": [ "object" ], "definitions": { "archived_at": { "description": "when app was archived", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "null", "string" ] }, "buildpack_provided_description": { "description": "description from buildpack of app", "example": "Ruby/Rack", "readOnly": true, "type": [ "null", "string" ] }, "created_at": { "description": "when app was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "git_url": { "description": "git repo URL of app", "example": "https://git.heroku.com/example.git", "pattern": "^https://git\\.heroku\\.com/[a-z][a-z0-9-]{2,29}\\.git$", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of app", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/app/definitions/id" }, { "$ref": "#/definitions/app/definitions/name" } ] }, "maintenance": { "default": false, "description": "maintenance status of app", "example": false, "readOnly": false, "type": [ "boolean" ] }, "name": { "description": "unique name of app", "example": "example", "pattern": "^[a-z][a-z0-9-]{1,28}[a-z0-9]$", "readOnly": false, "type": [ "string" ] }, "released_at": { "default": null, "description": "when app was released", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "null", "string" ] }, "repo_size": { "default": null, "description": "git repo size in bytes of app", "example": 0, "readOnly": true, "type": [ "integer", "null" ] }, "slug_size": { "default": null, "description": "slug size in bytes of app", "example": 0, "readOnly": true, "type": [ "integer", "null" ] }, "updated_at": { "description": "when app was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "web_url": { "description": "web URL of app", "example": "https://example.herokuapp.com/", "format": "uri", "pattern": "^https?://[a-z][a-z0-9-]{3,30}\\.herokuapp\\.com/$", "readOnly": true, "type": [ "string" ] }, "acm": { "description": "ACM status of this app", "default": false, "example": false, "readOnly": true, "type": [ "boolean" ] } }, "links": [ { "description": "Create a new app.", "href": "/apps", "method": "POST", "rel": "create", "schema": { "properties": { "name": { "$ref": "#/definitions/app/definitions/name" }, "region": { "$ref": "#/definitions/region/definitions/identity" }, "stack": { "$ref": "#/definitions/stack/definitions/identity" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/app" }, "title": "Create" }, { "description": "Delete an existing app.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/app" }, "title": "Delete" }, { "description": "Info for existing app.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/app" }, "title": "Info" }, { "description": "List existing apps.", "href": "/apps", "method": "GET", "ranges": [ "id", "name", "updated_at" ], "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/app" }, "type": [ "array" ] }, "title": "List" }, { "description": "List owned and collaborated apps (excludes team apps).", "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/apps", "method": "GET", "ranges": [ "id", "name", "updated_at" ], "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/app" }, "type": [ "array" ] }, "title": "List Owned and Collaborated" }, { "description": "Update an existing app.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "build_stack": { "$ref": "#/definitions/stack/definitions/identity" }, "maintenance": { "$ref": "#/definitions/app/definitions/maintenance" }, "name": { "$ref": "#/definitions/app/definitions/name" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/app" }, "title": "Update" }, { "description": "Enable ACM flag for an app", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/acm", "method": "POST", "rel": "update", "targetSchema": { "$ref": "#/definitions/app" }, "title": "Enable ACM" }, { "description": "Disable ACM flag for an app", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/acm", "method": "DELETE", "rel": "delete", "targetSchema": { "$ref": "#/definitions/app" }, "title": "Disable ACM" }, { "description": "Refresh ACM for an app", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/acm", "method": "PATCH", "rel": "update", "targetSchema": { "$ref": "#/definitions/app" }, "title": "Refresh ACM" } ], "properties": { "acm": { "$ref": "#/definitions/app/definitions/acm" }, "archived_at": { "$ref": "#/definitions/app/definitions/archived_at" }, "buildpack_provided_description": { "$ref": "#/definitions/app/definitions/buildpack_provided_description" }, "build_stack": { "description": "identity of the stack that will be used for new builds", "properties": { "id": { "$ref": "#/definitions/stack/definitions/id" }, "name": { "$ref": "#/definitions/stack/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/app/definitions/created_at" }, "git_url": { "$ref": "#/definitions/app/definitions/git_url" }, "id": { "$ref": "#/definitions/app/definitions/id" }, "internal_routing": { "$ref": "#/definitions/team-app/definitions/internal_routing" }, "maintenance": { "$ref": "#/definitions/app/definitions/maintenance" }, "name": { "$ref": "#/definitions/app/definitions/name" }, "owner": { "description": "identity of app owner", "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "id": { "$ref": "#/definitions/account/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "organization": { "description": "identity of team", "properties": { "id": { "$ref": "#/definitions/team/definitions/id" }, "name": { "$ref": "#/definitions/team/definitions/name" } }, "type": [ "null", "object" ] }, "team": { "description": "identity of team", "properties": { "id": { "$ref": "#/definitions/team/definitions/id" }, "name": { "$ref": "#/definitions/team/definitions/name" } }, "type": [ "null", "object" ] }, "region": { "description": "identity of app region", "properties": { "id": { "$ref": "#/definitions/region/definitions/id" }, "name": { "$ref": "#/definitions/region/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "released_at": { "$ref": "#/definitions/app/definitions/released_at" }, "repo_size": { "$ref": "#/definitions/app/definitions/repo_size" }, "slug_size": { "$ref": "#/definitions/app/definitions/slug_size" }, "space": { "description": "identity of space", "properties": { "id": { "$ref": "#/definitions/space/definitions/id" }, "name": { "$ref": "#/definitions/space/definitions/name" }, "shield": { "$ref": "#/definitions/space/definitions/shield" } }, "type": [ "null", "object" ] }, "stack": { "description": "identity of app stack", "properties": { "id": { "$ref": "#/definitions/stack/definitions/id" }, "name": { "$ref": "#/definitions/stack/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "updated_at": { "$ref": "#/definitions/app/definitions/updated_at" }, "web_url": { "$ref": "#/definitions/app/definitions/web_url" } } }, "archive": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Heroku Platform API - Audit Trail Archive", "description": "An audit trail archive represents a monthly json zipped file containing events", "stability": "production", "strictProperties": true, "type": [ "object" ], "definitions": { "id": { "description": "unique identifier of enterprise_account", "readOnly": true, "format": "uuid", "type": [ "string" ] }, "identity": { "$ref": "#/definitions/archive/definitions/id" }, "month": { "description": "month of the archive", "enum": [ "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" ], "example": "10", "readOnly": true, "type": [ "string" ] }, "year": { "description": "year of the archive", "example": 2019, "readOnly": true, "minimum": 2017, "type": [ "integer" ] }, "created_at": { "description": "when archive was created", "format": "date-time", "type": [ "string" ] }, "url": { "description": "url where to download the archive", "readOnly": true, "type": [ "string" ] }, "checksum": { "description": "checksum for the archive", "readOnly": true, "type": [ "string" ] }, "size": { "description": "size of the archive in bytes", "example": 100, "readOnly": true, "type": [ "integer" ] } }, "links": [ { "description": "Get archive for a single month.", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fidentity)}/archives/{(%23%2Fdefinitions%2Farchive%2Fdefinitions%2Fyear)}/{(%23%2Fdefinitions%2Farchive%2Fdefinitions%2Fmonth)}", "method": "GET", "rel": "self", "title": "Info" }, { "description": "List existing archives.", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fidentity)}/archives", "method": "GET", "rel": "instances", "title": "List" } ], "properties": { "created_at": { "$ref": "#/definitions/archive/definitions/created_at" }, "month": { "$ref": "#/definitions/archive/definitions/month" }, "year": { "$ref": "#/definitions/archive/definitions/year" }, "url": { "$ref": "#/definitions/archive/definitions/url" }, "checksum": { "$ref": "#/definitions/archive/definitions/checksum" }, "size": { "$ref": "#/definitions/archive/definitions/size" } } }, "audit-trail-event": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Heroku Platform API - Audit Trail Event", "description": "An audit trail event represents some action on the platform", "stability": "production", "strictProperties": true, "type": [ "object" ], "definitions": { "id": { "description": "unique identifier of event", "readOnly": true, "format": "uuid", "type": [ "string" ] }, "type": { "description": "type of event", "readOnly": true, "type": [ "string" ] }, "action": { "description": "action for the event", "readOnly": true, "type": [ "string" ] }, "actor": { "description": "user who caused event", "readOnly": true, "type": [ "object" ], "properties": { "id": { "format": "uuid", "type": [ "string" ] }, "email": { "format": "email", "type": [ "string" ] } } }, "app": { "description": "app upon which event took place", "readOnly": true, "type": [ "object" ], "properties": { "id": { "format": "uuid", "type": [ "string" ] }, "name": { "type": [ "string" ] } } }, "owner": { "description": "owner of the app targeted by the event", "readOnly": true, "type": [ "object" ], "properties": { "id": { "format": "uuid", "type": [ "string" ] }, "email": { "format": "email", "type": [ "string" ] } } }, "enterprise_account": { "description": "enterprise account on which the event happened", "readOnly": true, "type": [ "object" ], "properties": { "id": { "format": "uuid", "type": [ "string" ] }, "name": { "type": [ "string" ] } } }, "team": { "description": "team on which the event happened", "readOnly": true, "type": [ "object" ], "properties": { "id": { "format": "uuid", "type": [ "string" ] }, "name": { "type": [ "string" ] } } }, "request": { "description": "information about where the action was triggered", "readOnly": true, "type": [ "object" ], "properties": { "ip_address": { "format": "ipv4", "type": [ "string" ] } } }, "data": { "description": "data specific to the event", "readOnly": true, "type": [ "object" ] }, "created_at": { "description": "when event was created", "format": "date-time", "type": [ "string" ] } }, "links": [ { "description": "List existing events. Returns all events for one day, defaulting to current day. Order, actor, action, and type, and day query params can be specified as query parameters. For example, '/enterprise-accounts/:id/events?order=desc&actor=user@example.com&action=create&type=app&day=2020-09-30' would return events in descending order and only return app created events by the user with user@example.com email address.", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fidentity)}/events", "method": "GET", "rel": "instances", "title": "List" } ], "properties": { "created_at": { "$ref": "#/definitions/audit-trail-event/definitions/created_at" }, "id": { "$ref": "#/definitions/audit-trail-event/definitions/id" }, "type": { "$ref": "#/definitions/audit-trail-event/definitions/type" }, "action": { "$ref": "#/definitions/audit-trail-event/definitions/action" }, "actor": { "$ref": "#/definitions/audit-trail-event/definitions/actor" }, "app": { "$ref": "#/definitions/audit-trail-event/definitions/app" }, "owner": { "$ref": "#/definitions/audit-trail-event/definitions/owner" }, "enterprise_account": { "$ref": "#/definitions/audit-trail-event/definitions/enterprise_account" }, "team": { "$ref": "#/definitions/audit-trail-event/definitions/team" }, "request": { "$ref": "#/definitions/audit-trail-event/definitions/request" }, "data": { "$ref": "#/definitions/audit-trail-event/definitions/data" } } }, "build": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "A build represents the process of transforming a code tarball into a slug", "title": "Heroku Build API - Build", "stability": "production", "strictProperties": true, "type": [ "object" ], "definitions": { "buildpacks": { "description": "buildpacks executed for this build, in order", "type": [ "array", "null" ], "items": { "description": "Buildpack to execute in a build", "type": [ "object" ], "properties": { "url": { "description": "the URL of the buildpack for the app", "example": "https://github.com/heroku/heroku-buildpack-ruby", "readOnly": false, "type": [ "string" ] }, "name": { "description": "Buildpack Registry name of the buildpack for the app", "example": "heroku/ruby", "readOnly": false, "type": [ "string" ] } } } }, "created_at": { "description": "when build was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of build", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/build/definitions/id" } ] }, "output_stream_url": { "description": "Build process output will be available from this URL as a stream. The stream is available as either `text/plain` or `text/event-stream`. Clients should be prepared to handle disconnects and can resume the stream by sending a `Range` header (for `text/plain`) or a `Last-Event-Id` header (for `text/event-stream`).", "example": "https://build-output.heroku.com/streams/01234567-89ab-cdef-0123-456789abcdef", "readOnly": true, "type": [ "string" ] }, "release": { "description": "release resulting from the build", "strictProperties": true, "properties": { "id": { "$ref": "#/definitions/release/definitions/id" } }, "example": { "id": "01234567-89ab-cdef-0123-456789abcdef" }, "readOnly": true, "type": [ "null", "object" ], "definitions": { "id": { "description": "unique identifier of release", "example": "01234567-89ab-cdef-0123-456789abcdef", "type": [ "string" ] } } }, "source_blob": { "description": "location of gzipped tarball of source code used to create build", "properties": { "checksum": { "description": "an optional checksum of the gzipped tarball for verifying its integrity", "example": "SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "readOnly": true, "type": [ "null", "string" ] }, "url": { "description": "URL where gzipped tar archive of source code for build was downloaded.", "example": "https://example.com/source.tgz?token=xyz", "readOnly": true, "type": [ "string" ] }, "version": { "description": "Version of the gzipped tarball.", "example": "v1.3.0", "readOnly": true, "type": [ "string", "null" ] } }, "strictProperties": true, "type": [ "object" ] }, "stack": { "description": "stack of build", "example": "heroku-16", "readOnly": true, "type": [ "string" ] }, "status": { "description": "status of build", "enum": [ "failed", "pending", "succeeded" ], "example": "succeeded", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when build was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Create a new build.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/builds", "method": "POST", "rel": "create", "schema": { "type": [ "object" ], "properties": { "buildpacks": { "$ref": "#/definitions/build/definitions/buildpacks" }, "source_blob": { "$ref": "#/definitions/build/definitions/source_blob" } }, "required": [ "source_blob" ] }, "targetSchema": { "$ref": "#/definitions/build" }, "title": "Create" }, { "description": "Info for existing build.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/builds/{(%23%2Fdefinitions%2Fbuild%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/build" }, "title": "Info" }, { "description": "List existing build.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/builds", "method": "GET", "ranges": [ "id", "started_at" ], "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/build" }, "type": [ "array" ] }, "title": "List" }, { "description": "Destroy a build cache.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/build-cache", "method": "DELETE", "rel": "empty", "title": "Delete cache" } ], "properties": { "app": { "description": "app that the build belongs to", "properties": { "id": { "$ref": "#/definitions/app/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "buildpacks": { "$ref": "#/definitions/build/definitions/buildpacks" }, "created_at": { "$ref": "#/definitions/build/definitions/created_at" }, "id": { "$ref": "#/definitions/build/definitions/id" }, "output_stream_url": { "$ref": "#/definitions/build/definitions/output_stream_url" }, "source_blob": { "$ref": "#/definitions/build/definitions/source_blob" }, "release": { "$ref": "#/definitions/build/definitions/release" }, "slug": { "description": "slug created by this build", "properties": { "id": { "$ref": "#/definitions/slug/definitions/id" } }, "strictProperties": true, "type": [ "object", "null" ] }, "stack": { "$ref": "#/definitions/build/definitions/stack" }, "status": { "$ref": "#/definitions/build/definitions/status" }, "updated_at": { "$ref": "#/definitions/build/definitions/updated_at" }, "user": { "description": "user that started the build", "properties": { "id": { "$ref": "#/definitions/account/definitions/id" }, "email": { "$ref": "#/definitions/account/definitions/email" } }, "strictProperties": true, "type": [ "object" ] } } }, "buildpack-installation": { "description": "A buildpack installation represents a buildpack that will be run against an app.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Buildpack Installations", "type": [ "object" ], "definitions": { "ordinal": { "description": "determines the order in which the buildpacks will execute", "example": 0, "readOnly": true, "type": [ "integer" ] }, "update": { "additionalProperties": false, "description": "Properties to update a buildpack installation", "properties": { "buildpack": { "$ref": "#/definitions/buildpack-installation/definitions/url" } }, "readOnly": false, "required": [ "buildpack" ], "type": [ "object" ] }, "url": { "description": "location of the buildpack for the app. Either a url (unofficial buildpacks) or an internal urn (heroku official buildpacks).", "example": "https://github.com/heroku/heroku-buildpack-ruby", "readOnly": false, "type": [ "string" ] }, "name": { "description": "either the Buildpack Registry name or a URL of the buildpack for the app", "example": "heroku/ruby", "readOnly": false, "type": [ "string" ] } }, "links": [ { "description": "Update an app's buildpack installations.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/buildpack-installations", "method": "PUT", "rel": "update", "schema": { "properties": { "updates": { "description": "The buildpack attribute can accept a name, a url, or a urn.", "items": { "$ref": "#/definitions/buildpack-installation/definitions/update" }, "type": [ "array" ] } }, "required": [ "updates" ], "type": [ "object" ] }, "targetSchema": { "items": { "$ref": "#/definitions/buildpack-installation" }, "type": [ "array" ] }, "title": "Update" }, { "description": "List an app's existing buildpack installations.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/buildpack-installations", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/buildpack-installation" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "ordinal": { "$ref": "#/definitions/buildpack-installation/definitions/ordinal" }, "buildpack": { "description": "buildpack", "properties": { "url": { "$ref": "#/definitions/buildpack-installation/definitions/url" }, "name": { "$ref": "#/definitions/buildpack-installation/definitions/name" } }, "type": [ "object" ] } } }, "collaborator": { "description": "A collaborator represents an account that has been given access to an app on Heroku.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "additionalProperties": false, "required": [ "app", "created_at", "id", "updated_at", "user" ], "stability": "production", "title": "Heroku Platform API - Collaborator", "type": [ "object" ], "definitions": { "created_at": { "description": "when collaborator was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "email": { "description": "invited email address of collaborator", "example": "collaborator@example.com", "format": "email", "readOnly": false, "type": [ "string" ] }, "id": { "description": "unique identifier of collaborator", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/collaborator/definitions/email" }, { "$ref": "#/definitions/collaborator/definitions/id" } ] }, "silent": { "default": false, "description": "whether to suppress email invitation when creating collaborator", "example": false, "readOnly": false, "type": [ "boolean" ] }, "updated_at": { "description": "when collaborator was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Create a new collaborator.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators", "method": "POST", "rel": "create", "schema": { "properties": { "silent": { "$ref": "#/definitions/collaborator/definitions/silent" }, "user": { "$ref": "#/definitions/account/definitions/identity" } }, "required": [ "user" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/collaborator" }, "title": "Create" }, { "description": "Delete an existing collaborator.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Fcollaborator%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/collaborator" }, "title": "Delete" }, { "description": "Info for existing collaborator.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Fcollaborator%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/collaborator" }, "title": "Info" }, { "description": "List existing collaborators.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/collaborator" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "app": { "description": "app collaborator belongs to", "properties": { "name": { "$ref": "#/definitions/app/definitions/name" }, "id": { "$ref": "#/definitions/app/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/collaborator/definitions/created_at" }, "id": { "$ref": "#/definitions/collaborator/definitions/id" }, "permissions": { "type": [ "array" ], "items": { "$ref": "#/definitions/team-app-permission" } }, "role": { "$ref": "#/definitions/team/definitions/role" }, "updated_at": { "$ref": "#/definitions/collaborator/definitions/updated_at" }, "user": { "description": "identity of collaborated account", "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "federated": { "$ref": "#/definitions/account/definitions/federated" }, "id": { "$ref": "#/definitions/account/definitions/id" } }, "strictProperties": true, "type": [ "object" ] } } }, "config-var": { "description": "Config Vars allow you to manage the configuration information provided to an app on Heroku.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Config Vars", "type": [ "object" ], "definitions": { "config_vars": { "additionalProperties": false, "description": "hash of config vars", "example": { "FOO": "bar", "BAZ": "qux" }, "patternProperties": { "^\\w+$": { "type": [ "string", "null" ] } }, "type": [ "object" ] } }, "links": [ { "description": "Get config-vars for app.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/config-vars", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/config-var/definitions/config_vars" }, "title": "Info for App" }, { "description": "Get config-vars for a release.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases/{(%23%2Fdefinitions%2Frelease%2Fdefinitions%2Fidentity)}/config-vars", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/config-var/definitions/config_vars" }, "title": "Info for App Release" }, { "description": "Update config-vars for app. You can update existing config-vars by setting them again, and remove by setting it to `null`.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/config-vars", "method": "PATCH", "rel": "update", "schema": { "additionalProperties": false, "description": "hash of config changes – update values or delete by seting it to `null`", "example": { "FOO": "bar", "BAZ": "qux" }, "patternProperties": { "^\\w+$": { "type": [ "string", "null" ] } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/config-var/definitions/config_vars" }, "title": "Update" } ], "example": { "FOO": "bar", "BAZ": "qux" }, "patternProperties": { "^\\w+$": { "type": [ "string" ] } } }, "credit": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "A credit represents value that will be used up before further charges are assigned to an account.", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Credit", "type": [ "object" ], "definitions": { "amount": { "description": "total value of credit in cents", "example": 10000, "type": [ "number" ] }, "balance": { "description": "remaining value of credit in cents", "example": 5000, "type": [ "number" ] }, "created_at": { "description": "when credit was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "type": [ "string" ] }, "expires_at": { "description": "when credit will expire", "example": "2012-01-01T12:00:00Z", "format": "date-time", "type": [ "string" ] }, "id": { "description": "unique identifier of credit", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/credit/definitions/id" } ] }, "title": { "description": "a name for credit", "example": "gift card", "type": [ "string" ] }, "updated_at": { "description": "when credit was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "type": [ "string" ] } }, "links": [ { "description": "Create a new credit.", "href": "/account/credits", "method": "POST", "rel": "create", "schema": { "properties": { "code1": { "description": "first code from a discount card", "example": "012abc", "type": [ "string" ] }, "code2": { "description": "second code from a discount card", "example": "012abc", "type": [ "string" ] } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/credit" }, "title": "Create" }, { "description": "Info for existing credit.", "href": "/account/credits/{(%23%2Fdefinitions%2Fcredit%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/credit" }, "title": "Info" }, { "description": "List existing credits.", "href": "/account/credits", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/credit" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "amount": { "$ref": "#/definitions/credit/definitions/amount" }, "balance": { "$ref": "#/definitions/credit/definitions/balance" }, "created_at": { "$ref": "#/definitions/credit/definitions/created_at" }, "expires_at": { "$ref": "#/definitions/credit/definitions/expires_at" }, "id": { "$ref": "#/definitions/credit/definitions/id" }, "title": { "$ref": "#/definitions/credit/definitions/title" }, "updated_at": { "$ref": "#/definitions/credit/definitions/updated_at" } } }, "domain": { "description": "Domains define what web routes should be routed to an app on Heroku.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Domain", "type": [ "object" ], "definitions": { "acm_status": { "description": "status of this record's ACM", "example": "pending", "readOnly": true, "type": [ "null", "string" ] }, "acm_status_reason": { "description": "reason for the status of this record's ACM", "example": "Failing CCA check", "readOnly": true, "type": [ "null", "string" ] }, "created_at": { "description": "when domain was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "cname": { "description": "canonical name record, the address to point a domain at", "example": "example.herokudns.com", "readOnly": true, "type": [ "null", "string" ] }, "status": { "description": "status of this record's cname", "example": "pending", "readOnly": true, "type": [ "string" ] }, "hostname": { "description": "full hostname", "example": "subdomain.example.com", "format": "uri", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of this domain", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/domain/definitions/id" }, { "$ref": "#/definitions/domain/definitions/hostname" } ] }, "kind": { "description": "type of domain name", "enum": [ "heroku", "custom" ], "example": "custom", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when domain was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "sni_endpoint": { "description": "null or unique identifier or name for SNI endpoint", "type": [ "null", "string" ] } }, "links": [ { "deactivate_on": "2021-10-31", "description": "Create a new domain. Deprecated in favor of this same endpoint, but with a new required attribute of `sni_endpoint`. During the transitional phase sni_endpoint can be omitted entirely (current behavior), can be a valid id, or can be null which will skip auto-association.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains", "method": "POST", "rel": "create", "schema": { "properties": { "hostname": { "$ref": "#/definitions/domain/definitions/hostname" } }, "required": [ "hostname" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/domain" }, "title": "Create - Deprecated" }, { "description": "Create a new domain.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains", "method": "POST", "rel": "create", "schema": { "properties": { "hostname": { "$ref": "#/definitions/domain/definitions/hostname" }, "sni_endpoint": { "$ref": "#/definitions/domain/definitions/sni_endpoint" } }, "required": [ "hostname", "sni_endpoint" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/domain" }, "title": "Create" }, { "description": "Associate an SNI endpoint", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains/{(%23%2Fdefinitions%2Fdomain%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "sni_endpoint": { "$ref": "#/definitions/domain/definitions/sni_endpoint" } }, "required": [ "sni_endpoint" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/domain" }, "title": "Update" }, { "description": "Delete an existing domain", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains/{(%23%2Fdefinitions%2Fdomain%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/domain" }, "title": "Delete" }, { "description": "Info for existing domain.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains/{(%23%2Fdefinitions%2Fdomain%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/domain" }, "title": "Info" }, { "description": "List existing domains.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/domain" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "acm_status": { "$ref": "#/definitions/domain/definitions/acm_status" }, "acm_status_reason": { "$ref": "#/definitions/domain/definitions/acm_status_reason" }, "app": { "description": "app that owns the domain", "properties": { "name": { "$ref": "#/definitions/app/definitions/name" }, "id": { "$ref": "#/definitions/app/definitions/id" } }, "type": [ "object" ] }, "cname": { "$ref": "#/definitions/domain/definitions/cname" }, "created_at": { "$ref": "#/definitions/domain/definitions/created_at" }, "hostname": { "$ref": "#/definitions/domain/definitions/hostname" }, "id": { "$ref": "#/definitions/domain/definitions/id" }, "kind": { "$ref": "#/definitions/domain/definitions/kind" }, "updated_at": { "$ref": "#/definitions/domain/definitions/updated_at" }, "status": { "$ref": "#/definitions/domain/definitions/status" }, "sni_endpoint": { "description": "sni endpoint the domain is associated with", "properties": { "name": { "$ref": "#/definitions/sni-endpoint/definitions/name" }, "id": { "$ref": "#/definitions/sni-endpoint/definitions/id" } }, "type": [ "null", "object" ] } } }, "dyno-size": { "description": "Dyno sizes are the values and details of sizes that can be assigned to dynos. This information can also be found at : [https://devcenter.heroku.com/articles/dyno-types](https://devcenter.heroku.com/articles/dyno-types).", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "prototype", "strictProperties": true, "title": "Heroku Platform API - Dyno Size", "type": [ "object" ], "definitions": { "compute": { "description": "minimum vCPUs, non-dedicated may get more depending on load", "example": 1, "readOnly": true, "type": [ "integer" ] }, "dedicated": { "description": "whether this dyno will be dedicated to one user", "example": false, "readOnly": true, "type": [ "boolean" ] }, "id": { "description": "unique identifier of this dyno size", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/dyno-size/definitions/id" }, { "$ref": "#/definitions/dyno-size/definitions/name" } ] }, "memory": { "description": "amount of RAM in GB", "example": 0.5, "readOnly": true, "type": [ "number" ] }, "name": { "description": "the name of this dyno-size", "example": "free", "readOnly": true, "type": [ "string" ] }, "cost": { "description": "price information for this dyno size", "readOnly": true, "type": [ "null", "object" ], "definitions": { "cents": { "description": "price in cents per unit time", "example": 0, "readOnly": true, "type": [ "integer" ] }, "unit": { "description": "unit of price for dyno", "readOnly": true, "example": "month", "type": [ "string" ] } } }, "dyno_units": { "description": "unit of consumption for Heroku Enterprise customers", "example": 0, "readOnly": true, "type": [ "integer" ] }, "private_space_only": { "description": "whether this dyno can only be provisioned in a private space", "example": false, "readOnly": true, "type": [ "boolean" ] } }, "links": [ { "description": "Info for existing dyno size.", "href": "/dyno-sizes/{(%23%2Fdefinitions%2Fdyno-size%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/dyno-size" }, "title": "Info" }, { "description": "List existing dyno sizes.", "href": "/dyno-sizes", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/dyno-size" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "compute": { "$ref": "#/definitions/dyno-size/definitions/compute" }, "cost": { "$ref": "#/definitions/dyno-size/definitions/cost" }, "dedicated": { "$ref": "#/definitions/dyno-size/definitions/dedicated" }, "dyno_units": { "$ref": "#/definitions/dyno-size/definitions/dyno_units" }, "id": { "$ref": "#/definitions/dyno-size/definitions/id" }, "memory": { "$ref": "#/definitions/dyno-size/definitions/memory" }, "name": { "$ref": "#/definitions/dyno-size/definitions/name" }, "private_space_only": { "$ref": "#/definitions/dyno-size/definitions/private_space_only" } } }, "dyno": { "description": "Dynos encapsulate running processes of an app on Heroku. Detailed information about dyno sizes can be found at: [https://devcenter.heroku.com/articles/dyno-types](https://devcenter.heroku.com/articles/dyno-types).", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Dyno", "type": [ "object" ], "definitions": { "attach": { "description": "whether to stream output or not", "example": true, "readOnly": false, "type": [ "boolean" ] }, "attach_url": { "description": "a URL to stream output from for attached processes or null for non-attached processes", "example": "rendezvous://rendezvous.runtime.heroku.com:5000/{rendezvous-id}", "readOnly": true, "type": [ "string", "null" ] }, "command": { "description": "command used to start this process", "example": "bash", "readOnly": false, "type": [ "string" ] }, "created_at": { "description": "when dyno was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "env": { "additionalProperties": false, "description": "custom environment to add to the dyno config vars", "example": { "COLUMNS": "80", "LINES": "24" }, "patternProperties": { "^\\w+$": { "type": [ "string" ] } }, "readOnly": false, "strictProperties": true, "type": [ "object" ] }, "id": { "description": "unique identifier of this dyno", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/dyno/definitions/id" }, { "$ref": "#/definitions/dyno/definitions/name" } ] }, "name": { "description": "the name of this process on this dyno", "example": "run.1", "readOnly": true, "type": [ "string" ] }, "force_no_tty": { "description": "force an attached one-off dyno to not run in a tty", "example": null, "readOnly": false, "type": [ "boolean", "null" ] }, "size": { "description": "dyno size (default: \"standard-1X\")", "example": "standard-1X", "readOnly": false, "type": [ "string" ] }, "state": { "description": "current status of process (either: crashed, down, idle, starting, or up)", "example": "up", "readOnly": true, "type": [ "string" ] }, "type": { "description": "type of process", "example": "run", "readOnly": false, "type": [ "string" ] }, "time_to_live": { "description": "seconds until dyno expires, after which it will soon be killed, max 86400 seconds (24 hours)", "example": 1800, "readOnly": false, "type": [ "integer" ] }, "updated_at": { "description": "when process last changed state", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Create a new dyno.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos", "method": "POST", "rel": "create", "schema": { "properties": { "attach": { "$ref": "#/definitions/dyno/definitions/attach" }, "command": { "$ref": "#/definitions/dyno/definitions/command" }, "env": { "$ref": "#/definitions/dyno/definitions/env" }, "force_no_tty": { "$ref": "#/definitions/dyno/definitions/force_no_tty" }, "size": { "$ref": "#/definitions/dyno/definitions/size" }, "type": { "$ref": "#/definitions/dyno/definitions/type" }, "time_to_live": { "$ref": "#/definitions/dyno/definitions/time_to_live" } }, "required": [ "command" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/dyno" }, "title": "Create" }, { "description": "Restart dyno.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos/{(%23%2Fdefinitions%2Fdyno%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "empty", "targetSchema": { "additionalProperties": false, "type": [ "object" ] }, "title": "Restart" }, { "description": "Restart all dynos.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos", "method": "DELETE", "rel": "empty", "targetSchema": { "additionalProperties": false, "type": [ "object" ] }, "title": "Restart all" }, { "description": "Stop dyno.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos/{(%23%2Fdefinitions%2Fdyno%2Fdefinitions%2Fidentity)}/actions/stop", "method": "POST", "rel": "empty", "targetSchema": { "additionalProperties": false, "type": [ "object" ] }, "title": "Stop" }, { "description": "Info for existing dyno.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos/{(%23%2Fdefinitions%2Fdyno%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/dyno" }, "title": "Info" }, { "description": "List existing dynos.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/dyno" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "attach_url": { "$ref": "#/definitions/dyno/definitions/attach_url" }, "command": { "$ref": "#/definitions/dyno/definitions/command" }, "created_at": { "$ref": "#/definitions/dyno/definitions/created_at" }, "id": { "$ref": "#/definitions/dyno/definitions/id" }, "name": { "$ref": "#/definitions/dyno/definitions/name" }, "release": { "description": "app release of the dyno", "properties": { "id": { "$ref": "#/definitions/release/definitions/id" }, "version": { "$ref": "#/definitions/release/definitions/version" } }, "strictProperties": true, "type": [ "object" ] }, "app": { "description": "app formation belongs to", "properties": { "name": { "$ref": "#/definitions/app/definitions/name" }, "id": { "$ref": "#/definitions/app/definitions/id" } }, "type": [ "object" ] }, "size": { "$ref": "#/definitions/dyno/definitions/size" }, "state": { "$ref": "#/definitions/dyno/definitions/state" }, "type": { "$ref": "#/definitions/dyno/definitions/type" }, "updated_at": { "$ref": "#/definitions/dyno/definitions/updated_at" } } }, "enterprise-account-daily-usage": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "Usage for an enterprise account at a daily resolution.", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Enterprise Account Daily Usage", "type": [ "object" ], "definitions": { "addons": { "description": "total add-on credits used", "example": 250.0, "readOnly": true, "type": [ "number" ] }, "data": { "description": "total add-on credits used for first party add-ons", "example": 34.89, "readOnly": true, "type": [ "number" ] }, "date": { "description": "date of the usage", "example": "2019-01-01", "format": "date", "readOnly": true, "type": [ "string" ] }, "dynos": { "description": "dynos used", "example": 1.548, "readOnly": true, "type": [ "number" ] }, "id": { "description": "enterprise account identifier", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "name": { "description": "name of the enterprise account", "example": "example-co", "readOnly": true, "type": [ "string" ] }, "partner": { "description": "total add-on credits used for third party add-ons", "example": 12.34, "readOnly": true, "type": [ "number" ] }, "space": { "description": "space credits used", "example": 1.548, "readOnly": true, "type": [ "number" ] }, "start_date": { "description": "range start date", "example": "2019-01-25", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$", "readOnly": true, "type": [ "string" ] }, "end_date": { "description": "range end date", "example": "2019-02-25", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Retrieves usage for an enterprise account for a range of days. Start and end dates can be specified as query parameters using the date format YYYY-MM-DD.\nThe enterprise account identifier can be found from the [enterprise account list](https://devcenter.heroku.com/articles/platform-api-reference#enterprise-account-list).\n", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fid)}/usage/daily", "method": "GET", "rel": "instances", "title": "Info", "schema": { "properties": { "start": { "$ref": "#/definitions/enterprise-account-daily-usage/definitions/start_date" }, "end": { "$ref": "#/definitions/enterprise-account-daily-usage/definitions/end_date" } }, "required": [ "start" ], "type": [ "object" ] }, "targetSchema": { "items": { "$ref": "#/definitions/enterprise-account-daily-usage" }, "type": [ "array" ] } } ], "properties": { "addons": { "$ref": "#/definitions/enterprise-account-daily-usage/definitions/addons" }, "teams": { "description": "usage by team", "type": [ "array" ], "items": { "type": [ "object" ], "properties": { "addons": { "$ref": "#/definitions/team-daily-usage/definitions/addons" }, "apps": { "description": "app usage in the team", "type": [ "array" ], "items": { "$ref": "#/definitions/team-daily-usage/definitions/app_usage_daily" } }, "data": { "$ref": "#/definitions/team-daily-usage/definitions/data" }, "dynos": { "$ref": "#/definitions/team-daily-usage/definitions/dynos" }, "id": { "$ref": "#/definitions/team-daily-usage/definitions/id" }, "name": { "$ref": "#/definitions/team-daily-usage/definitions/name" }, "partner": { "$ref": "#/definitions/team-daily-usage/definitions/partner" }, "space": { "$ref": "#/definitions/team-daily-usage/definitions/space" } } } }, "data": { "$ref": "#/definitions/enterprise-account-daily-usage/definitions/data" }, "date": { "$ref": "#/definitions/enterprise-account-daily-usage/definitions/date" }, "dynos": { "$ref": "#/definitions/enterprise-account-daily-usage/definitions/dynos" }, "id": { "$ref": "#/definitions/enterprise-account-daily-usage/definitions/id" }, "name": { "$ref": "#/definitions/enterprise-account-daily-usage/definitions/name" }, "partner": { "$ref": "#/definitions/enterprise-account-daily-usage/definitions/partner" }, "space": { "$ref": "#/definitions/enterprise-account-daily-usage/definitions/space" } } }, "enterprise-account-member": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "Enterprise account members are users with access to an enterprise account.", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Enterprise Account Member", "type": [ "object" ], "definitions": { "id": { "description": "unique identifier of the member", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/enterprise-account-member/definitions/id" } ] }, "permission": { "description": "permission in the enterprise account", "enum": [ "view", "create", "manage", "billing" ], "example": "view", "readOnly": true, "type": [ "string" ] }, "permissions": { "description": "permissions for enterprise account", "example": [ "view" ], "readOnly": true, "type": [ "array" ], "items": { "$ref": "#/definitions/enterprise-account-member/definitions/permission" } }, "expanded_permissions": { "description": "enterprise account permissions", "type": [ "array" ], "items": { "type": [ "object" ], "properties": { "description": { "type": [ "string" ], "example": "View enterprise account members and teams." }, "name": { "$ref": "#/definitions/enterprise-account-member/definitions/permission", "example": "view" } } } }, "user_identity": { "anyOf": [ { "$ref": "#/definitions/account/definitions/email" }, { "$ref": "#/definitions/account/definitions/id" } ] }, "two_factor_authentication": { "description": "whether the Enterprise Account member has two factor authentication enabled", "example": true, "readOnly": true, "type": [ "boolean" ] }, "identity_provider": { "description": "Identity Provider information the member is federated with", "properties": { "id": { "$ref": "#/definitions/identity-provider/definitions/id" }, "name": { "description": "name of the identity provider", "example": "acme", "readOnly": true, "type": [ "string" ] }, "redacted": { "description": "whether the identity_provider information is redacted or not", "example": false, "readOnly": true, "type": [ "boolean" ] }, "owner": { "$ref": "#/definitions/identity-provider/definitions/owner" } }, "type": [ "null", "object" ] } }, "links": [ { "description": "List members in an enterprise account.", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fidentity)}/members", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/enterprise-account-member" }, "type": [ "array" ] }, "title": "List" }, { "description": "Create a member in an enterprise account.", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fidentity)}/members", "method": "POST", "rel": "create", "schema": { "properties": { "user": { "$ref": "#/definitions/enterprise-account-member/definitions/user_identity" }, "permissions": { "$ref": "#/definitions/enterprise-account-member/definitions/permissions" }, "federated": { "description": "whether membership is being created as part of SSO JIT", "example": false, "type": [ "boolean" ] } }, "required": [ "user", "permissions" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/enterprise-account-member" }, "title": "Create" }, { "description": "Update a member in an enterprise account.", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fidentity)}/members/{(%23%2Fdefinitions%2Fenterprise-account-member%2Fdefinitions%2Fuser_identity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "permissions": { "$ref": "#/definitions/enterprise-account-member/definitions/permissions" } }, "required": [ "permissions" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/enterprise-account-member" }, "title": "Update" }, { "description": "delete a member in an enterprise account.", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fidentity)}/members/{(%23%2Fdefinitions%2Fenterprise-account-member%2Fdefinitions%2Fuser_identity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/enterprise-account-member" }, "title": "Delete" } ], "properties": { "enterprise_account": { "type": [ "object" ], "properties": { "id": { "$ref": "#/definitions/enterprise-account/definitions/id" }, "name": { "$ref": "#/definitions/enterprise-account/definitions/name" } } }, "id": { "$ref": "#/definitions/enterprise-account-member/definitions/id" }, "permissions": { "$ref": "#/definitions/enterprise-account-member/definitions/expanded_permissions" }, "user": { "description": "user information for the membership", "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "id": { "$ref": "#/definitions/account/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "two_factor_authentication": { "$ref": "#/definitions/enterprise-account-member/definitions/two_factor_authentication" }, "identity_provider": { "$ref": "#/definitions/enterprise-account-member/definitions/identity_provider" } } }, "enterprise-account-monthly-usage": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "Usage for an enterprise account at a monthly resolution.", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Enterprise Account Monthly Usage", "type": [ "object" ], "definitions": { "addons": { "description": "total add-on credits used", "example": 250.0, "readOnly": true, "type": [ "number" ] }, "connect": { "description": "average connect rows synced", "example": 15000, "readOnly": true, "type": [ "number" ] }, "data": { "description": "total add-on credits used for first party add-ons", "example": 34.89, "readOnly": true, "type": [ "number" ] }, "dynos": { "description": "dynos used", "example": 1.548, "readOnly": true, "type": [ "number" ] }, "month": { "description": "year and month of the usage", "example": "2019-01", "pattern": "^[0-9]{4}-[0-9]{2}$", "readOnly": true, "type": [ "string" ] }, "id": { "description": "enterprise account identifier", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "name": { "description": "name of the enterprise account", "example": "example-co", "readOnly": true, "type": [ "string" ] }, "partner": { "description": "total add-on credits used for third party add-ons", "example": 12.34, "readOnly": true, "type": [ "number" ] }, "space": { "description": "space credits used", "example": 1.548, "readOnly": true, "type": [ "number" ] }, "start_date": { "description": "range start date", "example": "2019-01", "pattern": "^[0-9]{4}-[0-9]{2}$", "readOnly": true, "type": [ "string" ] }, "end_date": { "description": "range end date", "example": "2019-02", "pattern": "^[0-9]{4}-[0-9]{2}$", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Retrieves usage for an enterprise account for a range of months. Start and end dates can be specified as query parameters using the date format YYYY-MM. If no end date is specified, one month of usage is returned.\nThe enterprise account identifier can be found from the [enterprise account list](https://devcenter.heroku.com/articles/platform-api-reference#enterprise-account-list).\n", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fid)}/usage/monthly", "method": "GET", "rel": "instances", "title": "Info", "schema": { "properties": { "start": { "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/start_date" }, "end": { "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/end_date" } }, "required": [ "start" ], "type": [ "object" ] }, "targetSchema": { "items": { "$ref": "#/definitions/enterprise-account-monthly-usage" }, "type": [ "array" ] } } ], "properties": { "addons": { "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/addons" }, "teams": { "description": "usage by team", "type": [ "array" ], "items": { "type": [ "object" ], "properties": { "addons": { "$ref": "#/definitions/team-monthly-usage/definitions/addons" }, "apps": { "description": "app usage in the team", "type": [ "array" ], "items": { "$ref": "#/definitions/team-monthly-usage/definitions/app_usage_monthly" } }, "connect": { "$ref": "#/definitions/team-monthly-usage/definitions/connect" }, "data": { "$ref": "#/definitions/team-monthly-usage/definitions/data" }, "dynos": { "$ref": "#/definitions/team-monthly-usage/definitions/dynos" }, "id": { "$ref": "#/definitions/team-monthly-usage/definitions/id" }, "name": { "$ref": "#/definitions/team-monthly-usage/definitions/name" }, "partner": { "$ref": "#/definitions/team-monthly-usage/definitions/partner" }, "space": { "$ref": "#/definitions/team-monthly-usage/definitions/space" } } } }, "connect": { "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/connect" }, "data": { "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/data" }, "dynos": { "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/dynos" }, "id": { "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/id" }, "month": { "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/month" }, "name": { "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/name" }, "partner": { "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/partner" }, "space": { "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/space" } } }, "enterprise-account": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "Enterprise accounts allow companies to manage their development teams and billing.", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Enterprise Account", "type": [ "object" ], "definitions": { "created_at": { "description": "when the enterprise account was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of the enterprise account", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/enterprise-account/definitions/id" } ] }, "identity_provider": { "description": "Identity Provider associated with the Enterprise Account", "strictProperties": true, "type": [ "null", "object" ], "properties": { "id": { "$ref": "#/definitions/identity-provider/definitions/id" }, "name": { "$ref": "#/definitions/identity-provider/definitions/name" }, "owner": { "$ref": "#/definitions/identity-provider/definitions/owner" } } }, "name": { "description": "unique name of the enterprise account", "example": "example", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when the enterprise account was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "permissions": { "description": "the current user's permissions for this enterprise account", "readOnly": true, "type": [ "array" ], "items": { "example": "view", "type": [ "string" ] } }, "trial": { "description": "whether the enterprise account is a trial or not", "example": false, "readOnly": true, "type": [ "boolean" ] } }, "links": [ { "description": "List enterprise accounts in which you are a member.", "href": "/enterprise-accounts", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/enterprise-account" }, "type": [ "array" ] }, "title": "List" }, { "description": "Information about an enterprise account.", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "title": "Info" }, { "description": "Update enterprise account properties", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fidentity)}", "method": "PATCH", "schema": { "properties": { "name": { "$ref": "#/definitions/enterprise-account/definitions/name" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/enterprise-account" }, "title": "Update" } ], "properties": { "id": { "$ref": "#/definitions/enterprise-account/definitions/id" }, "created_at": { "$ref": "#/definitions/enterprise-account/definitions/created_at" }, "name": { "$ref": "#/definitions/enterprise-account/definitions/name" }, "updated_at": { "$ref": "#/definitions/enterprise-account/definitions/updated_at" }, "permissions": { "$ref": "#/definitions/enterprise-account/definitions/permissions" }, "trial": { "$ref": "#/definitions/enterprise-account/definitions/trial" }, "identity_provider": { "$ref": "#/definitions/enterprise-account/definitions/identity_provider" } } }, "filter-apps": { "description": "Filters are special endpoints to allow for API consumers to specify a subset of resources to consume in order to reduce the number of requests that are performed. Each filter endpoint endpoint is responsible for determining its supported request format. The endpoints are over POST in order to handle large request bodies without hitting request uri query length limitations, but the requests themselves are idempotent and will not have side effects.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "development", "title": "Heroku Platform API - Filters", "type": [ "object" ], "definitions": { "filter": { "type": [ "object" ], "properties": { "in": { "$ref": "#/definitions/filter-apps/definitions/in" } } }, "in": { "type": [ "object" ], "properties": { "id": { "$ref": "#/definitions/filter-apps/definitions/id" } } }, "id": { "type": [ "array" ], "items": { "$ref": "#/definitions/app/definitions/id" } } }, "links": [ { "description": "Request an apps list filtered by app id.", "title": "Apps", "href": "/filters/apps", "method": "POST", "ranges": [ "id", "name", "updated_at" ], "rel": "instances", "schema": { "$ref": "#/definitions/filter-apps/definitions/filter" }, "targetSchema": { "items": { "$ref": "#/definitions/team-app" }, "type": [ "array" ] } } ] }, "formation": { "description": "The formation of processes that should be maintained for an app. Update the formation to scale processes or change dyno sizes. Available process type names and commands are defined by the `process_types` attribute for the [slug](#slug) currently released on an app.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Formation", "type": [ "object" ], "definitions": { "command": { "description": "command to use to launch this process", "example": "bundle exec rails server -p $PORT", "readOnly": false, "type": [ "string" ] }, "created_at": { "description": "when process type was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of this process type", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/formation/definitions/id" }, { "$ref": "#/definitions/formation/definitions/type" } ] }, "quantity": { "description": "number of processes to maintain", "example": 1, "readOnly": false, "type": [ "integer" ] }, "size": { "description": "dyno size (default: \"standard-1X\")", "example": "standard-1X", "readOnly": false, "type": [ "string" ] }, "type": { "description": "type of process to maintain", "example": "web", "readOnly": true, "pattern": "^[-\\w]{1,128}$", "type": [ "string" ] }, "updated_at": { "description": "when dyno type was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "update": { "additionalProperties": false, "description": "Properties to update a process type", "properties": { "quantity": { "$ref": "#/definitions/formation/definitions/quantity" }, "size": { "$ref": "#/definitions/formation/definitions/size" }, "type": { "$ref": "#/definitions/formation/definitions/type" } }, "readOnly": false, "required": [ "type" ], "type": [ "object" ] } }, "links": [ { "description": "Info for a process type", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/formation/{(%23%2Fdefinitions%2Fformation%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/formation" }, "title": "Info" }, { "description": "List process type formation", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/formation", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/formation" }, "type": [ "array" ] }, "title": "List" }, { "description": "Batch update process types", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/formation", "method": "PATCH", "rel": "update", "schema": { "properties": { "updates": { "type": [ "array" ], "items": { "$ref": "#/definitions/formation/definitions/update" }, "description": "Array with formation updates. Each element must have \"type\", the id or name of the process type to be updated, and can optionally update its \"quantity\" or \"size\"." } }, "required": [ "updates" ], "type": [ "object" ] }, "targetSchema": { "items": { "$ref": "#/definitions/formation" }, "type": [ "array" ] }, "title": "Batch Update" }, { "description": "Update process type", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/formation/{(%23%2Fdefinitions%2Fformation%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "quantity": { "$ref": "#/definitions/formation/definitions/quantity" }, "size": { "$ref": "#/definitions/formation/definitions/size" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/formation" }, "title": "Update", "type": [ "object" ] } ], "properties": { "app": { "description": "app formation belongs to", "properties": { "name": { "$ref": "#/definitions/app/definitions/name" }, "id": { "$ref": "#/definitions/app/definitions/id" } }, "type": [ "object" ] }, "command": { "$ref": "#/definitions/formation/definitions/command" }, "created_at": { "$ref": "#/definitions/formation/definitions/created_at" }, "id": { "$ref": "#/definitions/formation/definitions/id" }, "quantity": { "$ref": "#/definitions/formation/definitions/quantity" }, "size": { "$ref": "#/definitions/formation/definitions/size" }, "type": { "$ref": "#/definitions/formation/definitions/type" }, "updated_at": { "$ref": "#/definitions/formation/definitions/updated_at" } } }, "identity-provider": { "description": "Identity Providers represent the SAML configuration of an Enterprise Account or Team.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Identity Provider", "type": [ "object" ], "definitions": { "certificate": { "description": "raw contents of the public certificate (eg: .crt or .pem file)", "example": "-----BEGIN CERTIFICATE----- ...", "readOnly": false, "type": [ "string" ] }, "created_at": { "description": "when provider record was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "entity_id": { "description": "URL identifier provided by the identity provider", "example": "https://customer-domain.idp.com", "readOnly": false, "type": [ "string" ] }, "id": { "description": "unique identifier of this identity provider", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "name": { "description": "user-friendly unique identifier for this identity provider", "example": "acme-sso", "type": [ "string" ] }, "slo_target_url": { "description": "single log out URL for this identity provider", "example": "https://example.com/idp/logout", "readOnly": false, "type": [ "string" ] }, "sso_target_url": { "description": "single sign on URL for this identity provider", "example": "https://example.com/idp/login", "readOnly": false, "type": [ "string" ] }, "updated_at": { "description": "when the identity provider record was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "owner": { "description": "entity that owns this identity provider", "properties": { "id": { "description": "unique identifier of the owner", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "name": { "description": "name of the owner", "example": "acme", "readOnly": true, "type": [ "string" ] }, "type": { "description": "type of the owner", "enum": [ "team", "enterprise-account" ], "example": "team", "readOnly": true, "type": [ "string" ] } }, "readOnly": false, "required": [ "id", "type" ], "type": [ "object" ] } }, "links": [ { "description": "Get a list of a team's Identity Providers", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fname)}/identity-providers", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/identity-provider" }, "type": [ "array" ] }, "title": "List By Team" }, { "description": "Create an Identity Provider for a team", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fname)}/identity-providers", "method": "POST", "rel": "create", "schema": { "properties": { "certificate": { "$ref": "#/definitions/identity-provider/definitions/certificate" }, "entity_id": { "$ref": "#/definitions/identity-provider/definitions/entity_id" }, "slo_target_url": { "$ref": "#/definitions/identity-provider/definitions/slo_target_url" }, "sso_target_url": { "$ref": "#/definitions/identity-provider/definitions/sso_target_url" } }, "required": [ "certificate", "sso_target_url", "entity_id" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/identity-provider" }, "title": "Create By Team" }, { "description": "Update a team's Identity Provider", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fname)}/identity-providers/{(%23%2Fdefinitions%2Fidentity-provider%2Fdefinitions%2Fid)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "certificate": { "$ref": "#/definitions/identity-provider/definitions/certificate" }, "entity_id": { "$ref": "#/definitions/identity-provider/definitions/entity_id" }, "slo_target_url": { "$ref": "#/definitions/identity-provider/definitions/slo_target_url" }, "sso_target_url": { "$ref": "#/definitions/identity-provider/definitions/sso_target_url" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/identity-provider" }, "title": "Update By Team" }, { "description": "Delete a team's Identity Provider", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fname)}/identity-providers/{(%23%2Fdefinitions%2Fidentity-provider%2Fdefinitions%2Fid)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/identity-provider" }, "title": "Delete By Team" } ], "properties": { "certificate": { "$ref": "#/definitions/identity-provider/definitions/certificate" }, "created_at": { "$ref": "#/definitions/identity-provider/definitions/created_at" }, "entity_id": { "$ref": "#/definitions/identity-provider/definitions/entity_id" }, "id": { "$ref": "#/definitions/identity-provider/definitions/id" }, "slo_target_url": { "$ref": "#/definitions/identity-provider/definitions/slo_target_url" }, "sso_target_url": { "$ref": "#/definitions/identity-provider/definitions/sso_target_url" }, "organization": { "description": "team associated with this identity provider", "properties": { "name": { "$ref": "#/definitions/team/definitions/name" } }, "type": [ "null", "object" ] }, "updated_at": { "$ref": "#/definitions/identity-provider/definitions/updated_at" }, "owner": { "$ref": "#/definitions/identity-provider/definitions/owner" } } }, "inbound-ruleset": { "description": "An inbound-ruleset is a collection of rules that specify what hosts can or cannot connect to an application.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "prototype", "strictProperties": true, "title": "Heroku Platform API - Inbound Ruleset", "type": [ "object" ], "definitions": { "action": { "description": "states whether the connection is allowed or denied", "example": "allow", "readOnly": false, "type": [ "string" ], "enum": [ "allow", "deny" ] }, "source": { "description": "is the request’s source in CIDR notation", "example": "1.1.1.1/1", "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", "readOnly": false, "type": [ "string" ] }, "created_at": { "description": "when inbound-ruleset was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of an inbound-ruleset", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/inbound-ruleset/definitions/id" } ] }, "rule": { "description": "the combination of an IP address in CIDR notation and whether to allow or deny it's traffic.", "type": [ "object" ], "properties": { "action": { "$ref": "#/definitions/inbound-ruleset/definitions/action" }, "source": { "$ref": "#/definitions/inbound-ruleset/definitions/source" } }, "required": [ "source", "action" ] } }, "links": [ { "description": "Current inbound ruleset for a space", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/inbound-ruleset", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/inbound-ruleset" }, "title": "Current" }, { "description": "Info on an existing Inbound Ruleset", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/inbound-rulesets/{(%23%2Fdefinitions%2Finbound-ruleset%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/inbound-ruleset" }, "title": "Info" }, { "description": "List all inbound rulesets for a space", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/inbound-rulesets", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/inbound-ruleset" }, "type": [ "array" ] }, "title": "List" }, { "description": "Create a new inbound ruleset", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/inbound-ruleset", "method": "PUT", "rel": "create", "schema": { "type": [ "object" ], "properties": { "rules": { "type": [ "array" ], "items": { "$ref": "#/definitions/inbound-ruleset/definitions/rule" } } } }, "title": "Create" } ], "properties": { "id": { "$ref": "#/definitions/inbound-ruleset/definitions/id" }, "space": { "description": "identity of space", "properties": { "id": { "$ref": "#/definitions/space/definitions/id" }, "name": { "$ref": "#/definitions/space/definitions/name" } }, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/inbound-ruleset/definitions/created_at" }, "rules": { "type": [ "array" ], "items": { "$ref": "#/definitions/inbound-ruleset/definitions/rule" } }, "created_by": { "$ref": "#/definitions/account/definitions/email" } } }, "invoice-address": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "An invoice address represents the address that should be listed on an invoice.", "title": "Heroku Vault API - Invoice Address", "stability": "development", "type": [ "object" ], "definitions": { "address_1": { "type": [ "string" ], "description": "invoice street address line 1", "example": "40 Hickory Blvd." }, "address_2": { "type": [ "string" ], "description": "invoice street address line 2", "example": "Suite 300" }, "city": { "type": [ "string" ], "description": "invoice city", "example": "Seattle" }, "country": { "type": [ "string" ], "description": "country", "example": "US" }, "heroku_id": { "type": [ "string" ], "description": "heroku_id identifier reference", "example": "user930223902@heroku.com", "readOnly": true }, "identity": { "anyOf": [ { "$ref": "#/definitions/invoice-address/definitions/heroku_id" } ] }, "other": { "type": [ "string" ], "description": "metadata / additional information to go on invoice", "example": "Company ABC Inc. VAT 903820" }, "postal_code": { "type": [ "string" ], "description": "invoice zip code", "example": "98101" }, "state": { "type": [ "string" ], "description": "invoice state", "example": "WA" }, "use_invoice_address": { "type": [ "boolean" ], "description": "flag to use the invoice address for an account or not", "example": true, "default": false } }, "links": [ { "description": "Retrieve existing invoice address.", "href": "/account/invoice-address", "method": "GET", "rel": "self", "title": "info" }, { "description": "Update invoice address for an account.", "href": "/account/invoice-address", "method": "PUT", "rel": "self", "title": "update", "schema": { "properties": { "address_1": { "$ref": "#/definitions/invoice-address/definitions/address_1" }, "address_2": { "$ref": "#/definitions/invoice-address/definitions/address_2" }, "city": { "$ref": "#/definitions/invoice-address/definitions/city" }, "country": { "$ref": "#/definitions/invoice-address/definitions/country" }, "other": { "$ref": "#/definitions/invoice-address/definitions/other" }, "postal_code": { "$ref": "#/definitions/invoice-address/definitions/postal_code" }, "state": { "$ref": "#/definitions/invoice-address/definitions/state" }, "use_invoice_address": { "$ref": "#/definitions/invoice-address/definitions/use_invoice_address" } }, "type": [ "object" ] } } ], "properties": { "address_1": { "$ref": "#/definitions/invoice-address/definitions/address_1" }, "address_2": { "$ref": "#/definitions/invoice-address/definitions/address_2" }, "city": { "$ref": "#/definitions/invoice-address/definitions/city" }, "country": { "$ref": "#/definitions/invoice-address/definitions/country" }, "heroku_id": { "$ref": "#/definitions/invoice-address/definitions/identity" }, "other": { "$ref": "#/definitions/invoice-address/definitions/other" }, "postal_code": { "$ref": "#/definitions/invoice-address/definitions/postal_code" }, "state": { "$ref": "#/definitions/invoice-address/definitions/state" }, "use_invoice_address": { "$ref": "#/definitions/invoice-address/definitions/use_invoice_address" } } }, "invoice": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "An invoice is an itemized bill of goods for an account which includes pricing and charges.", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Invoice", "type": [ "object" ], "definitions": { "charges_total": { "description": "total charges on this invoice", "example": 100.0, "readOnly": true, "type": [ "number" ] }, "created_at": { "description": "when invoice was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "credits_total": { "description": "total credits on this invoice", "example": 100.0, "readOnly": true, "type": [ "number" ] }, "id": { "description": "unique identifier of this invoice", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/invoice/definitions/number" } ] }, "number": { "description": "human readable invoice number", "example": 9403943, "readOnly": true, "type": [ "integer" ] }, "period_end": { "description": "the ending date that the invoice covers", "example": "01/31/2014", "readOnly": true, "type": [ "string" ] }, "period_start": { "description": "the starting date that this invoice covers", "example": "01/01/2014", "readOnly": true, "type": [ "string" ] }, "state": { "description": "payment status for this invoice (pending, successful, failed)", "example": 1, "readOnly": true, "type": [ "integer" ] }, "total": { "description": "combined total of charges and credits on this invoice", "example": 100.0, "readOnly": true, "type": [ "number" ] }, "updated_at": { "description": "when invoice was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Info for existing invoice.", "href": "/account/invoices/{(%23%2Fdefinitions%2Finvoice%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/invoice" }, "title": "Info" }, { "description": "List existing invoices.", "href": "/account/invoices", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/invoice" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "charges_total": { "$ref": "#/definitions/invoice/definitions/charges_total" }, "created_at": { "$ref": "#/definitions/invoice/definitions/created_at" }, "credits_total": { "$ref": "#/definitions/invoice/definitions/credits_total" }, "id": { "$ref": "#/definitions/invoice/definitions/id" }, "number": { "$ref": "#/definitions/invoice/definitions/number" }, "period_end": { "$ref": "#/definitions/invoice/definitions/period_end" }, "period_start": { "$ref": "#/definitions/invoice/definitions/period_start" }, "state": { "$ref": "#/definitions/invoice/definitions/state" }, "total": { "$ref": "#/definitions/invoice/definitions/total" }, "updated_at": { "$ref": "#/definitions/invoice/definitions/updated_at" } } }, "key": { "description": "Keys represent public SSH keys associated with an account and are used to authorize accounts as they are performing git operations.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Key", "type": [ "object" ], "definitions": { "comment": { "description": "comment on the key", "example": "username@host", "readOnly": true, "type": [ "string" ] }, "created_at": { "description": "when key was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "email": { "deprecated": true, "description": "deprecated. Please refer to 'comment' instead", "example": "username@host", "readOnly": true, "type": [ "string" ] }, "fingerprint": { "description": "a unique identifying string based on contents", "example": "17:63:a4:ba:24:d3:7f:af:17:c8:94:82:7e:80:56:bf", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of this key", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/key/definitions/id" }, { "$ref": "#/definitions/key/definitions/fingerprint" } ] }, "public_key": { "description": "full public_key as uploaded", "example": "ssh-rsa AAAAB3NzaC1ycVc/../839Uv username@example.com", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when key was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Info for existing key.", "href": "/account/keys/{(%23%2Fdefinitions%2Fkey%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/key" }, "title": "Info" }, { "description": "List existing keys.", "href": "/account/keys", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/key" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "comment": { "$ref": "#/definitions/key/definitions/comment" }, "created_at": { "$ref": "#/definitions/key/definitions/created_at" }, "email": { "$ref": "#/definitions/key/definitions/email" }, "fingerprint": { "$ref": "#/definitions/key/definitions/fingerprint" }, "id": { "$ref": "#/definitions/key/definitions/id" }, "public_key": { "$ref": "#/definitions/key/definitions/public_key" }, "updated_at": { "$ref": "#/definitions/key/definitions/updated_at" } } }, "log-drain": { "description": "[Log drains](https://devcenter.heroku.com/articles/log-drains) provide a way to forward your Heroku logs to an external syslog server for long-term archiving. This external service must be configured to receive syslog packets from Heroku, whereupon its URL can be added to an app using this API. Some add-ons will add a log drain when they are provisioned to an app. These drains can only be removed by removing the add-on.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Log Drain", "type": [ "object" ], "definitions": { "addon": { "description": "add-on that created the drain", "example": { "id": "01234567-89ab-cdef-0123-456789abcdef", "name": "singing-swiftly-1242" }, "properties": { "id": { "$ref": "#/definitions/add-on/definitions/id" }, "name": { "$ref": "#/definitions/add-on/definitions/name" } }, "readOnly": true, "type": [ "object", "null" ] }, "created_at": { "description": "when log drain was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of this log drain", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "query_identity": { "anyOf": [ { "$ref": "#/definitions/log-drain/definitions/id" }, { "$ref": "#/definitions/log-drain/definitions/url" }, { "$ref": "#/definitions/log-drain/definitions/token" } ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/log-drain/definitions/url" } ] }, "token": { "description": "token associated with the log drain", "example": "d.01234567-89ab-cdef-0123-456789abcdef", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when log drain was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "url": { "description": "url associated with the log drain", "example": "https://example.com/drain", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Create a new log drain.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-drains", "method": "POST", "rel": "create", "schema": { "properties": { "url": { "$ref": "#/definitions/log-drain/definitions/url" } }, "required": [ "url" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/log-drain" }, "title": "Create" }, { "description": "Update an add-on owned log drain.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/log-drains/{(%23%2Fdefinitions%2Flog-drain%2Fdefinitions%2Fquery_identity)}", "method": "PUT", "rel": "update", "schema": { "properties": { "url": { "$ref": "#/definitions/log-drain/definitions/url" } }, "required": [ "url" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/log-drain" }, "title": "Update" }, { "description": "Delete an existing log drain. Log drains added by add-ons can only be removed by removing the add-on.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-drains/{(%23%2Fdefinitions%2Flog-drain%2Fdefinitions%2Fquery_identity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/log-drain" }, "title": "Delete" }, { "description": "Info for existing log drain.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-drains/{(%23%2Fdefinitions%2Flog-drain%2Fdefinitions%2Fquery_identity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/log-drain" }, "title": "Info" }, { "description": "List existing log drains for an add-on.", "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/log-drains", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/log-drain" }, "type": [ "array" ] }, "title": "List By Add-on" }, { "description": "List existing log drains.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-drains", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/log-drain" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "addon": { "$ref": "#/definitions/log-drain/definitions/addon" }, "created_at": { "$ref": "#/definitions/log-drain/definitions/created_at" }, "id": { "$ref": "#/definitions/log-drain/definitions/id" }, "token": { "$ref": "#/definitions/log-drain/definitions/token" }, "updated_at": { "$ref": "#/definitions/log-drain/definitions/updated_at" }, "url": { "$ref": "#/definitions/log-drain/definitions/url" } } }, "log-session": { "description": "A log session is a reference to the http based log stream for an app.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Log Session", "type": [ "object" ], "definitions": { "created_at": { "description": "when log connection was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "dyno": { "description": "dyno to limit results to", "example": "web.1", "readOnly": false, "type": [ "string" ] }, "id": { "description": "unique identifier of this log session", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/log-session/definitions/id" } ] }, "lines": { "description": "number of log lines to stream at once", "example": 10, "readOnly": false, "type": [ "integer" ] }, "logplex_url": { "description": "URL for log streaming session", "example": "https://logplex.heroku.com/sessions/01234567-89ab-cdef-0123-456789abcdef?srv=1325419200", "readOnly": true, "type": [ "string" ] }, "source": { "description": "log source to limit results to", "example": "app", "readOnly": false, "type": [ "string" ] }, "tail": { "description": "whether to stream ongoing logs", "example": true, "readOnly": false, "type": [ "boolean" ] }, "updated_at": { "description": "when log session was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Create a new log session.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-sessions", "method": "POST", "rel": "create", "schema": { "properties": { "dyno": { "$ref": "#/definitions/log-session/definitions/dyno" }, "lines": { "$ref": "#/definitions/log-session/definitions/lines" }, "source": { "$ref": "#/definitions/log-session/definitions/source" }, "tail": { "$ref": "#/definitions/log-session/definitions/tail" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/log-session" }, "title": "Create" } ], "properties": { "created_at": { "$ref": "#/definitions/log-session/definitions/created_at" }, "id": { "$ref": "#/definitions/log-session/definitions/id" }, "logplex_url": { "$ref": "#/definitions/log-session/definitions/logplex_url" }, "updated_at": { "$ref": "#/definitions/log-session/definitions/updated_at" } } }, "oauth-authorization": { "description": "OAuth authorizations represent clients that a Heroku user has authorized to automate, customize or extend their usage of the platform. For more information please refer to the [Heroku OAuth documentation](https://devcenter.heroku.com/articles/oauth)", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - OAuth Authorization", "type": [ "object" ], "definitions": { "created_at": { "description": "when OAuth authorization was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "description": { "description": "human-friendly description of this OAuth authorization", "example": "sample authorization", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of OAuth authorization", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/oauth-authorization/definitions/id" } ] }, "scope": { "description": "The scope of access OAuth authorization allows", "example": [ "global" ], "readOnly": true, "type": [ "array" ], "items": { "type": [ "string" ] } }, "updated_at": { "description": "when OAuth authorization was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Create a new OAuth authorization.", "href": "/oauth/authorizations", "method": "POST", "rel": "create", "schema": { "properties": { "client": { "$ref": "#/definitions/oauth-client/definitions/identity" }, "description": { "$ref": "#/definitions/oauth-authorization/definitions/description" }, "expires_in": { "$ref": "#/definitions/oauth-token/definitions/expires_in" }, "scope": { "$ref": "#/definitions/oauth-authorization/definitions/scope" } }, "required": [ "scope" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/oauth-authorization" }, "title": "Create" }, { "description": "Delete OAuth authorization.", "href": "/oauth/authorizations/{(%23%2Fdefinitions%2Foauth-authorization%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/oauth-authorization" }, "title": "Delete" }, { "description": "Info for an OAuth authorization.", "href": "/oauth/authorizations/{(%23%2Fdefinitions%2Foauth-authorization%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/oauth-authorization" }, "title": "Info" }, { "description": "List OAuth authorizations.", "href": "/oauth/authorizations", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/oauth-authorization" }, "type": [ "array" ] }, "title": "List" }, { "description": "Regenerate OAuth tokens. This endpoint is only available to direct authorizations or privileged OAuth clients.", "href": "/oauth/authorizations/{(%23%2Fdefinitions%2Foauth-authorization%2Fdefinitions%2Fidentity)}/actions/regenerate-tokens", "method": "POST", "rel": "update", "targetSchema": { "$ref": "#/definitions/oauth-authorization" }, "title": "Regenerate" } ], "properties": { "access_token": { "description": "access token for this authorization", "properties": { "expires_in": { "$ref": "#/definitions/oauth-token/definitions/expires_in" }, "id": { "$ref": "#/definitions/oauth-token/definitions/id" }, "token": { "$ref": "#/definitions/oauth-token/definitions/token" } }, "type": [ "null", "object" ] }, "client": { "description": "identifier of the client that obtained this authorization, if any", "properties": { "id": { "$ref": "#/definitions/oauth-client/definitions/id" }, "name": { "$ref": "#/definitions/oauth-client/definitions/name" }, "redirect_uri": { "$ref": "#/definitions/oauth-client/definitions/redirect_uri" } }, "type": [ "null", "object" ] }, "created_at": { "$ref": "#/definitions/oauth-authorization/definitions/created_at" }, "grant": { "description": "this authorization's grant", "properties": { "code": { "$ref": "#/definitions/oauth-grant/definitions/code" }, "expires_in": { "$ref": "#/definitions/oauth-grant/definitions/expires_in" }, "id": { "$ref": "#/definitions/oauth-grant/definitions/id" } }, "strictProperties": true, "type": [ "null", "object" ] }, "id": { "$ref": "#/definitions/oauth-authorization/definitions/id" }, "refresh_token": { "description": "refresh token for this authorization", "properties": { "expires_in": { "$ref": "#/definitions/oauth-token/definitions/expires_in" }, "id": { "$ref": "#/definitions/oauth-token/definitions/id" }, "token": { "$ref": "#/definitions/oauth-token/definitions/token" } }, "strictProperties": true, "type": [ "null", "object" ] }, "scope": { "$ref": "#/definitions/oauth-authorization/definitions/scope" }, "updated_at": { "$ref": "#/definitions/oauth-authorization/definitions/updated_at" }, "user": { "description": "authenticated user associated with this authorization", "properties": { "id": { "$ref": "#/definitions/account/definitions/id" }, "email": { "$ref": "#/definitions/account/definitions/email" }, "full_name": { "$ref": "#/definitions/account/definitions/name" } }, "strictProperties": true, "type": [ "object" ] } } }, "oauth-client": { "description": "OAuth clients are applications that Heroku users can authorize to automate, customize or extend their usage of the platform. For more information please refer to the [Heroku OAuth documentation](https://devcenter.heroku.com/articles/oauth).", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - OAuth Client", "type": [ "object" ], "definitions": { "created_at": { "description": "when OAuth client was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of this OAuth client", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/oauth-client/definitions/id" } ] }, "ignores_delinquent": { "description": "whether the client is still operable given a delinquent account", "example": false, "readOnly": true, "type": [ "boolean", "null" ] }, "name": { "description": "OAuth client name", "example": "example", "readOnly": true, "type": [ "string" ] }, "redirect_uri": { "description": "endpoint for redirection after authorization with OAuth client", "example": "https://example.com/auth/heroku/callback", "readOnly": true, "type": [ "string" ] }, "secret": { "description": "secret used to obtain OAuth authorizations under this client", "example": "01234567-89ab-cdef-0123-456789abcdef", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when OAuth client was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Create a new OAuth client.", "href": "/oauth/clients", "method": "POST", "rel": "create", "schema": { "properties": { "name": { "$ref": "#/definitions/oauth-client/definitions/name" }, "redirect_uri": { "$ref": "#/definitions/oauth-client/definitions/redirect_uri" } }, "required": [ "name", "redirect_uri" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/oauth-client" }, "title": "Create" }, { "description": "Delete OAuth client.", "href": "/oauth/clients/{(%23%2Fdefinitions%2Foauth-client%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/oauth-client" }, "title": "Delete" }, { "description": "Info for an OAuth client", "href": "/oauth/clients/{(%23%2Fdefinitions%2Foauth-client%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "title": "Info" }, { "description": "List OAuth clients", "href": "/oauth/clients", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/oauth-client" }, "type": [ "array" ] }, "title": "List" }, { "description": "Update OAuth client", "href": "/oauth/clients/{(%23%2Fdefinitions%2Foauth-client%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "name": { "$ref": "#/definitions/oauth-client/definitions/name" }, "redirect_uri": { "$ref": "#/definitions/oauth-client/definitions/redirect_uri" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/oauth-client" }, "title": "Update" }, { "description": "Rotate credentials for an OAuth client", "href": "/oauth/clients/{(%23%2Fdefinitions%2Foauth-client%2Fdefinitions%2Fidentity)}/actions/rotate-credentials", "method": "POST", "rel": "update", "targetSchema": { "$ref": "#/definitions/oauth-client" }, "title": "Rotate Credentials" } ], "properties": { "created_at": { "$ref": "#/definitions/oauth-client/definitions/created_at" }, "id": { "$ref": "#/definitions/oauth-client/definitions/id" }, "ignores_delinquent": { "$ref": "#/definitions/oauth-client/definitions/ignores_delinquent" }, "name": { "$ref": "#/definitions/oauth-client/definitions/name" }, "redirect_uri": { "$ref": "#/definitions/oauth-client/definitions/redirect_uri" }, "secret": { "$ref": "#/definitions/oauth-client/definitions/secret" }, "updated_at": { "$ref": "#/definitions/oauth-client/definitions/updated_at" } } }, "oauth-grant": { "description": "OAuth grants are used to obtain authorizations on behalf of a user. For more information please refer to the [Heroku OAuth documentation](https://devcenter.heroku.com/articles/oauth)", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - OAuth Grant", "type": [ "object" ], "definitions": { "code": { "description": "grant code received from OAuth web application authorization", "example": "01234567-89ab-cdef-0123-456789abcdef", "readOnly": true, "type": [ "string" ] }, "expires_in": { "description": "seconds until OAuth grant expires", "example": 2592000, "readOnly": true, "type": [ "integer" ] }, "id": { "description": "unique identifier of OAuth grant", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/oauth-grant/definitions/id" } ] }, "type": { "description": "type of grant requested, one of `authorization_code` or `refresh_token`", "example": "authorization_code", "readOnly": false, "type": [ "string" ] } }, "links": [ ], "properties": { } }, "oauth-token": { "description": "OAuth tokens provide access for authorized clients to act on behalf of a Heroku user to automate, customize or extend their usage of the platform. For more information please refer to the [Heroku OAuth documentation](https://devcenter.heroku.com/articles/oauth)", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - OAuth Token", "type": [ "object" ], "definitions": { "created_at": { "description": "when OAuth token was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "expires_in": { "description": "seconds until OAuth token expires; may be `null` for tokens with indefinite lifetime", "example": 2592000, "readOnly": true, "type": [ "null", "integer" ] }, "id": { "description": "unique identifier of OAuth token", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/oauth-token/definitions/id" } ] }, "token": { "description": "contents of the token to be used for authorization", "example": "01234567-89ab-cdef-0123-456789abcdef", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when OAuth token was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Create a new OAuth token.", "href": "/oauth/tokens", "method": "POST", "rel": "create", "schema": { "properties": { "client": { "type": [ "object" ], "properties": { "secret": { "$ref": "#/definitions/oauth-client/definitions/secret" } } }, "grant": { "type": [ "object" ], "properties": { "code": { "$ref": "#/definitions/oauth-grant/definitions/code" }, "type": { "$ref": "#/definitions/oauth-grant/definitions/type" } } }, "refresh_token": { "type": [ "object" ], "properties": { "token": { "$ref": "#/definitions/oauth-token/definitions/token" } } } }, "required": [ "grant", "client", "refresh_token" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/oauth-token" }, "title": "Create" }, { "description": "Revoke OAuth access token.", "href": "/oauth/tokens/{(%23%2Fdefinitions%2Foauth-token%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/oauth-token" }, "title": "Delete" } ], "properties": { "access_token": { "description": "current access token", "properties": { "expires_in": { "$ref": "#/definitions/oauth-token/definitions/expires_in" }, "id": { "$ref": "#/definitions/oauth-token/definitions/id" }, "token": { "$ref": "#/definitions/oauth-token/definitions/token" } }, "strictProperties": true, "type": [ "object" ] }, "authorization": { "description": "authorization for this set of tokens", "properties": { "id": { "$ref": "#/definitions/oauth-authorization/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "client": { "description": "OAuth client secret used to obtain token", "properties": { "secret": { "$ref": "#/definitions/oauth-client/definitions/secret" } }, "strictProperties": true, "type": [ "null", "object" ] }, "created_at": { "$ref": "#/definitions/oauth-token/definitions/created_at" }, "grant": { "description": "grant used on the underlying authorization", "properties": { "code": { "$ref": "#/definitions/oauth-grant/definitions/code" }, "type": { "$ref": "#/definitions/oauth-grant/definitions/type" } }, "strictProperties": true, "type": [ "object" ] }, "id": { "$ref": "#/definitions/oauth-token/definitions/id" }, "refresh_token": { "description": "refresh token for this authorization", "properties": { "expires_in": { "$ref": "#/definitions/oauth-token/definitions/expires_in" }, "id": { "$ref": "#/definitions/oauth-token/definitions/id" }, "token": { "$ref": "#/definitions/oauth-token/definitions/token" } }, "strictProperties": true, "type": [ "object" ] }, "session": { "description": "OAuth session using this token", "properties": { "id": { "$ref": "#/definitions/oauth-token/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "updated_at": { "$ref": "#/definitions/oauth-token/definitions/updated_at" }, "user": { "description": "Reference to the user associated with this token", "properties": { "id": { "$ref": "#/definitions/account/definitions/id" } }, "strictProperties": true, "type": [ "object" ] } } }, "outbound-ruleset": { "description": "An outbound-ruleset is a collection of rules that specify what hosts Dynos are allowed to communicate with. ", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "prototype", "strictProperties": true, "title": "Heroku Platform API - Outbound Ruleset", "type": [ "object" ], "definitions": { "target": { "description": "is the target destination in CIDR notation", "example": "1.1.1.1/1", "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/([0-9]|[1-2][0-9]|3[0-2]))$", "readOnly": false, "type": [ "string" ] }, "created_at": { "description": "when outbound-ruleset was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of an outbound-ruleset", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "port": { "description": "an endpoint of communication in an operating system.", "example": 80, "readOnly": false, "type": [ "integer" ] }, "protocol": { "description": "formal standards and policies comprised of rules, procedures and formats that define communication between two or more devices over a network", "example": "tcp", "readOnly": false, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/outbound-ruleset/definitions/id" } ] }, "rule": { "description": "the combination of an IP address in CIDR notation, a from_port, to_port and protocol.", "type": [ "object" ], "properties": { "target": { "$ref": "#/definitions/outbound-ruleset/definitions/target" }, "from_port": { "$ref": "#/definitions/outbound-ruleset/definitions/port" }, "to_port": { "$ref": "#/definitions/outbound-ruleset/definitions/port" }, "protocol": { "$ref": "#/definitions/outbound-ruleset/definitions/protocol" } }, "required": [ "target", "from_port", "to_port", "protocol" ] } }, "links": [ { "description": "Current outbound ruleset for a space", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/outbound-ruleset", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/outbound-ruleset" }, "title": "Current" }, { "description": "Info on an existing Outbound Ruleset", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/outbound-rulesets/{(%23%2Fdefinitions%2Foutbound-ruleset%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/outbound-ruleset" }, "title": "Info" }, { "description": "List all Outbound Rulesets for a space", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/outbound-rulesets", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/outbound-ruleset" }, "type": [ "array" ] }, "title": "List" }, { "description": "Create a new outbound ruleset", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/outbound-ruleset", "method": "PUT", "rel": "create", "schema": { "type": [ "object" ], "properties": { "rules": { "type": [ "array" ], "items": { "$ref": "#/definitions/outbound-ruleset/definitions/rule" } } } }, "title": "Create" } ], "properties": { "id": { "$ref": "#/definitions/outbound-ruleset/definitions/id" }, "space": { "description": "identity of space", "properties": { "id": { "$ref": "#/definitions/space/definitions/id" }, "name": { "$ref": "#/definitions/space/definitions/name" } }, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/outbound-ruleset/definitions/created_at" }, "rules": { "type": [ "array" ], "items": { "$ref": "#/definitions/outbound-ruleset/definitions/rule" } }, "created_by": { "$ref": "#/definitions/account/definitions/email" } } }, "password-reset": { "description": "A password reset represents a in-process password reset attempt.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - PasswordReset", "type": [ "object" ], "definitions": { "created_at": { "description": "when password reset was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/account/definitions/email" } ] }, "password_confirmation": { "description": "confirmation of the new password", "example": "newpassword", "readOnly": true, "type": [ "string" ] }, "reset_password_token": { "description": "unique identifier of a password reset attempt", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Reset account's password. This will send a reset password link to the user's email address.", "href": "/password-resets", "method": "POST", "rel": "self", "schema": { "properties": { "email": { "$ref": "#/definitions/account/definitions/email" } }, "type": [ "object" ] }, "title": "Reset Password" }, { "description": "Complete password reset.", "href": "/password-resets/{(%23%2Fdefinitions%2Fpassword-reset%2Fdefinitions%2Freset_password_token)}/actions/finalize", "method": "POST", "rel": "self", "schema": { "properties": { "password": { "$ref": "#/definitions/account/definitions/password" }, "password_confirmation": { "$ref": "#/definitions/password-reset/definitions/password_confirmation" } }, "type": [ "object" ] }, "title": "Complete Reset Password" } ], "properties": { "created_at": { "$ref": "#/definitions/password-reset/definitions/created_at" }, "user": { "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "id": { "$ref": "#/definitions/account/definitions/id" } }, "strictProperties": true, "type": [ "object" ] } } }, "peering-info": { "description": "[Peering Info](https://devcenter.heroku.com/articles/private-space-peering) gives you the information necessary to peer an AWS VPC to a Private Space.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "prototype", "strictProperties": true, "title": "Heroku Platform API - Peering Info", "type": [ "object" ], "properties": { "aws_account_id": { "$ref": "#/definitions/peering/definitions/aws_account_id" }, "aws_region": { "$ref": "#/definitions/region/definitions/provider/properties/region" }, "vpc_id": { "$ref": "#/definitions/peering/definitions/vpc_id" }, "vpc_cidr": { "description": "The CIDR range of the Private Space VPC", "$ref": "#/definitions/peering/definitions/cidr" }, "dyno_cidr_blocks": { "description": "The CIDR ranges that should be routed to the Private Space VPC.", "type": [ "array" ], "items": { "$ref": "#/definitions/peering/definitions/cidr" } }, "unavailable_cidr_blocks": { "description": "The CIDR ranges that you must not conflict with.", "type": [ "array" ], "items": { "$ref": "#/definitions/peering/definitions/cidr" } }, "space_cidr_blocks": { "description": "The CIDR ranges that should be routed to the Private Space VPC.", "type": [ "array" ], "items": { "$ref": "#/definitions/peering/definitions/cidr" } } }, "links": [ { "description": "Provides the necessary information to establish an AWS VPC Peering with your private space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/peering-info", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/peering-info" }, "title": "Info" } ] }, "peering": { "description": "[Peering](https://devcenter.heroku.com/articles/private-space-peering) provides a way to peer your Private Space VPC to another AWS VPC.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "prototype", "strictProperties": true, "title": "Heroku Platform API - Peering", "type": [ "object" ], "definitions": { "aws_account_id": { "description": "The AWS account ID of your Private Space.", "example": "123456789012", "readOnly": true, "type": [ "string" ] }, "aws_region": { "description": "The AWS region of the peer connection.", "example": "us-east-1", "readOnly": true, "type": [ "string" ] }, "vpc_id": { "description": "The AWS VPC ID of the peer.", "example": "vpc-1234567890", "readOnly": true, "type": [ "string" ] }, "type": { "description": "The type of peering connection.", "example": "heroku-managed", "type": [ "string" ], "enum": [ "heroku-managed", "customer-managed", "unknown" ] }, "status": { "description": "The status of the peering connection.", "example": "pending-acceptance", "enum": [ "initiating-request", "pending-acceptance", "provisioning", "active", "failed", "expired", "rejected", "deleted" ], "type": [ "string" ], "readOnly": true }, "pcx_id": { "description": "The AWS VPC Peering Connection ID of the peering.", "example": "pcx-123456789012", "readOnly": true, "type": [ "string" ] }, "cidr": { "description": "An IP address and the number of significant bits that make up the routing or networking portion.", "example": "10.0.0.0/16", "type": [ "string" ] }, "expires": { "description": "When a peering connection will expire.", "example": "2020-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "properties": { "type": { "$ref": "#/definitions/peering/definitions/type" }, "pcx_id": { "$ref": "#/definitions/peering/definitions/pcx_id" }, "cidr_blocks": { "description": "The CIDR blocks of the peer.", "type": [ "array" ], "items": { "$ref": "#/definitions/peering/definitions/cidr" } }, "status": { "$ref": "#/definitions/peering/definitions/status" }, "aws_vpc_id": { "$ref": "#/definitions/peering/definitions/vpc_id" }, "aws_region": { "$ref": "#/definitions/peering/definitions/aws_region" }, "aws_account_id": { "$ref": "#/definitions/peering/definitions/aws_account_id" }, "expires": { "$ref": "#/definitions/peering/definitions/expires" } }, "links": [ { "description": "List peering connections of a private space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/peerings", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/peering" }, "type": [ "array" ] }, "title": "List" }, { "description": "Accept a pending peering connection with a private space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/peerings/{(%23%2Fdefinitions%2Fpeering%2Fdefinitions%2Fpcx_id)}/actions/accept", "method": "POST", "rel": "empty", "title": "Accept" }, { "description": "Destroy an active peering connection with a private space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/peerings/{(%23%2Fdefinitions%2Fpeering%2Fdefinitions%2Fpcx_id)}", "rel": "empty", "method": "DELETE", "title": "Destroy" }, { "description": "Fetch information for existing peering connection", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/peerings/{(%23%2Fdefinitions%2Fpeering%2Fdefinitions%2Fpcx_id)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/peering" }, "title": "Info" } ] }, "permission-entity": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "An owned entity including users' permissions.", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Permission Entity", "type": [ "object" ], "definitions": { "id": { "description": "ID of the entity.", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "type": { "description": "The type of object the entity is referring to.", "example": "app", "readOnly": true, "type": [ "string" ], "enum": [ "app", "space" ] }, "name": { "description": "Name of the entity.", "example": "polar-lake-12345", "readOnly": true, "type": [ "string" ] }, "permissions": { "description": "A list of permissions the user has on the entity.", "example": "app", "readOnly": true, "type": [ "array" ] } }, "links": [ { "description": "List permission entities for a team.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/permissions", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/permission-entity" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "id": { "$ref": "#/definitions/permission-entity/definitions/id" }, "name": { "$ref": "#/definitions/permission-entity/definitions/name" }, "team_id": { "$ref": "#/definitions/team/definitions/id" }, "type": { "$ref": "#/definitions/permission-entity/definitions/type" }, "users": { "description": "Users that have access to the entity.", "items": { "type": [ "object" ], "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "id": { "$ref": "#/definitions/account/definitions/id" }, "permissions": { "description": "enterprise account permissions", "type": [ "array" ], "items": { "type": [ "string" ] } } } }, "type": [ "array" ] } } }, "pipeline-build": { "description": "Information about latest builds of apps in a pipeline.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Pipeline Build", "type": [ "object" ], "definitions": { }, "links": [ { "description": "List latest builds for each app in a pipeline", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/latest-builds", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/build" }, "type": [ "array" ] }, "title": "List" } ] }, "pipeline-config-var": { "description": "Pipeline Config Vars allow you to manage the configuration information provided to a pipeline.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Pipeline Config Vars", "type": [ "object" ], "definitions": { "config_vars": { "additionalProperties": false, "description": "hash of config vars", "example": { "FOO": "bar", "BAZ": "qux" }, "patternProperties": { "^[\\w\\.\\:\\[\\]]+$": { "type": [ "string", "null" ] } }, "type": [ "object" ] } }, "links": [ { "description": "Get config-vars for a pipeline stage.", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/stage/{(%23%2Fdefinitions%2Fpipeline-coupling%2Fdefinitions%2Fstage)}/config-vars", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/pipeline-config-var/definitions/config_vars" }, "title": "Info for App" }, { "description": "Update config-vars for a pipeline stage. You can update existing config-vars by setting them again, and remove by setting it to `null`.", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/stage/{(%23%2Fdefinitions%2Fpipeline-coupling%2Fdefinitions%2Fstage)}/config-vars", "method": "PATCH", "rel": "update", "schema": { "additionalProperties": false, "description": "hash of config changes – update values or delete by seting it to `null`", "example": { "FOO": "bar", "BAZ": "qux" }, "patternProperties": { "^[\\w\\.\\:\\[\\]]+$": { "type": [ "string", "null" ] } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/pipeline-config-var/definitions/config_vars" }, "title": "Update" } ], "example": { "FOO": "bar", "BAZ": "qux" }, "patternProperties": { "^\\w+$": { "type": [ "string" ] } } }, "pipeline-coupling": { "description": "Information about an app's coupling to a pipeline", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "title": "Heroku Platform API - Pipeline Coupling", "type": [ "object" ], "definitions": { "created_at": { "description": "when pipeline coupling was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of pipeline coupling", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/pipeline-coupling/definitions/id" } ] }, "stage": { "description": "target pipeline stage", "example": "production", "enum": [ "test", "review", "development", "staging", "production" ], "type": [ "string" ] }, "updated_at": { "description": "when pipeline coupling was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "List couplings for a pipeline", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/pipeline-couplings", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/pipeline-coupling" }, "type": [ "array" ] }, "title": "List By Pipeline" }, { "description": "List pipeline couplings for the current user.", "href": "/users/~/pipeline-couplings", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/pipeline-coupling" }, "type": [ "array" ] }, "title": "List By Current User" }, { "description": "List pipeline couplings.", "href": "/pipeline-couplings", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/pipeline-coupling" }, "type": [ "array" ] }, "title": "List" }, { "description": "List pipeline couplings for a team.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/pipeline-couplings", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/pipeline-coupling" }, "type": [ "array" ] }, "title": "List By Team" }, { "description": "Create a new pipeline coupling.", "href": "/pipeline-couplings", "method": "POST", "rel": "create", "schema": { "properties": { "app": { "$ref": "#/definitions/app/definitions/identity" }, "pipeline": { "$ref": "#/definitions/pipeline/definitions/id" }, "stage": { "$ref": "#/definitions/pipeline-coupling/definitions/stage" } }, "required": [ "app", "pipeline", "stage" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/pipeline-coupling" }, "title": "Create" }, { "description": "Info for an existing pipeline coupling.", "href": "/pipeline-couplings/{(%23%2Fdefinitions%2Fpipeline-coupling%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/pipeline-coupling" }, "title": "Info" }, { "description": "Delete an existing pipeline coupling.", "href": "/pipeline-couplings/{(%23%2Fdefinitions%2Fpipeline-coupling%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "delete", "targetSchema": { "$ref": "#/definitions/pipeline-coupling" }, "title": "Delete" }, { "description": "Update an existing pipeline coupling.", "href": "/pipeline-couplings/{(%23%2Fdefinitions%2Fpipeline-coupling%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "stage": { "$ref": "#/definitions/pipeline-coupling/definitions/stage" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/pipeline-coupling" }, "title": "Update" }, { "description": "Info for an existing pipeline coupling.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/pipeline-couplings", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/pipeline-coupling" }, "title": "Info By App" } ], "properties": { "app": { "description": "app involved in the pipeline coupling", "properties": { "id": { "$ref": "#/definitions/app/definitions/id" } }, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/pipeline-coupling/definitions/created_at" }, "id": { "$ref": "#/definitions/pipeline-coupling/definitions/id" }, "pipeline": { "description": "pipeline involved in the coupling", "properties": { "id": { "$ref": "#/definitions/pipeline/definitions/id" } }, "type": [ "object" ] }, "stage": { "$ref": "#/definitions/pipeline-coupling/definitions/stage" }, "updated_at": { "$ref": "#/definitions/pipeline-coupling/definitions/updated_at" } } }, "pipeline-deployment": { "description": "Information about latest deployments of apps in a pipeline.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Pipeline Deployment", "type": [ "object" ], "definitions": { }, "links": [ { "description": "List latest slug releases for each app in a pipeline", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/latest-deployments", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/release" }, "type": [ "array" ] }, "title": "List" } ] }, "pipeline-promotion-target": { "description": "Promotion targets represent an individual app being promoted to", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Pipeline Promotion Target", "type": [ "object" ], "definitions": { "error_message": { "description": "an error message for why the promotion failed", "example": "User does not have access to that app", "type": [ "null", "string" ] }, "id": { "description": "unique identifier of promotion target", "example": "01234567-89ab-cdef-0123-456789abcdef", "readOnly": true, "format": "uuid", "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/pipeline-promotion-target/definitions/id" } ] }, "status": { "description": "status of promotion", "example": "pending", "readOnly": true, "enum": [ "pending", "succeeded", "failed" ], "type": [ "string" ] } }, "links": [ { "description": "List promotion targets belonging to an existing promotion.", "href": "/pipeline-promotions/{(%23%2Fdefinitions%2Fpipeline-promotion%2Fdefinitions%2Fid)}/promotion-targets", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/pipeline-promotion-target" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "app": { "description": "the app which was promoted to", "properties": { "id": { "$ref": "#/definitions/app/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "error_message": { "$ref": "#/definitions/pipeline-promotion-target/definitions/error_message" }, "id": { "$ref": "#/definitions/pipeline-promotion-target/definitions/id" }, "pipeline_promotion": { "description": "the promotion which the target belongs to", "properties": { "id": { "$ref": "#/definitions/pipeline-promotion/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "release": { "description": "the release which was created on the target app", "properties": { "id": { "$ref": "#/definitions/release/definitions/id" } }, "type": [ "object", "null" ] }, "status": { "$ref": "#/definitions/pipeline-promotion-target/definitions/status" } } }, "pipeline-promotion": { "description": "Promotions allow you to move code from an app in a pipeline to all targets", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Pipeline Promotion", "type": [ "object" ], "definitions": { "created_at": { "description": "when promotion was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "type": [ "string" ] }, "id": { "description": "unique identifier of promotion", "example": "01234567-89ab-cdef-0123-456789abcdef", "readOnly": true, "format": "uuid", "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/pipeline-promotion/definitions/id" } ] }, "status": { "description": "status of promotion", "example": "pending", "readOnly": true, "enum": [ "pending", "completed" ], "type": [ "string" ] }, "updated_at": { "description": "when promotion was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "type": [ "string", "null" ] } }, "links": [ { "description": "Create a new promotion.", "href": "/pipeline-promotions", "method": "POST", "rel": "create", "schema": { "properties": { "pipeline": { "description": "pipeline involved in the promotion", "properties": { "id": { "$ref": "#/definitions/pipeline/definitions/id" } }, "required": [ "id" ], "type": [ "object" ] }, "source": { "description": "the app being promoted from", "properties": { "app": { "description": "the app which was promoted from", "properties": { "id": { "$ref": "#/definitions/app/definitions/id" } }, "strictProperties": true, "type": [ "object" ] } }, "type": [ "object" ] }, "targets": { "items": { "properties": { "app": { "description": "the app is being promoted to", "properties": { "id": { "$ref": "#/definitions/app/definitions/id" } }, "strictProperties": true, "type": [ "object" ] } }, "type": [ "object" ] }, "type": [ "array" ] } }, "required": [ "pipeline", "source", "targets" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/pipeline-promotion" }, "title": "Create" }, { "description": "Info for existing pipeline promotion.", "href": "/pipeline-promotions/{(%23%2Fdefinitions%2Fpipeline-promotion%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/pipeline-promotion" }, "title": "Info" } ], "properties": { "created_at": { "$ref": "#/definitions/pipeline-promotion/definitions/created_at" }, "id": { "$ref": "#/definitions/pipeline-promotion/definitions/id" }, "pipeline": { "description": "the pipeline which the promotion belongs to", "properties": { "id": { "$ref": "#/definitions/pipeline/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "source": { "description": "the app being promoted from", "properties": { "app": { "description": "the app which was promoted from", "properties": { "id": { "$ref": "#/definitions/app/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "release": { "description": "the release used to promoted from", "properties": { "id": { "$ref": "#/definitions/release/definitions/id" } }, "type": [ "object" ] } }, "strictProperties": true, "type": [ "object" ] }, "status": { "$ref": "#/definitions/pipeline-promotion/definitions/status" }, "updated_at": { "$ref": "#/definitions/pipeline-promotion/definitions/updated_at" } } }, "pipeline-release": { "description": "Information about latest releases of apps in a pipeline.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Pipeline Release", "type": [ "object" ], "definitions": { }, "links": [ { "description": "List latest releases for each app in a pipeline", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/latest-releases", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/release" }, "type": [ "array" ] }, "title": "List" } ] }, "pipeline-stack": { "description": "A pipeline's stack is determined by the apps in the pipeline. This is used during creation of CI and Review Apps that have no stack defined in app.json", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": false, "title": "Heroku Platform API - Pipeline Stack", "type": [ "object" ], "links": [ { "description": "The stack for a given pipeline, used for CI and Review Apps that have no stack defined in app.json.", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/pipeline-stack", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/pipeline-stack" }, "title": "Default Stack" } ], "properties": { "stack": { "description": "identity of the stack that will be used for new builds without a stack defined in CI and Review Apps", "properties": { "id": { "$ref": "#/definitions/stack/definitions/id" }, "name": { "$ref": "#/definitions/stack/definitions/name" } }, "strictProperties": true, "type": [ "object", "null" ] } } }, "pipeline-transfer": { "description": "A pipeline transfer is the process of changing pipeline ownership along with the contained apps.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": false, "title": "Heroku Platform API - Pipeline Transfer", "type": [ "object" ], "definitions": { "new_owner": { "description": "New owner of the pipeline.", "$ref": "#/definitions/pipeline/definitions/owner", "type": [ "object" ] }, "previous_owner": { "description": "Previous owner of the pipeline.", "$ref": "#/definitions/pipeline/definitions/owner", "type": [ "object" ] } }, "links": [ { "description": "Create a new pipeline transfer.", "href": "/pipeline-transfers", "method": "POST", "rel": "create", "schema": { "properties": { "pipeline": { "description": "The pipeline to transfer", "properties": { "id": { "$ref": "#/definitions/pipeline/definitions/id" } }, "type": [ "object" ] }, "new_owner": { "description": "New pipeline owner", "properties": { "id": { "description": "unique identifier of a pipeline owner", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "type": [ "string" ] }, "type": { "description": "type of pipeline owner", "example": "team", "pattern": "(^team$|^user$)", "type": [ "string" ] } }, "type": [ "object" ] } }, "required": [ "pipeline", "new_owner" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/pipeline-transfer" }, "title": "Create" } ], "properties": { "pipeline": { "description": "pipeline being transferred", "properties": { "id": { "$ref": "#/definitions/pipeline/definitions/id" } }, "type": [ "object" ] }, "previous_owner": { "$ref": "#/definitions/pipeline-transfer/definitions/previous_owner" }, "new_owner": { "$ref": "#/definitions/pipeline-transfer/definitions/new_owner" } } }, "pipeline": { "description": "A pipeline allows grouping of apps into different stages.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": false, "title": "Heroku Platform API - Pipeline", "type": [ "object" ], "definitions": { "created_at": { "description": "when pipeline was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of pipeline", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/pipeline/definitions/id" }, { "$ref": "#/definitions/pipeline/definitions/name" } ] }, "name": { "description": "name of pipeline", "example": "example", "pattern": "^[a-z][a-z0-9-]{2,29}$", "readOnly": false, "type": [ "string" ] }, "owner": { "description": "Owner of a pipeline.", "definitions": { "id": { "description": "unique identifier of a pipeline owner", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": false, "type": [ "string" ] }, "type": { "description": "type of pipeline owner", "example": "team", "pattern": "(^team$|^user$)", "readOnly": false, "type": [ "string" ] } }, "links": [ ], "properties": { "id": { "$ref": "#/definitions/pipeline/definitions/owner/definitions/id" }, "type": { "$ref": "#/definitions/pipeline/definitions/owner/definitions/type" } }, "required": [ "id", "type" ], "type": [ "object", "null" ] }, "updated_at": { "description": "when pipeline was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Create a new pipeline.", "href": "/pipelines", "method": "POST", "rel": "create", "schema": { "properties": { "name": { "$ref": "#/definitions/pipeline/definitions/name" }, "owner": { "description": "Pipeline owner", "$ref": "#/definitions/pipeline/definitions/owner", "type": [ "object", "null" ] } }, "required": [ "name" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/pipeline" }, "title": "Create" }, { "description": "Info for existing pipeline.", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/pipeline" }, "title": "Info" }, { "description": "Delete an existing pipeline.", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}", "method": "DELETE", "rel": "delete", "targetSchema": { "$ref": "#/definitions/pipeline" }, "title": "Delete" }, { "description": "Update an existing pipeline.", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "name": { "$ref": "#/definitions/pipeline/definitions/name" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/pipeline" }, "title": "Update" }, { "description": "List existing pipelines.", "href": "/pipelines", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/pipeline" } }, "type": [ "array" ], "title": "List" } ], "properties": { "created_at": { "$ref": "#/definitions/pipeline/definitions/created_at" }, "id": { "$ref": "#/definitions/pipeline/definitions/id" }, "name": { "$ref": "#/definitions/pipeline/definitions/name" }, "owner": { "$ref": "#/definitions/pipeline/definitions/owner" }, "updated_at": { "$ref": "#/definitions/pipeline/definitions/updated_at" } } }, "plan": { "description": "Plans represent different configurations of add-ons that may be added to apps. Endpoints under add-on services can be accessed without authentication.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Plan", "type": [ "object" ], "definitions": { "created_at": { "description": "when plan was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "compliance": { "description": "the compliance regimes applied to an add-on plan", "example": [ "HIPAA" ], "readOnly": false, "type": [ "null", "array" ], "items": { "$ref": "#/definitions/plan/definitions/regime" } }, "default": { "description": "whether this plan is the default for its add-on service", "example": false, "readOnly": true, "type": [ "boolean" ] }, "description": { "description": "description of plan", "example": "Heroku Postgres Dev", "readOnly": true, "type": [ "string" ] }, "human_name": { "description": "human readable name of the add-on plan", "example": "Dev", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of this plan", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "installable_inside_private_network": { "description": "whether this plan is installable to a Private Spaces app", "example": false, "readOnly": true, "type": [ "boolean" ] }, "installable_outside_private_network": { "description": "whether this plan is installable to a Common Runtime app", "example": true, "readOnly": true, "type": [ "boolean" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/plan/definitions/id" }, { "$ref": "#/definitions/plan/definitions/name" } ] }, "name": { "description": "unique name of this plan", "example": "heroku-postgresql:dev", "readOnly": true, "type": [ "string" ] }, "regime": { "description": "compliance requirements an add-on plan must adhere to", "readOnly": true, "example": "HIPAA", "type": [ "string" ], "enum": [ "HIPAA", "PCI" ] }, "cents": { "description": "price in cents per unit of plan", "example": 0, "readOnly": true, "type": [ "integer" ] }, "contract": { "description": "price is negotiated in a contract outside of monthly add-on billing", "example": false, "readOnly": true, "type": [ "boolean" ] }, "unit": { "description": "unit of price for plan", "example": "month", "readOnly": true, "type": [ "string" ] }, "space_default": { "description": "whether this plan is the default for apps in Private Spaces", "example": false, "readOnly": true, "type": [ "boolean" ] }, "state": { "description": "release status for plan", "example": "public", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when plan was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "visible": { "description": "whether this plan is publicly visible", "example": true, "readOnly": true, "type": [ "boolean" ] } }, "links": [ { "description": "Info for existing plan.", "href": "/plans/{(%23%2Fdefinitions%2Fplan%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/plan" }, "title": "Info" }, { "description": "Info for existing plan by Add-on.", "href": "/addon-services/{(%23%2Fdefinitions%2Fadd-on-service%2Fdefinitions%2Fidentity)}/plans/{(%23%2Fdefinitions%2Fplan%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/plan" }, "title": "Info By Add-on" }, { "description": "List existing plans by Add-on.", "href": "/addon-services/{(%23%2Fdefinitions%2Fadd-on-service%2Fdefinitions%2Fidentity)}/plans", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/plan" }, "type": [ "array" ] }, "title": "List By Add-on" } ], "properties": { "addon_service": { "description": "identity of add-on service", "properties": { "id": { "$ref": "#/definitions/add-on-service/definitions/id" }, "name": { "$ref": "#/definitions/add-on-service/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/plan/definitions/created_at" }, "compliance": { "$ref": "#/definitions/plan/definitions/compliance" }, "default": { "$ref": "#/definitions/plan/definitions/default" }, "description": { "$ref": "#/definitions/plan/definitions/description" }, "human_name": { "$ref": "#/definitions/plan/definitions/human_name" }, "id": { "$ref": "#/definitions/plan/definitions/id" }, "installable_inside_private_network": { "$ref": "#/definitions/plan/definitions/installable_inside_private_network" }, "installable_outside_private_network": { "$ref": "#/definitions/plan/definitions/installable_outside_private_network" }, "name": { "$ref": "#/definitions/plan/definitions/name" }, "price": { "description": "price", "properties": { "cents": { "$ref": "#/definitions/plan/definitions/cents" }, "contract": { "$ref": "#/definitions/plan/definitions/contract" }, "unit": { "$ref": "#/definitions/plan/definitions/unit" } }, "strictProperties": true, "type": [ "object" ] }, "space_default": { "$ref": "#/definitions/plan/definitions/space_default" }, "state": { "$ref": "#/definitions/plan/definitions/state" }, "updated_at": { "$ref": "#/definitions/plan/definitions/updated_at" }, "visible": { "$ref": "#/definitions/plan/definitions/visible" } } }, "rate-limit": { "description": "Rate Limit represents the number of request tokens each account holds. Requests to this endpoint do not count towards the rate limit.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Rate Limit", "type": [ "object" ], "definitions": { "identity": { }, "remaining": { "description": "allowed requests remaining in current interval", "example": 2399, "readOnly": true, "type": [ "integer" ] } }, "links": [ { "description": "Info for rate limits.", "href": "/account/rate-limits", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/rate-limit" }, "title": "Info" } ], "properties": { "remaining": { "$ref": "#/definitions/rate-limit/definitions/remaining" } } }, "region": { "description": "A region represents a geographic location in which your application may run.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Region", "type": [ "object" ], "definitions": { "country": { "description": "country where the region exists", "example": "United States", "readOnly": true, "type": [ "string" ] }, "created_at": { "description": "when region was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "description": { "description": "description of region", "example": "United States", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of region", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/region/definitions/id" }, { "$ref": "#/definitions/region/definitions/name" } ] }, "locale": { "description": "area in the country where the region exists", "example": "Virginia", "readOnly": true, "type": [ "string" ] }, "name": { "description": "unique name of region", "example": "us", "readOnly": true, "type": [ "string" ] }, "private_capable": { "description": "whether or not region is available for creating a Private Space", "example": false, "readOnly": true, "type": [ "boolean" ] }, "provider": { "description": "provider of underlying substrate", "type": [ "object" ], "properties": { "name": { "description": "name of provider", "example": "amazon-web-services", "readOnly": true, "type": [ "string" ] }, "region": { "description": "region name used by provider", "example": "us-east-1", "readOnly": true, "type": [ "string" ], "enum": [ "ap-south-1", "eu-west-1", "ap-southeast-1", "ap-southeast-2", "eu-central-1", "ap-northeast-2", "ap-northeast-1", "us-east-1", "sa-east-1", "us-west-1", "us-west-2" ] } }, "readOnly": true }, "updated_at": { "description": "when region was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Info for existing region.", "href": "/regions/{(%23%2Fdefinitions%2Fregion%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/region" }, "title": "Info" }, { "description": "List existing regions.", "href": "/regions", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/region" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "country": { "$ref": "#/definitions/region/definitions/country" }, "created_at": { "$ref": "#/definitions/region/definitions/created_at" }, "description": { "$ref": "#/definitions/region/definitions/description" }, "id": { "$ref": "#/definitions/region/definitions/id" }, "locale": { "$ref": "#/definitions/region/definitions/locale" }, "name": { "$ref": "#/definitions/region/definitions/name" }, "private_capable": { "$ref": "#/definitions/region/definitions/private_capable" }, "provider": { "$ref": "#/definitions/region/definitions/provider" }, "updated_at": { "$ref": "#/definitions/region/definitions/updated_at" } } }, "release": { "description": "A release represents a combination of code, config vars and add-ons for an app on Heroku.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Release", "type": [ "object" ], "definitions": { "created_at": { "description": "when release was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "description": { "description": "description of changes in this release", "example": "Added new feature", "readOnly": true, "type": [ "string" ] }, "status": { "description": "current status of the release", "enum": [ "failed", "pending", "succeeded" ], "example": "succeeded", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of release", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/release/definitions/id" }, { "$ref": "#/definitions/release/definitions/version" } ] }, "updated_at": { "description": "when release was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "version": { "description": "unique version assigned to the release", "example": 11, "readOnly": true, "type": [ "integer" ] }, "current": { "description": "indicates this release as being the current one for the app", "example": true, "readOnly": true, "type": [ "boolean" ] }, "output_stream_url": { "description": "Release command output will be available from this URL as a stream. The stream is available as either `text/plain` or `text/event-stream`. Clients should be prepared to handle disconnects and can resume the stream by sending a `Range` header (for `text/plain`) or a `Last-Event-Id` header (for `text/event-stream`).", "example": "https://release-output.heroku.com/streams/01234567-89ab-cdef-0123-456789abcdef", "readOnly": true, "type": [ "string", "null" ] } }, "links": [ { "description": "Info for existing release.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases/{(%23%2Fdefinitions%2Frelease%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/release" }, "title": "Info" }, { "description": "List existing releases.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/release" }, "type": [ "array" ] }, "title": "List" }, { "description": "Create new release.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases", "method": "POST", "rel": "create", "schema": { "properties": { "description": { "$ref": "#/definitions/release/definitions/description" }, "slug": { "$ref": "#/definitions/slug/definitions/identity" } }, "required": [ "slug" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/release" }, "title": "Create" }, { "description": "Rollback to an existing release.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases", "method": "POST", "rel": "create", "schema": { "properties": { "release": { "$ref": "#/definitions/release/definitions/id" } }, "required": [ "release" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/release" }, "title": "Rollback" } ], "properties": { "addon_plan_names": { "description": "add-on plans installed on the app for this release", "type": [ "array" ], "items": { "$ref": "#/definitions/plan/definitions/name" } }, "app": { "description": "app involved in the release", "properties": { "name": { "$ref": "#/definitions/app/definitions/name" }, "id": { "$ref": "#/definitions/app/definitions/id" } }, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/release/definitions/created_at" }, "description": { "$ref": "#/definitions/release/definitions/description" }, "id": { "$ref": "#/definitions/release/definitions/id" }, "updated_at": { "$ref": "#/definitions/release/definitions/updated_at" }, "slug": { "description": "slug running in this release", "properties": { "id": { "$ref": "#/definitions/slug/definitions/id" } }, "strictProperties": true, "type": [ "object", "null" ] }, "status": { "$ref": "#/definitions/release/definitions/status" }, "user": { "description": "user that created the release", "properties": { "id": { "$ref": "#/definitions/account/definitions/id" }, "email": { "$ref": "#/definitions/account/definitions/email" } }, "strictProperties": true, "type": [ "object" ] }, "version": { "$ref": "#/definitions/release/definitions/version" }, "current": { "$ref": "#/definitions/release/definitions/current" }, "output_stream_url": { "$ref": "#/definitions/release/definitions/output_stream_url" } } }, "review-app": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Review App", "description": "An ephemeral app to review a set of changes", "stability": "production", "strictProperties": true, "type": [ "object" ], "definitions": { "app_setup": { "readOnly": true, "type": [ "null", "object" ] }, "branch": { "description": "the branch of the repository which the review app is based on", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of the review app", "readOnly": true, "format": "uuid", "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/review-app/definitions/id" } ] }, "creator": { "description": "The user who created the review app", "readOnly": true, "type": [ "object" ], "definitions": { "id": { "description": "unique identifier of a review app owner", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": false, "type": [ "string" ] } } }, "created_at": { "description": "when test run was created", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "source_blob": { "description": "The download location for the review app's source code", "properties": { "url": { "description": "URL where gzipped tar archive of source code for build was downloaded.", "example": "https://example.com/source.tgz?token=xyz", "readOnly": true, "type": [ "string" ] }, "version": { "description": "The version number (or SHA) of the code to build.", "example": "v1.2.0", "type": [ "string", "null" ] } }, "strictProperties": true, "type": [ "object" ] }, "status": { "description": "current state of the review app", "enum": [ "pending", "creating", "created", "deleting", "deleted", "errored" ], "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when review app was updated", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "wait_for_ci": { "description": "wait for ci before building the app", "example": true, "readOnly": true, "type": [ "boolean" ] }, "error_status": { "description": "error message from creating the review app if any", "readOnly": true, "type": [ "string", "null" ] }, "message": { "description": "message from creating the review app if any", "readOnly": true, "type": [ "string", "null" ] }, "config_vars": { "additionalProperties": false, "description": "hash of config vars", "example": { "FOO": "bar", "BAZ": "qux" }, "patternProperties": { "^[\\w\\.\\:\\[\\]]+$": { "type": [ "string", "null" ] } }, "type": [ "object", "null" ] }, "fork_repo_id": { "description": "repository id of the fork the branch resides in", "example": "123456", "readOnly": true, "type": [ "integer", "null" ] }, "pr_number": { "description": "pull request number the review app is built for", "example": 24, "readOnly": true, "type": [ "integer", "null" ] } }, "links": [ { "description": "Create a new review app", "href": "/review-apps", "method": "POST", "rel": "create", "schema": { "properties": { "branch": { "$ref": "#/definitions/review-app/definitions/branch" }, "pr_number": { "$ref": "#/definitions/review-app/definitions/pr_number" }, "pipeline": { "$ref": "#/definitions/pipeline/definitions/id" }, "source_blob": { "$ref": "#/definitions/review-app/definitions/source_blob" }, "environment": { "$ref": "#/definitions/review-app/definitions/config_vars", "description": "A set of key value pairs which will be put into the environment of the spawned review app process." }, "fork_repo_id": { "$ref": "#/definitions/review-app/definitions/fork_repo_id" } }, "required": [ "branch", "pipeline", "source_blob" ], "type": [ "object" ] }, "title": "Create", "targetSchema": { "$ref": "#/definitions/review-app" } }, { "description": "Gets an existing review app", "href": "/review-apps/{(%23%2Fdefinitions%2Freview-app%2Fdefinitions%2Fid)}", "method": "GET", "targetSchema": { "$ref": "#/definitions/review-app" }, "title": "Get review app" }, { "description": "Delete an existing review app", "href": "/review-apps/{(%23%2Fdefinitions%2Freview-app%2Fdefinitions%2Fid)}", "method": "DELETE", "rel": "delete", "targetSchema": { "$ref": "#/definitions/review-app" }, "title": "Delete" }, { "description": "Get a review app using the associated app_id", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/review-app", "method": "GET", "title": "Get review app by app_id", "targetSchema": { "$ref": "#/definitions/review-app" } }, { "description": "List review apps for a pipeline", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/review-apps", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/review-app" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "app": { "description": "the Heroku app associated to this review app", "properties": { "id": { "$ref": "#/definitions/app/definitions/id" } }, "type": [ "null", "object" ] }, "app_setup": { "description": "the app setup for this review app", "properties": { "id": { "$ref": "#/definitions/app-setup/definitions/id" } }, "type": [ "null", "object" ] }, "branch": { "$ref": "#/definitions/review-app/definitions/branch" }, "created_at": { "$ref": "#/definitions/review-app/definitions/created_at" }, "id": { "$ref": "#/definitions/review-app/definitions/id" }, "pipeline": { "description": "the pipeline which this review app belongs to", "properties": { "id": { "$ref": "#/definitions/pipeline/definitions/id" } }, "type": [ "object" ] }, "status": { "$ref": "#/definitions/review-app/definitions/status" }, "updated_at": { "$ref": "#/definitions/review-app/definitions/updated_at" }, "creator": { "$ref": "#/definitions/review-app/definitions/creator" }, "wait_for_ci": { "$ref": "#/definitions/review-app/definitions/wait_for_ci" }, "error_status": { "$ref": "#/definitions/review-app/definitions/error_status" }, "message": { "$ref": "#/definitions/review-app/definitions/message" }, "fork_repo": { "properties": { "id": { "$ref": "#/definitions/review-app/definitions/fork_repo_id" } }, "strictProperties": true, "type": [ "object", "null" ] }, "pr_number": { "$ref": "#/definitions/review-app/definitions/pr_number" } } }, "review-app-config": { "description": "Review apps can be configured for pipelines.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": false, "title": "Heroku Platform API - Review App Configuration", "type": [ "object" ], "definitions": { "id": { "description": "unique identifier of pipeline", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "repo": { "description": "repository name", "example": "heroku/homebrew-brew", "readOnly": true, "type": [ "string" ] }, "automatic_review_apps": { "description": "enable automatic review apps for pull requests", "example": true, "readOnly": true, "type": [ "boolean" ] }, "repo_id": { "description": "repository id", "example": "123456", "readOnly": true, "type": [ "integer" ] }, "destroy_stale_apps": { "description": "automatically destroy review apps when they haven't been deployed for a number of days", "example": true, "readOnly": true, "type": [ "boolean" ] }, "stale_days": { "description": "number of days without a deployment after which to consider a review app stale", "example": "5", "readOnly": true, "type": [ "integer" ] }, "wait_for_ci": { "description": "If true, review apps are created only when CI passes", "example": true, "readOnly": true, "type": [ "boolean" ] }, "base_name": { "description": "A unique prefix that will be used to create review app names", "example": "singular-app", "readOnly": true, "type": [ "null", "string" ] }, "deploy_target": { "description": "the deploy target for the review apps of a pipeline", "definitions": { "id": { "description": "unique identifier of deploy target", "example": "us", "pattern": "(^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$|^[a-z]{2}$)", "readOnly": true, "type": [ "string" ] }, "type": { "description": "type of deploy target", "example": "region", "pattern": "(^space$|^region$)", "readOnly": true, "type": [ "string" ] } }, "links": [ ], "properties": { "id": { "$ref": "#/definitions/review-app-config/definitions/deploy_target/definitions/id" }, "type": { "$ref": "#/definitions/review-app-config/definitions/deploy_target/definitions/type" } }, "required": [ "id", "type" ], "type": [ "object", "null" ] } }, "links": [ { "description": "Enable review apps for a pipeline", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/review-app-config", "method": "POST", "rel": "create", "schema": { "properties": { "repo": { "$ref": "#/definitions/review-app-config/definitions/repo", "description": "The full_name of the repository that you want enable review-apps from." }, "automatic_review_apps": { "$ref": "#/definitions/review-app-config/definitions/automatic_review_apps", "description": "If true, this will trigger the creation of review apps when pull-requests are opened in the repo." }, "destroy_stale_apps": { "$ref": "#/definitions/review-app-config/definitions/destroy_stale_apps", "description": "If true, this will trigger automatic deletion of review apps when they're stale" }, "stale_days": { "$ref": "#/definitions/review-app-config/definitions/stale_days", "description": "If destroy_stale_apps is true, then apps will be destroyed after this many days" }, "deploy_target": { "$ref": "#/definitions/review-app-config/definitions/deploy_target", "description": "Provides a key/value pair to specify whether to use a common runtime or a private space" }, "wait_for_ci": { "$ref": "#/definitions/review-app-config/definitions/wait_for_ci", "description": "If true, review apps will only be created when CI passes" }, "base_name": { "$ref": "#/definitions/review-app-config/definitions/base_name", "description": "A unique prefix that will be used to create review app names" } }, "required": [ "repo" ], "type": [ "object" ] }, "title": "Enable", "targetSchema": { "$ref": "#/definitions/review-app-config" } }, { "description": "Get review apps configuration for a pipeline", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/review-app-config", "method": "GET", "rel": "self", "title": "Info", "targetSchema": { "$ref": "#/definitions/review-app-config" } }, { "description": "Update review app configuration for a pipeline", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/review-app-config", "method": "PATCH", "rel": "update", "schema": { "properties": { "automatic_review_apps": { "$ref": "#/definitions/review-app-config/definitions/automatic_review_apps", "description": "If true, this will trigger the creation of review apps when pull-requests are opened in the repo" }, "destroy_stale_apps": { "$ref": "#/definitions/review-app-config/definitions/destroy_stale_apps", "description": "If true, this will trigger automatic deletion of review apps when they're stale" }, "stale_days": { "$ref": "#/definitions/review-app-config/definitions/stale_days", "description": "If destroy_stale_apps is true, then apps will be destroyed after this many days" }, "deploy_target": { "$ref": "#/definitions/review-app-config/definitions/deploy_target", "description": "Provides a key/value pair to specify whether to use a common runtime or a private space" }, "wait_for_ci": { "$ref": "#/definitions/review-app-config/definitions/wait_for_ci", "description": "If true, review apps will only be created when CI passes" }, "base_name": { "$ref": "#/definitions/review-app-config/definitions/base_name", "description": "A unique prefix that will be used to create review app names" } }, "type": [ "object" ] }, "title": "Update", "targetSchema": { "$ref": "#/definitions/review-app-config" } }, { "description": "Disable review apps for a pipeline", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/review-app-config", "method": "DELETE", "rel": "destroy", "title": "Delete", "targetSchema": { "$ref": "#/definitions/review-app-config" } } ], "properties": { "repo": { "properties": { "id": { "$ref": "#/definitions/review-app-config/definitions/repo_id" } }, "strictProperties": true, "type": [ "object" ] }, "automatic_review_apps": { "$ref": "#/definitions/review-app-config/definitions/automatic_review_apps" }, "deploy_target": { "$ref": "#/definitions/review-app-config/definitions/deploy_target" }, "destroy_stale_apps": { "$ref": "#/definitions/review-app-config/definitions/destroy_stale_apps" }, "stale_days": { "$ref": "#/definitions/review-app-config/definitions/stale_days" }, "pipeline_id": { "$ref": "#/definitions/review-app-config/definitions/id" }, "wait_for_ci": { "$ref": "#/definitions/review-app-config/definitions/wait_for_ci" }, "base_name": { "$ref": "#/definitions/review-app-config/definitions/base_name" } } }, "slug": { "description": "A slug is a snapshot of your application code that is ready to run on the platform.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Slug", "type": [ "object" ], "definitions": { "buildpack_provided_description": { "description": "description from buildpack of slug", "example": "Ruby/Rack", "readOnly": false, "type": [ "null", "string" ] }, "checksum": { "description": "an optional checksum of the slug for verifying its integrity", "example": "SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "readOnly": true, "type": [ "null", "string" ] }, "commit": { "description": "identification of the code with your version control system (eg: SHA of the git HEAD)", "example": "60883d9e8947a57e04dc9124f25df004866a2051", "readOnly": false, "type": [ "null", "string" ] }, "commit_description": { "description": "an optional description of the provided commit", "example": "fixed a bug with API documentation", "readOnly": false, "type": [ "null", "string" ] }, "created_at": { "description": "when slug was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of slug", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/slug/definitions/id" } ] }, "method": { "description": "method to be used to interact with the slug blob", "example": "GET", "readOnly": true, "type": [ "string" ] }, "process_types": { "additionalProperties": false, "description": "hash mapping process type names to their respective command", "example": { "web": "./bin/web -p $PORT" }, "patternProperties": { "^[-\\w]{1,128}$": { "type": [ "string" ] } }, "readOnly": false, "type": [ "object" ] }, "size": { "default": null, "description": "size of slug, in bytes", "example": 2048, "readOnly": true, "type": [ "integer", "null" ] }, "updated_at": { "description": "when slug was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "url": { "description": "URL to interact with the slug blob", "example": "https://api.heroku.com/slugs/1234.tgz", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Info for existing slug.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/slugs/{(%23%2Fdefinitions%2Fslug%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/slug" }, "title": "Info" }, { "description": "Create a new slug. For more information please refer to [Deploying Slugs using the Platform API](https://devcenter.heroku.com/articles/platform-api-deploying-slugs).", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/slugs", "method": "POST", "rel": "create", "schema": { "properties": { "buildpack_provided_description": { "$ref": "#/definitions/slug/definitions/buildpack_provided_description" }, "checksum": { "$ref": "#/definitions/slug/definitions/checksum" }, "commit": { "$ref": "#/definitions/slug/definitions/commit" }, "commit_description": { "$ref": "#/definitions/slug/definitions/commit_description" }, "process_types": { "$ref": "#/definitions/slug/definitions/process_types" }, "stack": { "$ref": "#/definitions/stack/definitions/identity" } }, "required": [ "process_types" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/slug", "example": { "blob": { "method": "PUT", "url": "https://api.heroku.com/slugs/1234.tgz" }, "buildpack_provided_description": "Ruby/Rack", "checksum": "SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "commit": "60883d9e8947a57e04dc9124f25df004866a2051", "commit_description": "fixed a bug with API documentation", "created_at": "2012-01-01T12:00:00Z", "id": "01234567-89ab-cdef-0123-456789abcdef", "process_types": { "web": "./bin/web -p $PORT" }, "size": 2048, "stack": { "id": "01234567-89ab-cdef-0123-456789abcdef", "name": "heroku-18" }, "updated_at": "2012-01-01T12:00:00Z" } }, "title": "Create" } ], "properties": { "blob": { "description": "pointer to the url where clients can fetch or store the actual release binary", "properties": { "method": { "$ref": "#/definitions/slug/definitions/method" }, "url": { "$ref": "#/definitions/slug/definitions/url" } }, "strictProperties": true, "type": [ "object" ] }, "buildpack_provided_description": { "$ref": "#/definitions/slug/definitions/buildpack_provided_description" }, "checksum": { "$ref": "#/definitions/slug/definitions/checksum" }, "commit": { "$ref": "#/definitions/slug/definitions/commit" }, "commit_description": { "$ref": "#/definitions/slug/definitions/commit_description" }, "created_at": { "$ref": "#/definitions/slug/definitions/created_at" }, "id": { "$ref": "#/definitions/slug/definitions/id" }, "process_types": { "$ref": "#/definitions/slug/definitions/process_types" }, "size": { "$ref": "#/definitions/slug/definitions/size" }, "stack": { "description": "identity of slug stack", "properties": { "id": { "$ref": "#/definitions/stack/definitions/id" }, "name": { "$ref": "#/definitions/stack/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "updated_at": { "$ref": "#/definitions/slug/definitions/updated_at" } } }, "sms-number": { "description": "SMS numbers are used for recovery on accounts with two-factor authentication enabled.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - SMS Number", "type": [ "object" ], "definitions": { "sms_number": { "$ref": "#/definitions/account/definitions/sms_number" } }, "links": [ { "description": "Recover an account using an SMS recovery code", "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/sms-number", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/sms-number" }, "title": "SMS Number" }, { "description": "Recover an account using an SMS recovery code", "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/sms-number/actions/recover", "method": "POST", "rel": "self", "targetSchema": { "$ref": "#/definitions/sms-number" }, "title": "Recover" }, { "description": "Confirm an SMS number change with a confirmation code", "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/sms-number/actions/confirm", "method": "POST", "rel": "self", "targetSchema": { "$ref": "#/definitions/sms-number" }, "title": "Confirm" } ], "properties": { "sms_number": { "$ref": "#/definitions/account/definitions/sms_number" } } }, "sni-endpoint": { "description": "SNI Endpoint is a public address serving a custom SSL cert for HTTPS traffic, using the SNI TLS extension, to a Heroku app.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Heroku Platform API - SNI Endpoint", "stability": "development", "strictProperties": true, "type": [ "object" ], "definitions": { "certificate_chain": { "description": "raw contents of the public certificate chain (eg: .crt or .pem file)", "example": "-----BEGIN CERTIFICATE----- ...", "readOnly": false, "type": [ "string" ] }, "created_at": { "description": "when endpoint was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of this SNI endpoint", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/sni-endpoint/definitions/id" }, { "$ref": "#/definitions/sni-endpoint/definitions/name" } ] }, "name": { "description": "unique name for SNI endpoint", "example": "example", "pattern": "^[a-z][a-z0-9-]{2,29}$", "readOnly": true, "type": [ "string" ] }, "private_key": { "description": "contents of the private key (eg .key file)", "example": "-----BEGIN RSA PRIVATE KEY----- ...", "readOnly": false, "type": [ "string" ] }, "updated_at": { "description": "when SNI endpoint was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "domains": { "description": "domains associated with this SSL certificate", "type": [ "array" ], "readOnly": true, "items": { "$ref": "#/definitions/domain/definitions/id" } }, "display_name": { "description": "unique name for SSL certificate", "example": "example", "pattern": "^[a-z][a-z0-9-]{2,29}$", "readOnly": false, "type": [ "string", "null" ] } }, "links": [ { "description": "Create a new SNI endpoint.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/sni-endpoints", "method": "POST", "rel": "create", "schema": { "properties": { "certificate_chain": { "$ref": "#/definitions/sni-endpoint/definitions/certificate_chain" }, "private_key": { "$ref": "#/definitions/sni-endpoint/definitions/private_key" } }, "required": [ "certificate_chain", "private_key" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/sni-endpoint" }, "title": "Create" }, { "description": "Delete existing SNI endpoint.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/sni-endpoints/{(%23%2Fdefinitions%2Fsni-endpoint%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/sni-endpoint" }, "title": "Delete" }, { "description": "Info for existing SNI endpoint.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/sni-endpoints/{(%23%2Fdefinitions%2Fsni-endpoint%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/sni-endpoint" }, "title": "Info" }, { "description": "List existing SNI endpoints.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/sni-endpoints", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/sni-endpoint" }, "type": [ "array" ] }, "title": "List" }, { "description": "Update an existing SNI endpoint.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/sni-endpoints/{(%23%2Fdefinitions%2Fsni-endpoint%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "certificate_chain": { "$ref": "#/definitions/sni-endpoint/definitions/certificate_chain" }, "private_key": { "$ref": "#/definitions/sni-endpoint/definitions/private_key" } }, "required": [ "certificate_chain", "private_key" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/sni-endpoint" }, "title": "Update" } ], "properties": { "certificate_chain": { "$ref": "#/definitions/sni-endpoint/definitions/certificate_chain" }, "created_at": { "$ref": "#/definitions/sni-endpoint/definitions/created_at" }, "id": { "$ref": "#/definitions/sni-endpoint/definitions/id" }, "name": { "$ref": "#/definitions/sni-endpoint/definitions/name" }, "updated_at": { "$ref": "#/definitions/sni-endpoint/definitions/updated_at" }, "display_name": { "$ref": "#/definitions/sni-endpoint/definitions/display_name" }, "domains": { "$ref": "#/definitions/sni-endpoint/definitions/domains" }, "app": { "description": "application that this SSL certificate is on", "properties": { "id": { "$ref": "#/definitions/app/definitions/id" }, "name": { "$ref": "#/definitions/app/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "ssl_cert": { "description": "certificate provided by this endpoint", "type": [ "object" ], "properties": { "ca_signed?": { "$ref": "#/definitions/ssl-endpoint/definitions/ca_signed?" }, "cert_domains": { "$ref": "#/definitions/ssl-endpoint/definitions/cert_domains" }, "expires_at": { "$ref": "#/definitions/ssl-endpoint/definitions/expires_at" }, "issuer": { "$ref": "#/definitions/ssl-endpoint/definitions/issuer" }, "self_signed?": { "$ref": "#/definitions/ssl-endpoint/definitions/self_signed?" }, "starts_at": { "$ref": "#/definitions/ssl-endpoint/definitions/starts_at" }, "subject": { "$ref": "#/definitions/ssl-endpoint/definitions/subject" }, "id": { "description": "unique identifier of this SSL certificate", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] } } } } }, "source": { "description": "A source is a location for uploading and downloading an application's source code.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Source", "type": [ "object" ], "definitions": { "get_url": { "description": "URL to download the source", "example": "https://api.heroku.com/sources/1234.tgz", "readOnly": true, "type": [ "string" ] }, "put_url": { "description": "URL to upload the source", "example": "https://api.heroku.com/sources/1234.tgz", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Create URLs for uploading and downloading source.", "href": "/sources", "method": "POST", "rel": "create", "targetSchema": { "$ref": "#/definitions/source" }, "title": "Create" }, { "deactivate_on": "2017-08-01", "description": "Create URLs for uploading and downloading source. Deprecated in favor of `POST /sources`", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/sources", "method": "POST", "rel": "create", "targetSchema": { "$ref": "#/definitions/source" }, "title": "Create - Deprecated" } ], "properties": { "source_blob": { "description": "pointer to the URL where clients can fetch or store the source", "properties": { "get_url": { "$ref": "#/definitions/source/definitions/get_url" }, "put_url": { "$ref": "#/definitions/source/definitions/put_url" } }, "strictProperties": true, "type": [ "object" ] } } }, "space-app-access": { "description": "Space access represents the permissions a particular user has on a particular space.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "prototype", "title": "Heroku Platform API - Space Access", "type": [ "object" ], "definitions": { "id": { "description": "unique identifier of the space a user has permissions on", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/space-app-access/definitions/id" } ] } }, "links": [ { "description": "List permissions for a given user on a given space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/members/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/space-app-access" }, "title": "Info" }, { "description": "Update an existing user's set of permissions on a space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/members/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "type": [ "object" ], "required": [ "permissions" ], "properties": { "permissions": { "type": [ "array" ], "items": { "type": [ "object" ], "properties": { "name": { "type": [ "string" ] } } } } } }, "targetSchema": { "$ref": "#/definitions/space-app-access" }, "title": "Update" }, { "description": "List all users and their permissions on a space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/members", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/space-app-access" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "space": { "description": "space user belongs to", "properties": { "name": { "$ref": "#/definitions/app/definitions/name" }, "id": { "$ref": "#/definitions/app/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/space/definitions/created_at" }, "id": { "$ref": "#/definitions/space/definitions/id" }, "permissions": { "description": "user space permissions", "type": [ "array" ], "items": { "type": [ "object" ], "properties": { "description": { "type": [ "string" ] }, "name": { "type": [ "string" ] } } } }, "updated_at": { "$ref": "#/definitions/space/definitions/updated_at" }, "user": { "description": "identity of user account", "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "id": { "$ref": "#/definitions/account/definitions/id" } }, "strictProperties": true, "type": [ "object" ] } } }, "space-nat": { "description": "Network address translation (NAT) for stable outbound IP addresses from a space", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "prototype", "strictProperties": true, "title": "Heroku Platform API - Space Network Address Translation", "type": [ "object" ], "definitions": { "created_at": { "description": "when network address translation for a space was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "ip_v4_address": { "example": "123.123.123.123", "format": "ipv4", "pattern": "^(([01]?\\d?\\d|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d?\\d|2[0-4]\\d|25[0-5])$", "type": [ "string" ] }, "sources": { "description": "potential IPs from which outbound network traffic will originate", "readOnly": true, "type": [ "array" ], "items": { "$ref": "#/definitions/space-nat/definitions/ip_v4_address" } }, "state": { "description": "availability of network address translation for a space", "enum": [ "disabled", "updating", "enabled" ], "example": "enabled", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when network address translation for a space was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Current state of network address translation for a space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/nat", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/space-nat" }, "title": "Info" } ], "properties": { "created_at": { "$ref": "#/definitions/space-nat/definitions/created_at" }, "sources": { "$ref": "#/definitions/space-nat/definitions/sources" }, "state": { "$ref": "#/definitions/space-nat/definitions/state" }, "updated_at": { "$ref": "#/definitions/space-nat/definitions/updated_at" } } }, "space-topology": { "description": "Space Topology provides you with a mechanism for viewing all the running dynos, formations and applications for a space. This is the same data thats used to power our DNS Service Discovery.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "prototype", "strictProperties": true, "title": "Heroku Platform API - Space Topology", "type": [ "object" ], "definitions": { "version": { "description": "version of the space topology payload", "example": 1, "readOnly": true, "type": [ "integer" ] }, "dyno": { "description": "A dyno", "properties": { "id": { "$ref": "#/definitions/dyno/definitions/id" }, "number": { "description": "process number, e.g. 1 in web.1", "example": 1, "type": [ "integer" ] }, "private_ip": { "description": "RFC1918 Address of Dyno", "example": "10.0.134.42", "type": [ "string" ] }, "hostname": { "description": "localspace hostname of resource", "example": "1.example-app-90210.app.localspace", "type": [ "string" ] } }, "type": [ "object" ] }, "formation": { "description": "formations for application", "properties": { "id": { "$ref": "#/definitions/formation/definitions/id" }, "process_type": { "description": "Name of process type", "example": "web", "type": [ "string" ] }, "dynos": { "description": "Current dynos for application", "items": { "$ref": "#/definitions/space-topology/definitions/dyno" }, "type": [ "array" ] } }, "type": [ "object" ] } }, "links": [ { "description": "Current space topology", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/topology", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/space-topology" }, "title": "Topology" } ], "properties": { "version": { "$ref": "#/definitions/space-topology/definitions/version" }, "apps": { "description": "The apps within this space", "type": [ "array" ], "readOnly": true, "items": { "type": [ "object" ], "properties": { "id": { "$ref": "#/definitions/app/definitions/id", "readOnly": true }, "domains": { "example": [ "example.com", "example.net" ], "readOnly": true, "type": [ "array" ] }, "formation": { "description": "formations for application", "items": { "$ref": "#/definitions/space-topology/definitions/formation" }, "type": [ "array" ], "readOnly": true } } } } } }, "space-transfer": { "description": "Transfer spaces between enterprise teams with the same Enterprise Account.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Space Transfer", "type": [ "object" ], "links": [ { "description": "Transfer space between enterprise teams", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/transfer", "method": "POST", "rel": "transfer", "schema": { "properties": { "new_owner": { "$ref": "#/definitions/team/definitions/name" } }, "required": [ "new_owner" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/space" }, "title": "transfer" } ] }, "space": { "description": "A space is an isolated, highly available, secure app execution environment.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "prototype", "strictProperties": true, "title": "Heroku Platform API - Space", "type": [ "object" ], "definitions": { "created_at": { "description": "when space was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "id": { "description": "unique identifier of space", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/space/definitions/id" }, { "$ref": "#/definitions/space/definitions/name" } ] }, "name": { "description": "unique name of space", "example": "nasa", "readOnly": false, "pattern": "^[a-z0-9](?:[a-z0-9]|-(?!-))+[a-z0-9]$", "type": [ "string" ] }, "shield": { "description": "true if this space has shield enabled", "readOnly": true, "example": true, "type": [ "boolean" ] }, "state": { "description": "availability of this space", "enum": [ "allocating", "allocated", "deleting" ], "example": "allocated", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when space was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "log_drain_url": { "description": "URL to which all apps will drain logs. Only settable during space creation and enables direct logging. Must use HTTPS.", "example": "https://example.com/logs", "type": [ "string" ] }, "cidr": { "description": "The RFC-1918 CIDR the Private Space will use. It must be a /16 in 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16", "example": "172.20.20.30/16", "default": "10.0.0.0/16", "pattern": "^((?:10|172\\.(?:1[6-9]|2[0-9]|3[01])|192\\.168)\\..*.+\\/16)$", "readOnly": false, "type": [ "string" ] }, "data_cidr": { "description": "The RFC-1918 CIDR that the Private Space will use for the Heroku-managed peering connection that's automatically created when using Heroku Data add-ons. It must be between a /16 and a /20", "example": "10.2.0.0/16", "readOnly": false, "type": [ "string" ] } }, "links": [ { "description": "List existing spaces.", "href": "/spaces", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/space" }, "type": [ "array" ] }, "title": "List" }, { "description": "Info for existing space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/space" }, "title": "Info" }, { "description": "Update an existing space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "name": { "$ref": "#/definitions/space/definitions/name" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/space" }, "title": "Update" }, { "description": "Delete an existing space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/space" }, "title": "Delete" }, { "description": "Create a new space.", "href": "/spaces", "method": "POST", "rel": "create", "schema": { "properties": { "name": { "$ref": "#/definitions/space/definitions/name" }, "team": { "$ref": "#/definitions/team/definitions/name" }, "region": { "$ref": "#/definitions/region/definitions/identity" }, "shield": { "$ref": "#/definitions/space/definitions/shield" }, "cidr": { "$ref": "#/definitions/space/definitions/cidr" }, "data_cidr": { "$ref": "#/definitions/space/definitions/data_cidr" }, "log_drain_url": { "$ref": "#/definitions/space/definitions/log_drain_url" } }, "required": [ "name", "team" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/space" }, "title": "Create" } ], "properties": { "created_at": { "$ref": "#/definitions/space/definitions/created_at" }, "id": { "$ref": "#/definitions/space/definitions/id" }, "name": { "$ref": "#/definitions/space/definitions/name" }, "organization": { "description": "organization that owns this space", "properties": { "name": { "$ref": "#/definitions/team/definitions/name" } }, "type": [ "object" ] }, "team": { "description": "team that owns this space", "properties": { "id": { "$ref": "#/definitions/team/definitions/id" }, "name": { "$ref": "#/definitions/team/definitions/name" } }, "type": [ "object" ] }, "region": { "description": "identity of space region", "properties": { "id": { "$ref": "#/definitions/region/definitions/id" }, "name": { "$ref": "#/definitions/region/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "shield": { "$ref": "#/definitions/space/definitions/shield" }, "state": { "$ref": "#/definitions/space/definitions/state" }, "updated_at": { "$ref": "#/definitions/space/definitions/updated_at" }, "cidr": { "$ref": "#/definitions/space/definitions/cidr" }, "data_cidr": { "$ref": "#/definitions/space/definitions/data_cidr" } } }, "ssl-endpoint": { "description": "[SSL Endpoint](https://devcenter.heroku.com/articles/ssl-endpoint) is a public address serving custom SSL cert for HTTPS traffic to a Heroku app. Note that an app must have the `ssl:endpoint` add-on installed before it can provision an SSL Endpoint using these APIs.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Heroku Platform API - SSL Endpoint", "stability": "production", "strictProperties": true, "type": [ "object" ], "definitions": { "acm": { "readOnly": true, "type": [ "boolean" ] }, "ca_signed?": { "readOnly": true, "type": [ "boolean" ] }, "cert_domains": { "readOnly": true, "type": [ "array" ] }, "certificate_chain": { "description": "raw contents of the public certificate chain (eg: .crt or .pem file)", "example": "-----BEGIN CERTIFICATE----- ...", "readOnly": false, "type": [ "string" ] }, "cname": { "description": "canonical name record, the address to point a domain at", "example": "example.herokussl.com", "readOnly": false, "type": [ "string" ] }, "created_at": { "description": "when endpoint was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "display_name": { "description": "unique name for SSL endpoint", "example": "example", "pattern": "^[a-z][a-z0-9-]{2,29}$", "readOnly": false, "type": [ "string", "null" ] }, "expires_at": { "readOnly": true, "format": "date-time", "type": [ "string" ] }, "id": { "description": "unique identifier of this SSL endpoint", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/ssl-endpoint/definitions/id" }, { "$ref": "#/definitions/ssl-endpoint/definitions/name" } ] }, "issuer": { "readOnly": true, "type": [ "string" ] }, "name": { "description": "unique name for SSL endpoint", "example": "example", "pattern": "^[a-z][a-z0-9-]{2,29}$", "readOnly": true, "type": [ "string" ] }, "preprocess": { "default": true, "description": "allow Heroku to modify an uploaded public certificate chain if deemed advantageous by adding missing intermediaries, stripping unnecessary ones, etc.", "example": true, "readOnly": false, "type": [ "boolean" ] }, "private_key": { "description": "contents of the private key (eg .key file)", "example": "-----BEGIN RSA PRIVATE KEY----- ...", "readOnly": false, "type": [ "string" ] }, "self_signed?": { "readOnly": true, "type": [ "boolean" ] }, "starts_at": { "readOnly": true, "format": "date-time", "type": [ "string" ] }, "subject": { "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when endpoint was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Create a new SSL endpoint.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints", "method": "POST", "rel": "create", "schema": { "properties": { "certificate_chain": { "$ref": "#/definitions/ssl-endpoint/definitions/certificate_chain" }, "preprocess": { "$ref": "#/definitions/ssl-endpoint/definitions/preprocess" }, "private_key": { "$ref": "#/definitions/ssl-endpoint/definitions/private_key" } }, "required": [ "certificate_chain", "private_key" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/ssl-endpoint" }, "title": "Create" }, { "description": "Delete existing SSL endpoint.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints/{(%23%2Fdefinitions%2Fssl-endpoint%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/ssl-endpoint" }, "title": "Delete" }, { "description": "Info for existing SSL endpoint.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints/{(%23%2Fdefinitions%2Fssl-endpoint%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/ssl-endpoint" }, "title": "Info" }, { "description": "List existing SSL endpoints.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/ssl-endpoint" }, "type": [ "array" ] }, "title": "List" }, { "description": "Update an existing SSL endpoint.", "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints/{(%23%2Fdefinitions%2Fssl-endpoint%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "certificate_chain": { "$ref": "#/definitions/ssl-endpoint/definitions/certificate_chain" }, "preprocess": { "$ref": "#/definitions/ssl-endpoint/definitions/preprocess" }, "private_key": { "$ref": "#/definitions/ssl-endpoint/definitions/private_key" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/ssl-endpoint" }, "title": "Update" } ], "properties": { "app": { "description": "application associated with this ssl-endpoint", "type": [ "object" ], "properties": { "id": { "$ref": "#/definitions/app/definitions/id" }, "name": { "$ref": "#/definitions/app/definitions/name" } }, "strictProperties": true }, "certificate_chain": { "$ref": "#/definitions/ssl-endpoint/definitions/certificate_chain" }, "cname": { "$ref": "#/definitions/ssl-endpoint/definitions/cname" }, "created_at": { "$ref": "#/definitions/ssl-endpoint/definitions/created_at" }, "display_name": { "$ref": "#/definitions/ssl-endpoint/definitions/display_name" }, "domains": { "description": "domains associated with this endpoint", "type": [ "array" ], "items": { "$ref": "#/definitions/domain/definitions/id" } }, "id": { "$ref": "#/definitions/ssl-endpoint/definitions/id" }, "name": { "$ref": "#/definitions/ssl-endpoint/definitions/name" }, "ssl_cert": { "description": "certificate provided by this endpoint", "type": [ "object" ], "properties": { "ca_signed?": { "$ref": "#/definitions/ssl-endpoint/definitions/ca_signed?" }, "cert_domains": { "$ref": "#/definitions/ssl-endpoint/definitions/cert_domains" }, "expires_at": { "$ref": "#/definitions/ssl-endpoint/definitions/expires_at" }, "issuer": { "$ref": "#/definitions/ssl-endpoint/definitions/issuer" }, "self_signed?": { "$ref": "#/definitions/ssl-endpoint/definitions/self_signed?" }, "starts_at": { "$ref": "#/definitions/ssl-endpoint/definitions/starts_at" }, "subject": { "$ref": "#/definitions/ssl-endpoint/definitions/subject" }, "id": { "description": "unique identifier of this SSL certificate", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] } } }, "updated_at": { "$ref": "#/definitions/ssl-endpoint/definitions/updated_at" } } }, "stack": { "description": "Stacks are the different application execution environments available in the Heroku platform.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Stack", "type": [ "object" ], "definitions": { "created_at": { "description": "when stack was introduced", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "default": { "description": "indicates this stack is the default for new apps", "example": true, "readOnly": true, "type": [ "boolean" ] }, "id": { "description": "unique identifier of stack", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/stack/definitions/name" }, { "$ref": "#/definitions/stack/definitions/id" } ] }, "name": { "description": "unique name of stack", "example": "heroku-18", "readOnly": true, "type": [ "string" ] }, "state": { "description": "availability of this stack: beta, deprecated or public", "example": "public", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when stack was last modified", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Stack info.", "href": "/stacks/{(%23%2Fdefinitions%2Fstack%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/stack" }, "title": "Info" }, { "description": "List available stacks.", "href": "/stacks", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/stack" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "default": { "$ref": "#/definitions/stack/definitions/default" }, "created_at": { "$ref": "#/definitions/stack/definitions/created_at" }, "id": { "$ref": "#/definitions/stack/definitions/id" }, "name": { "$ref": "#/definitions/stack/definitions/name" }, "state": { "$ref": "#/definitions/stack/definitions/state" }, "updated_at": { "$ref": "#/definitions/stack/definitions/updated_at" } } }, "team-add-on": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "title": "Heroku Platform API - Team Add-on", "type": [ "object" ], "links": [ { "description": "List add-ons used across all Team apps", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/addons", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/add-on" }, "type": [ "array" ] }, "title": "List For Team" } ] }, "team-app-collaborator": { "description": "A team collaborator represents an account that has been given access to a team app on Heroku.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "development", "title": "Heroku Platform API - Team App Collaborator", "type": [ "object" ], "definitions": { "identity": { "anyOf": [ { "$ref": "#/definitions/collaborator/definitions/email" } ] } }, "links": [ { "description": "Create a new collaborator on a team app. Use this endpoint instead of the `/apps/{app_id_or_name}/collaborator` endpoint when you want the collaborator to be granted [permissions] (https://devcenter.heroku.com/articles/org-users-access#roles-and-permissions) according to their role in the team.", "href": "/teams/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators", "method": "POST", "rel": "create", "schema": { "properties": { "permissions": { "type": [ "array" ], "items": { "$ref": "#/definitions/team-app-permission/definitions/name" }, "description": "An array of permissions to give to the collaborator." }, "silent": { "$ref": "#/definitions/collaborator/definitions/silent" }, "user": { "$ref": "#/definitions/account/definitions/identity" } }, "required": [ "user" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/team-app-collaborator" }, "title": "Create" }, { "description": "Delete an existing collaborator from a team app.", "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Fteam-app-collaborator%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/team-app-collaborator" }, "title": "Delete" }, { "description": "Info for a collaborator on a team app.", "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Fteam-app-collaborator%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/team-app-collaborator" }, "title": "Info" }, { "description": "Update an existing collaborator from a team app.", "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Fteam-app-collaborator%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "permissions": { "type": [ "array" ], "items": { "$ref": "#/definitions/team-app-permission/definitions/name" }, "description": "An array of permissions to give to the collaborator." } }, "required": [ "permissions" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/team-app-collaborator" }, "title": "Update" }, { "description": "List collaborators on a team app.", "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}/collaborators", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/team-app-collaborator" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "app": { "description": "app collaborator belongs to", "properties": { "name": { "$ref": "#/definitions/app/definitions/name" }, "id": { "$ref": "#/definitions/app/definitions/id" } }, "strictProperties": true, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/collaborator/definitions/created_at" }, "id": { "$ref": "#/definitions/collaborator/definitions/id" }, "permissions": { "type": [ "array" ], "items": { "$ref": "#/definitions/team-app-permission" }, "description": "array of permissions for the collaborator (only applicable if the app is on a team)" }, "role": { "$ref": "#/definitions/team/definitions/role" }, "updated_at": { "$ref": "#/definitions/collaborator/definitions/updated_at" }, "user": { "description": "identity of collaborated account", "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "federated": { "$ref": "#/definitions/account/definitions/federated" }, "id": { "$ref": "#/definitions/account/definitions/id" } }, "strictProperties": true, "type": [ "object" ] } } }, "team-app-permission": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "A team app permission is a behavior that is assigned to a user in a team app.", "stability": "prototype", "title": "Heroku Platform API - Team App Permission", "type": [ "object" ], "definitions": { "identity": { "anyOf": [ { "$ref": "#/definitions/team-app-permission/definitions/name" } ] }, "name": { "description": "The name of the app permission.", "example": "view", "readOnly": true, "type": [ "string" ] }, "description": { "description": "A description of what the app permission allows.", "example": "Can manage config, deploy, run commands and restart the app.", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Lists permissions available to teams.", "href": "/teams/permissions", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/team-app-permission" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "name": { "$ref": "#/definitions/team-app-permission/definitions/name" }, "description": { "$ref": "#/definitions/team-app-permission/definitions/description" } } }, "team-app": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "A team app encapsulates the team specific functionality of Heroku apps.", "stability": "development", "title": "Heroku Platform API - Team App", "type": [ "object" ], "definitions": { "locked": { "default": false, "description": "are other team members forbidden from joining this app.", "example": false, "type": [ "boolean" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/app/definitions/name" } ] }, "internal_routing": { "default": false, "description": "describes whether a Private Spaces app is externally routable or not", "example": false, "readOnly": false, "type": [ "boolean", "null" ] }, "joined": { "default": false, "description": "is the current member a collaborator on this app.", "example": false, "type": [ "boolean" ] }, "personal": { "default": false, "description": "force creation of the app in the user account even if a default team is set.", "example": false, "type": [ "boolean" ] } }, "links": [ { "description": "Create a new app in the specified team, in the default team if unspecified, or in personal account, if default team is not set.", "href": "/teams/apps", "method": "POST", "rel": "create", "schema": { "properties": { "locked": { "$ref": "#/definitions/team-app/definitions/locked" }, "name": { "$ref": "#/definitions/app/definitions/name" }, "team": { "$ref": "#/definitions/team/definitions/name" }, "personal": { "$ref": "#/definitions/team-app/definitions/personal" }, "region": { "$ref": "#/definitions/region/definitions/name" }, "space": { "$ref": "#/definitions/space/definitions/name" }, "stack": { "$ref": "#/definitions/stack/definitions/name" }, "internal_routing": { "$ref": "#/definitions/team-app/definitions/internal_routing" } }, "type": [ "object" ] }, "title": "Create" }, { "description": "Info for a team app.", "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "title": "Info" }, { "description": "Lock or unlock a team app.", "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "locked": { "$ref": "#/definitions/team-app/definitions/locked" } }, "required": [ "locked" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/team-app" }, "title": "Update Locked" }, { "description": "Transfer an existing team app to another Heroku account.", "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "owner": { "$ref": "#/definitions/account/definitions/identity" } }, "required": [ "owner" ], "type": [ "object" ] }, "title": "Transfer to Account" }, { "description": "Transfer an existing team app to another team.", "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "owner": { "$ref": "#/definitions/team/definitions/name" } }, "required": [ "owner" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/team-app" }, "title": "Transfer to Team" }, { "description": "List team apps.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/apps", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/team-app" }, "type": [ "array" ] }, "title": "List By Team" } ], "properties": { "archived_at": { "$ref": "#/definitions/app/definitions/archived_at" }, "buildpack_provided_description": { "$ref": "#/definitions/app/definitions/buildpack_provided_description" }, "build_stack": { "description": "identity of the stack that will be used for new builds", "properties": { "id": { "$ref": "#/definitions/stack/definitions/id" }, "name": { "$ref": "#/definitions/stack/definitions/name" } }, "type": [ "object" ] }, "created_at": { "$ref": "#/definitions/app/definitions/created_at" }, "git_url": { "$ref": "#/definitions/app/definitions/git_url" }, "id": { "$ref": "#/definitions/app/definitions/id" }, "internal_routing": { "$ref": "#/definitions/team-app/definitions/internal_routing" }, "joined": { "$ref": "#/definitions/team-app/definitions/joined" }, "locked": { "$ref": "#/definitions/team-app/definitions/locked" }, "maintenance": { "$ref": "#/definitions/app/definitions/maintenance" }, "name": { "$ref": "#/definitions/app/definitions/name" }, "team": { "description": "team that owns this app", "properties": { "name": { "$ref": "#/definitions/team/definitions/name" } }, "type": [ "null", "object" ] }, "owner": { "description": "identity of app owner", "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "id": { "$ref": "#/definitions/account/definitions/id" } }, "type": [ "null", "object" ] }, "region": { "description": "identity of app region", "properties": { "id": { "$ref": "#/definitions/region/definitions/id" }, "name": { "$ref": "#/definitions/region/definitions/name" } }, "type": [ "object" ] }, "released_at": { "$ref": "#/definitions/app/definitions/released_at" }, "repo_size": { "$ref": "#/definitions/app/definitions/repo_size" }, "slug_size": { "$ref": "#/definitions/app/definitions/slug_size" }, "space": { "description": "identity of space", "properties": { "id": { "$ref": "#/definitions/space/definitions/id" }, "name": { "$ref": "#/definitions/space/definitions/name" } }, "type": [ "null", "object" ] }, "stack": { "description": "identity of app stack", "properties": { "id": { "$ref": "#/definitions/stack/definitions/id" }, "name": { "$ref": "#/definitions/stack/definitions/name" } }, "type": [ "object" ] }, "updated_at": { "$ref": "#/definitions/app/definitions/updated_at" }, "web_url": { "$ref": "#/definitions/app/definitions/web_url" } } }, "team-daily-usage": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "Usage for an enterprise team at a daily resolution.", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Team Daily Usage", "type": [ "object" ], "definitions": { "addons": { "description": "total add-on credits used", "example": 250.0, "readOnly": true, "type": [ "number" ] }, "app_usage_daily": { "description": "Usage for an app at a daily resolution.", "type": [ "object" ], "properties": { "addons": { "$ref": "#/definitions/team-daily-usage/definitions/addons" }, "app_name": { "$ref": "#/definitions/app/definitions/name" }, "data": { "$ref": "#/definitions/team-daily-usage/definitions/data" }, "dynos": { "$ref": "#/definitions/team-daily-usage/definitions/dynos" }, "partner": { "$ref": "#/definitions/team-daily-usage/definitions/partner" } } }, "data": { "description": "total add-on credits used for first party add-ons", "example": 34.89, "readOnly": true, "type": [ "number" ] }, "date": { "description": "date of the usage", "example": "2019-01-01", "format": "date", "readOnly": true, "type": [ "string" ] }, "dynos": { "description": "dynos used", "example": 1.548, "readOnly": true, "type": [ "number" ] }, "id": { "description": "team identifier", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "name": { "description": "name of the team", "example": "ops", "readOnly": true, "type": [ "string" ] }, "partner": { "description": "total add-on credits used for third party add-ons", "example": 12.34, "readOnly": true, "type": [ "number" ] }, "space": { "description": "space credits used", "example": 1.548, "readOnly": true, "type": [ "number" ] }, "start_date": { "description": "range start date", "example": "2019-01-25", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$", "readOnly": true, "type": [ "string" ] }, "end_date": { "description": "range end date", "example": "2019-02-25", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Retrieves usage for an enterprise team for a range of days. Start and end dates can be specified as query parameters using the date format YYYY-MM-DD.\nThe team identifier can be found from the [team list endpoint](https://devcenter.heroku.com/articles/platform-api-reference#team-list).\n", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fid)}/usage/daily", "method": "GET", "title": "Info", "schema": { "properties": { "start": { "$ref": "#/definitions/team-daily-usage/definitions/start_date" }, "end": { "$ref": "#/definitions/team-daily-usage/definitions/end_date" } }, "required": [ "start" ], "type": [ "object" ] }, "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/team-daily-usage" }, "type": [ "array" ] } } ], "properties": { "addons": { "$ref": "#/definitions/team-daily-usage/definitions/addons" }, "apps": { "description": "app usage in the team", "type": [ "array" ], "items": { "$ref": "#/definitions/team-daily-usage/definitions/app_usage_daily" } }, "data": { "$ref": "#/definitions/team-daily-usage/definitions/data" }, "date": { "$ref": "#/definitions/team-daily-usage/definitions/date" }, "dynos": { "$ref": "#/definitions/team-daily-usage/definitions/dynos" }, "id": { "$ref": "#/definitions/team-daily-usage/definitions/id" }, "name": { "$ref": "#/definitions/team-daily-usage/definitions/name" }, "partner": { "$ref": "#/definitions/team-daily-usage/definitions/partner" }, "space": { "$ref": "#/definitions/team-daily-usage/definitions/space" } } }, "team-feature": { "description": "A team feature represents a feature enabled on a team account.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Team Feature", "type": [ "object" ], "definitions": { "created_at": { "description": "when team feature was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "description": { "description": "description of team feature", "example": "Causes account to example.", "readOnly": true, "type": [ "string" ] }, "doc_url": { "description": "documentation URL of team feature", "example": "http://devcenter.heroku.com/articles/example", "readOnly": true, "type": [ "string" ] }, "enabled": { "description": "whether or not team feature has been enabled", "example": true, "readOnly": false, "type": [ "boolean" ] }, "id": { "description": "unique identifier of team feature", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/team-feature/definitions/id" }, { "$ref": "#/definitions/team-feature/definitions/name" } ] }, "name": { "description": "unique name of team feature", "example": "name", "readOnly": true, "type": [ "string" ] }, "state": { "description": "state of team feature", "example": "public", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when team feature was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "display_name": { "description": "user readable feature name", "example": "My Feature", "readOnly": true, "type": [ "string" ] }, "feedback_email": { "description": "e-mail to send feedback about the feature", "example": "feedback@heroku.com", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Info for an existing team feature.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/features/{(%23%2Fdefinitions%2Fteam-feature%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/team-feature" }, "title": "Info" }, { "description": "List existing team features.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/features", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/team-feature" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "created_at": { "$ref": "#/definitions/team-feature/definitions/created_at" }, "description": { "$ref": "#/definitions/team-feature/definitions/description" }, "doc_url": { "$ref": "#/definitions/team-feature/definitions/doc_url" }, "enabled": { "$ref": "#/definitions/team-feature/definitions/enabled" }, "id": { "$ref": "#/definitions/team-feature/definitions/id" }, "name": { "$ref": "#/definitions/team-feature/definitions/name" }, "state": { "$ref": "#/definitions/team-feature/definitions/state" }, "updated_at": { "$ref": "#/definitions/team-feature/definitions/updated_at" }, "display_name": { "$ref": "#/definitions/team-feature/definitions/display_name" }, "feedback_email": { "$ref": "#/definitions/team-feature/definitions/feedback_email" } } }, "team-invitation": { "description": "A team invitation represents an invite to a team.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Team Invitation", "type": [ "object" ], "definitions": { "created_at": { "description": "when invitation was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/team-invitation/definitions/id" } ] }, "id": { "description": "unique identifier of an invitation", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "token": { "description": "special token for invitation", "example": "614ae25aa2d4802096cd7c18625b526c", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when invitation was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Get a list of a team's Identity Providers", "title": "List", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fname)}/invitations", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/team-invitation" }, "type": [ "array" ] } }, { "description": "Create Team Invitation", "title": "Create", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/invitations", "method": "PUT", "rel": "update", "schema": { "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "role": { "$ref": "#/definitions/team/definitions/role" } }, "required": [ "email", "role" ], "type": [ "object" ] } }, { "description": "Revoke a team invitation.", "title": "Revoke", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/invitations/{(%23%2Fdefinitions%2Fteam-invitation%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "self" }, { "description": "Get an invitation by its token", "title": "Get", "href": "/teams/invitations/{(%23%2Fdefinitions%2Fteam-invitation%2Fdefinitions%2Ftoken)}", "method": "GET", "rel": "instances", "targetSchema": { "$ref": "#/definitions/team-invitation" } }, { "description": "Accept Team Invitation", "title": "Accept", "href": "/teams/invitations/{(%23%2Fdefinitions%2Fteam-invitation%2Fdefinitions%2Ftoken)}/accept", "method": "POST", "rel": "create", "targetSchema": { "$ref": "#/definitions/team-member" } } ], "properties": { "created_at": { "$ref": "#/definitions/team-invitation/definitions/created_at" }, "id": { "$ref": "#/definitions/team-invitation/definitions/id" }, "invited_by": { "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "id": { "$ref": "#/definitions/account/definitions/id" }, "name": { "$ref": "#/definitions/account/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "team": { "properties": { "id": { "$ref": "#/definitions/team/definitions/id" }, "name": { "$ref": "#/definitions/team/definitions/name" } }, "strictProperties": true, "type": [ "object" ] }, "role": { "$ref": "#/definitions/team/definitions/role" }, "updated_at": { "$ref": "#/definitions/team-invitation/definitions/updated_at" }, "user": { "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "id": { "$ref": "#/definitions/account/definitions/id" }, "name": { "$ref": "#/definitions/account/definitions/name" } }, "strictProperties": true, "type": [ "object" ] } } }, "team-invoice": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "A Team Invoice is an itemized bill of goods for a team which includes pricing and charges.", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Team Invoice", "type": [ "object" ], "definitions": { "addons_total": { "description": "total add-ons charges in on this invoice", "example": 25000, "readOnly": true, "type": [ "integer" ] }, "database_total": { "description": "total database charges on this invoice", "example": 25000, "readOnly": true, "type": [ "integer" ] }, "charges_total": { "description": "total charges on this invoice", "example": 0, "readOnly": true, "type": [ "integer" ] }, "created_at": { "description": "when invoice was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "credits_total": { "description": "total credits on this invoice", "example": 100000, "readOnly": true, "type": [ "integer" ] }, "dyno_units": { "description": "total amount of dyno units consumed across dyno types.", "example": 1.92, "readOnly": true, "type": [ "number" ] }, "id": { "description": "unique identifier of this invoice", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/team-invoice/definitions/number" } ] }, "number": { "description": "human readable invoice number", "example": 9403943, "readOnly": true, "type": [ "integer" ] }, "payment_status": { "description": "status of the invoice payment", "example": "Paid", "readOnly": true, "type": [ "string" ] }, "platform_total": { "description": "total platform charges on this invoice", "example": 50000, "readOnly": true, "type": [ "integer" ] }, "period_end": { "description": "the ending date that the invoice covers", "example": "01/31/2014", "readOnly": true, "type": [ "string" ] }, "period_start": { "description": "the starting date that this invoice covers", "example": "01/01/2014", "readOnly": true, "type": [ "string" ] }, "state": { "description": "payment status for this invoice (pending, successful, failed)", "example": 1, "readOnly": true, "type": [ "integer" ] }, "total": { "description": "combined total of charges and credits on this invoice", "example": 100000, "readOnly": true, "type": [ "integer" ] }, "updated_at": { "description": "when invoice was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "weighted_dyno_hours": { "description": "The total amount of hours consumed across dyno types.", "example": 1488, "readOnly": true, "type": [ "number" ] } }, "links": [ { "description": "Info for existing invoice.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/invoices/{(%23%2Fdefinitions%2Fteam-invoice%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/team-invoice" }, "title": "Info" }, { "description": "List existing invoices.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/invoices", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/team-invoice" }, "type": [ "array" ] }, "title": "List" } ], "properties": { "addons_total": { "$ref": "#/definitions/team-invoice/definitions/addons_total" }, "database_total": { "$ref": "#/definitions/team-invoice/definitions/database_total" }, "charges_total": { "$ref": "#/definitions/team-invoice/definitions/charges_total" }, "created_at": { "$ref": "#/definitions/team-invoice/definitions/created_at" }, "credits_total": { "$ref": "#/definitions/team-invoice/definitions/credits_total" }, "dyno_units": { "$ref": "#/definitions/team-invoice/definitions/dyno_units" }, "id": { "$ref": "#/definitions/team-invoice/definitions/id" }, "number": { "$ref": "#/definitions/team-invoice/definitions/number" }, "payment_status": { "$ref": "#/definitions/team-invoice/definitions/payment_status" }, "period_end": { "$ref": "#/definitions/team-invoice/definitions/period_end" }, "period_start": { "$ref": "#/definitions/team-invoice/definitions/period_start" }, "platform_total": { "$ref": "#/definitions/team-invoice/definitions/platform_total" }, "state": { "$ref": "#/definitions/team-invoice/definitions/state" }, "total": { "$ref": "#/definitions/team-invoice/definitions/total" }, "updated_at": { "$ref": "#/definitions/team-invoice/definitions/updated_at" }, "weighted_dyno_hours": { "$ref": "#/definitions/team-invoice/definitions/weighted_dyno_hours" } } }, "team-member": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "A team member is an individual with access to a team.", "stability": "development", "additionalProperties": false, "required": [ "created_at", "email", "federated", "updated_at" ], "title": "Heroku Platform API - Team Member", "type": [ "object" ], "definitions": { "created_at": { "description": "when the membership record was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "email": { "description": "email address of the team member", "example": "someone@example.org", "readOnly": true, "type": [ "string" ] }, "federated": { "description": "whether the user is federated and belongs to an Identity Provider", "example": false, "readOnly": true, "type": [ "boolean" ] }, "id": { "description": "unique identifier of the team member", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/team-member/definitions/email" }, { "$ref": "#/definitions/team-member/definitions/id" } ] }, "name": { "description": "full name of the team member", "example": "Tina Edmonds", "readOnly": true, "type": [ "string", "null" ] }, "team_role": { "description": "role in the team", "enum": [ "admin", "viewer", "member" ], "example": "admin", "type": [ "string" ] }, "two_factor_authentication": { "description": "whether the Enterprise team member has two factor authentication enabled", "example": true, "readOnly": true, "type": [ "boolean" ] }, "updated_at": { "description": "when the membership record was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Create a new team member, or update their role.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/members", "method": "PUT", "rel": "create", "schema": { "properties": { "email": { "$ref": "#/definitions/team-member/definitions/email" }, "federated": { "$ref": "#/definitions/team-member/definitions/federated" }, "role": { "$ref": "#/definitions/team-member/definitions/team_role" } }, "required": [ "email", "role" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/team-member" }, "title": "Create or Update" }, { "description": "Create a new team member.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/members", "method": "POST", "rel": "create", "schema": { "properties": { "email": { "$ref": "#/definitions/team-member/definitions/email" }, "federated": { "$ref": "#/definitions/team-member/definitions/federated" }, "role": { "$ref": "#/definitions/team-member/definitions/team_role" } }, "required": [ "email", "role" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/team-member" }, "title": "Create" }, { "description": "Update a team member.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/members", "method": "PATCH", "rel": "update", "schema": { "properties": { "email": { "$ref": "#/definitions/team-member/definitions/email" }, "federated": { "$ref": "#/definitions/team-member/definitions/federated" }, "role": { "$ref": "#/definitions/team-member/definitions/team_role" } }, "required": [ "email", "role" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/team-member" }, "title": "Update" }, { "description": "Remove a member from the team.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/members/{(%23%2Fdefinitions%2Fteam-member%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/team-member" }, "title": "Delete" }, { "description": "List members of the team.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/members", "method": "GET", "ranges": [ "email" ], "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/team-member" }, "type": [ "array" ] }, "title": "List" }, { "description": "List the apps of a team member.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/members/{(%23%2Fdefinitions%2Fteam-member%2Fdefinitions%2Fidentity)}/apps", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/team-app" }, "type": [ "array" ] }, "title": "List By Member" } ], "properties": { "created_at": { "$ref": "#/definitions/team-member/definitions/created_at" }, "email": { "$ref": "#/definitions/team-member/definitions/email" }, "federated": { "$ref": "#/definitions/team-member/definitions/federated" }, "id": { "$ref": "#/definitions/team-member/definitions/id" }, "identity_provider": { "description": "Identity Provider information the member is federated with", "properties": { "id": { "$ref": "#/definitions/identity-provider/definitions/id" }, "name": { "description": "name of the identity provider", "example": "acme", "readOnly": true, "type": [ "string" ] }, "redacted": { "description": "whether the identity_provider information is redacted or not", "example": false, "readOnly": true, "type": [ "boolean" ] }, "owner": { "$ref": "#/definitions/identity-provider/definitions/owner" } }, "type": [ "null", "object" ] }, "role": { "$ref": "#/definitions/team/definitions/role" }, "two_factor_authentication": { "$ref": "#/definitions/team-member/definitions/two_factor_authentication" }, "updated_at": { "$ref": "#/definitions/team-member/definitions/updated_at" }, "user": { "description": "user information for the membership", "properties": { "email": { "$ref": "#/definitions/account/definitions/email" }, "id": { "$ref": "#/definitions/account/definitions/id" }, "name": { "$ref": "#/definitions/account/definitions/name" } }, "strictProperties": true, "type": [ "object" ] } } }, "team-monthly-usage": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "Usage for an enterprise team at a monthly resolution.", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Team Monthly Usage", "type": [ "object" ], "definitions": { "addons": { "description": "total add-on credits used", "example": 250.0, "readOnly": true, "type": [ "number" ] }, "app_usage_monthly": { "description": "Usage for an app at a monthly resolution.", "type": [ "object" ], "properties": { "addons": { "$ref": "#/definitions/team-monthly-usage/definitions/addons" }, "app_name": { "$ref": "#/definitions/app/definitions/name" }, "data": { "$ref": "#/definitions/team-monthly-usage/definitions/data" }, "dynos": { "$ref": "#/definitions/team-monthly-usage/definitions/dynos" }, "partner": { "$ref": "#/definitions/team-monthly-usage/definitions/partner" } } }, "connect": { "description": "average connect rows synced", "example": 15000, "readOnly": true, "type": [ "number" ] }, "data": { "description": "total add-on credits used for first party add-ons", "example": 34.89, "readOnly": true, "type": [ "number" ] }, "dynos": { "description": "dynos used", "example": 1.548, "readOnly": true, "type": [ "number" ] }, "id": { "description": "team identifier", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "month": { "description": "year and month of the usage", "example": "2019-01", "pattern": "^[0-9]{4}-[0-9]{2}$", "readOnly": true, "type": [ "string" ] }, "name": { "description": "name of the team", "example": "ops", "readOnly": true, "type": [ "string" ] }, "partner": { "description": "total add-on credits used for third party add-ons", "example": 12.34, "readOnly": true, "type": [ "number" ] }, "space": { "description": "space credits used", "example": 1.548, "readOnly": true, "type": [ "number" ] }, "start_date": { "description": "range start date", "example": "2019-01", "pattern": "^[0-9]{4}-[0-9]{2}$", "readOnly": true, "type": [ "string" ] }, "end_date": { "description": "range end date", "example": "2019-02", "pattern": "^[0-9]{4}-[0-9]{2}$", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "Retrieves usage for an enterprise team for a range of months. Start and end dates can be specified as query parameters using the date, YYYY-MM. If no end date is specified, one month of usage is returned.\nThe team identifier can be found from the [team list endpoint](https://devcenter.heroku.com/articles/platform-api-reference#team-list).\n", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fid)}/usage/monthly", "method": "GET", "title": "Info", "schema": { "properties": { "start": { "$ref": "#/definitions/team-monthly-usage/definitions/start_date" }, "end": { "$ref": "#/definitions/team-monthly-usage/definitions/end_date" } }, "required": [ "start" ], "type": [ "object" ] }, "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/team-monthly-usage" }, "type": [ "array" ] } } ], "properties": { "addons": { "$ref": "#/definitions/team-monthly-usage/definitions/addons" }, "apps": { "description": "app usage in the team", "type": [ "array" ], "items": { "$ref": "#/definitions/team-monthly-usage/definitions/app_usage_monthly" } }, "connect": { "$ref": "#/definitions/team-monthly-usage/definitions/connect" }, "data": { "$ref": "#/definitions/team-monthly-usage/definitions/data" }, "dynos": { "$ref": "#/definitions/team-monthly-usage/definitions/dynos" }, "id": { "$ref": "#/definitions/team-monthly-usage/definitions/id" }, "month": { "$ref": "#/definitions/team-monthly-usage/definitions/month" }, "name": { "$ref": "#/definitions/team-monthly-usage/definitions/name" }, "partner": { "$ref": "#/definitions/team-monthly-usage/definitions/partner" }, "space": { "$ref": "#/definitions/team-monthly-usage/definitions/space" } } }, "team-preferences": { "description": "Tracks a Team's Preferences", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Team Preferences", "type": [ "object" ], "definitions": { "default-permission": { "description": "The default permission used when adding new members to the team", "example": "member", "readOnly": false, "enum": [ "admin", "member", "viewer", null ], "type": [ "null", "string" ] }, "identity": { "$ref": "#/definitions/team/definitions/identity" }, "addons-controls": { "description": "Whether add-on service rules should be applied to add-on installations", "example": true, "readOnly": false, "type": [ "boolean", "null" ] } }, "links": [ { "description": "Retrieve Team Preferences", "href": "/teams/{(%23%2Fdefinitions%2Fteam-preferences%2Fdefinitions%2Fidentity)}/preferences", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/team-preferences" }, "title": "List" }, { "description": "Update Team Preferences", "href": "/teams/{(%23%2Fdefinitions%2Fteam-preferences%2Fdefinitions%2Fidentity)}/preferences", "method": "PATCH", "rel": "update", "schema": { "type": [ "object" ], "properties": { "addons-controls": { "$ref": "#/definitions/team-preferences/definitions/addons-controls" } } }, "targetSchema": { "$ref": "#/definitions/team-preferences" }, "title": "Update" } ], "properties": { "default-permission": { "$ref": "#/definitions/team-preferences/definitions/default-permission" }, "addons-controls": { "$ref": "#/definitions/team-preferences/definitions/addons-controls" } } }, "team-space": { "description": "A space is an isolated, highly available, secure app execution environment.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "prototype", "strictProperties": true, "title": "Heroku Platform API - Team Space", "type": [ "object" ], "links": [ { "description": "List spaces owned by the team", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/spaces", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/space" }, "type": [ "array" ] }, "title": "List" } ] }, "team": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "Teams allow you to manage access to a shared group of applications and other resources.", "stability": "development", "strictProperties": true, "title": "Heroku Platform API - Team", "type": [ "object" ], "definitions": { "created_at": { "description": "when the team was created", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "credit_card_collections": { "description": "whether charges incurred by the team are paid by credit card.", "example": true, "readOnly": true, "type": [ "boolean" ] }, "default": { "description": "whether to use this team when none is specified", "example": true, "readOnly": false, "type": [ "boolean" ] }, "enterprise_account": { "type": [ "null", "object" ], "properties": { "id": { "$ref": "#/definitions/enterprise-account/definitions/id" }, "name": { "$ref": "#/definitions/enterprise-account/definitions/name" } } }, "id": { "description": "unique identifier of team", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/team/definitions/name" }, { "$ref": "#/definitions/team/definitions/id" } ] }, "identity_provider": { "description": "Identity Provider associated with the Team", "strictProperties": true, "type": [ "null", "object" ], "properties": { "id": { "$ref": "#/definitions/identity-provider/definitions/id" }, "name": { "$ref": "#/definitions/identity-provider/definitions/name" }, "owner": { "$ref": "#/definitions/identity-provider/definitions/owner" } } }, "device_data": { "type": [ "string", "null" ], "description": "Device data string generated by the client", "example": "VGhpcyBpcyBhIGdvb2QgZGF5IHRvIGRpZQ==" }, "nonce": { "type": [ "string", "null" ], "description": "Nonce generated by Braintree hosted fields form", "example": "VGhpcyBpcyBhIGdvb2QgZGF5IHRvIGRpZQ==" }, "address_1": { "type": [ "string" ], "description": "street address line 1", "example": "40 Hickory Lane" }, "address_2": { "type": [ "string", "null" ], "description": "street address line 2", "example": "Suite 103" }, "card_number": { "type": [ "string", "null" ], "description": "encrypted card number of payment method", "example": "encrypted-card-number" }, "city": { "type": [ "string" ], "description": "city", "example": "San Francisco" }, "country": { "type": [ "string" ], "description": "country", "example": "US" }, "cvv": { "type": [ "string", "null" ], "description": "card verification value", "example": "123" }, "expiration_month": { "type": [ "string", "null" ], "description": "expiration month", "example": "11" }, "expiration_year": { "type": [ "string", "null" ], "description": "expiration year", "example": "2014" }, "first_name": { "type": [ "string" ], "description": "the first name for payment method", "example": "Jason" }, "last_name": { "type": [ "string" ], "description": "the last name for payment method", "example": "Walker" }, "other": { "type": [ "string", "null" ], "description": "metadata", "example": "Additional information for payment method" }, "postal_code": { "type": [ "string" ], "description": "postal code", "example": "90210" }, "state": { "type": [ "string" ], "description": "state", "example": "CA" }, "membership_limit": { "description": "upper limit of members allowed in a team.", "example": 25, "readOnly": true, "type": [ "number", "null" ] }, "name": { "description": "unique name of team", "example": "example", "readOnly": true, "type": [ "string" ] }, "provisioned_licenses": { "description": "whether the team is provisioned licenses by salesforce.", "example": true, "readOnly": true, "type": [ "boolean" ] }, "role": { "description": "role in the team", "enum": [ "admin", "collaborator", "member", "owner", null ], "example": "admin", "readOnly": true, "type": [ "null", "string" ] }, "type": { "description": "type of team.", "example": "team", "enum": [ "enterprise", "team" ], "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when the team was updated", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "List teams in which you are a member.", "href": "/teams", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/team" }, "type": [ "array" ] }, "title": "List" }, { "description": "Info for a team.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "title": "Info" }, { "description": "Update team properties.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}", "method": "PATCH", "rel": "update", "schema": { "properties": { "default": { "$ref": "#/definitions/team/definitions/default" }, "name": { "$ref": "#/definitions/team/definitions/name" } }, "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/team" }, "title": "Update" }, { "description": "Create a new team.", "href": "/teams", "method": "POST", "rel": "create", "schema": { "properties": { "name": { "$ref": "#/definitions/team/definitions/name" }, "address_1": { "$ref": "#/definitions/team/definitions/address_1" }, "address_2": { "$ref": "#/definitions/team/definitions/address_2" }, "card_number": { "$ref": "#/definitions/team/definitions/card_number" }, "city": { "$ref": "#/definitions/team/definitions/city" }, "country": { "$ref": "#/definitions/team/definitions/country" }, "cvv": { "$ref": "#/definitions/team/definitions/cvv" }, "expiration_month": { "$ref": "#/definitions/team/definitions/expiration_month" }, "expiration_year": { "$ref": "#/definitions/team/definitions/expiration_year" }, "first_name": { "$ref": "#/definitions/team/definitions/first_name" }, "last_name": { "$ref": "#/definitions/team/definitions/last_name" }, "other": { "$ref": "#/definitions/team/definitions/other" }, "postal_code": { "$ref": "#/definitions/team/definitions/postal_code" }, "state": { "$ref": "#/definitions/team/definitions/state" }, "nonce": { "$ref": "#/definitions/team/definitions/nonce" }, "device_data": { "$ref": "#/definitions/team/definitions/device_data" } }, "required": [ "name" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/team" }, "title": "Create" }, { "description": "Delete an existing team.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}", "method": "DELETE", "rel": "destroy", "targetSchema": { "$ref": "#/definitions/team" }, "title": "Delete" }, { "description": "List teams for an enterprise account.", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fidentity)}/teams", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/team" }, "type": [ "array" ] }, "title": "List by Enterprise Account" }, { "description": "Create a team in an enterprise account.", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fidentity)}/teams", "method": "POST", "rel": "create", "schema": { "properties": { "name": { "$ref": "#/definitions/team/definitions/name" } }, "required": [ "name" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/team" }, "title": "Create in Enterprise Account" } ], "properties": { "id": { "$ref": "#/definitions/team/definitions/id" }, "created_at": { "$ref": "#/definitions/team/definitions/created_at" }, "credit_card_collections": { "$ref": "#/definitions/team/definitions/credit_card_collections" }, "default": { "$ref": "#/definitions/team/definitions/default" }, "enterprise_account": { "$ref": "#/definitions/team/definitions/enterprise_account" }, "identity_provider": { "$ref": "#/definitions/team/definitions/identity_provider" }, "membership_limit": { "$ref": "#/definitions/team/definitions/membership_limit" }, "name": { "$ref": "#/definitions/team/definitions/name" }, "provisioned_licenses": { "$ref": "#/definitions/team/definitions/provisioned_licenses" }, "role": { "$ref": "#/definitions/team/definitions/role" }, "type": { "$ref": "#/definitions/team/definitions/type" }, "updated_at": { "$ref": "#/definitions/team/definitions/updated_at" } } }, "test-case": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Test Case", "description": "A single test case belonging to a test run", "stability": "prototype", "strictProperties": true, "type": [ "object" ], "definitions": { "id": { "description": "unique identifier of a test case", "readOnly": true, "format": "uuid", "type": [ "string" ] }, "description": { "description": "description of the test case", "type": [ "string" ] }, "diagnostic": { "description": "meta information about the test case", "type": [ "string" ] }, "directive": { "description": "special note about the test case e.g. skipped, todo", "type": [ "string" ] }, "passed": { "description": "whether the test case was successful", "type": [ "boolean" ] }, "number": { "description": "the test number", "type": [ "integer" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/test-case/definitions/id" } ] }, "created_at": { "description": "when test case was created", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when test case was updated", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "List test cases", "href": "/test-runs/{(%23%2Fdefinitions%2Ftest-run%2Fdefinitions%2Fid)}/test-cases", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/test-case" } }, "type": [ "array" ], "title": "List" } ], "properties": { "id": { "$ref": "#/definitions/test-case/definitions/id" }, "created_at": { "$ref": "#/definitions/test-case/definitions/created_at" }, "updated_at": { "$ref": "#/definitions/test-case/definitions/updated_at" }, "description": { "$ref": "#/definitions/test-case/definitions/description" }, "diagnostic": { "$ref": "#/definitions/test-case/definitions/diagnostic" }, "directive": { "$ref": "#/definitions/test-case/definitions/directive" }, "passed": { "$ref": "#/definitions/test-case/definitions/passed" }, "number": { "$ref": "#/definitions/test-case/definitions/number" }, "test_node": { "description": "the test node which executed this test case", "properties": { "id": { "$ref": "#/definitions/test-node/definitions/identity" } }, "type": [ "object" ] }, "test_run": { "description": "the test run which owns this test case", "properties": { "id": { "$ref": "#/definitions/test-run/definitions/identity" } }, "type": [ "object" ] } } }, "test-node": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Test Node", "description": "A single test node belonging to a test run", "stability": "prototype", "strictProperties": true, "type": [ "object" ], "definitions": { "id": { "description": "unique identifier of a test node", "example": "01234567-89ab-cdef-0123-456789abcdef", "format": "uuid", "readOnly": true, "type": [ "string" ] }, "attach_url": { "description": "a URL to stream output from for debug runs or null for non-debug runs", "example": "rendezvous://rendezvous.runtime.heroku.com:5000/{rendezvous-id}", "readOnly": true, "type": [ "string", "null" ] }, "created_at": { "description": "when test node was created", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "error_status": { "description": "the status of the test run when the error occured", "type": [ "string", "null" ] }, "exit_code": { "description": "the exit code of the test script", "type": [ "integer", "null" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/test-node/definitions/id" } ] }, "index": { "description": "The index of the test node", "type": [ "integer" ] }, "message": { "description": "human friendly message indicating reason for an error", "type": [ "string", "null" ] }, "output_stream_url": { "description": "the streaming output for the test node", "example": "https://example.com/output.log", "type": [ "string" ] }, "setup_stream_url": { "description": "the streaming test setup output for the test node", "example": "https://example.com/test-setup.log", "type": [ "string" ] }, "status": { "description": "current state of the test run", "enum": [ "pending", "cancelled", "creating", "building", "running", "succeeded", "failed", "errored", "debugging" ], "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when test node was updated", "format": "date-time", "readOnly": true, "type": [ "string" ] } }, "links": [ { "description": "List test nodes", "href": "/test-runs/{(%23%2Fdefinitions%2Ftest-run%2Fdefinitions%2Fidentity)}/test-nodes", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/test-node" } }, "type": [ "array" ], "title": "List" } ], "properties": { "created_at": { "$ref": "#/definitions/test-node/definitions/created_at" }, "dyno": { "description": "the dyno which belongs to this test node", "properties": { "id": { "$ref": "#/definitions/dyno/definitions/identity" }, "attach_url": { "$ref": "#/definitions/test-node/definitions/attach_url" } }, "type": [ "object", "null" ] }, "error_status": { "$ref": "#/definitions/test-node/definitions/error_status" }, "exit_code": { "$ref": "#/definitions/test-node/definitions/exit_code" }, "id": { "$ref": "#/definitions/test-node/definitions/identity" }, "index": { "$ref": "#/definitions/test-node/definitions/index" }, "message": { "$ref": "#/definitions/test-node/definitions/message" }, "output_stream_url": { "$ref": "#/definitions/test-node/definitions/output_stream_url" }, "pipeline": { "description": "the pipeline which owns this test node", "properties": { "id": { "$ref": "#/definitions/pipeline/definitions/identity" } }, "type": [ "object" ] }, "setup_stream_url": { "$ref": "#/definitions/test-node/definitions/setup_stream_url" }, "status": { "$ref": "#/definitions/test-node/definitions/status" }, "updated_at": { "$ref": "#/definitions/test-node/definitions/updated_at" }, "test_run": { "description": "the test run which owns this test node", "properties": { "id": { "$ref": "#/definitions/test-run/definitions/identity" } }, "type": [ "object" ] } } }, "test-run": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "title": "Test Run", "description": "An execution or trial of one or more tests", "stability": "prototype", "strictProperties": true, "type": [ "object" ], "definitions": { "actor_email": { "description": "the email of the actor triggering the test run", "type": [ "string" ], "format": "email" }, "clear_cache": { "description": "whether the test was run with an empty cache", "type": [ "boolean", "null" ] }, "commit_branch": { "description": "the branch of the repository that the test run concerns", "type": [ "string" ] }, "commit_message": { "description": "the message for the commit under test", "type": [ "string" ] }, "commit_sha": { "description": "the SHA hash of the commit under test", "type": [ "string" ] }, "debug": { "description": "whether the test run was started for interactive debugging", "type": [ "boolean" ] }, "app_setup": { "description": "the app setup for the test run", "type": [ "null", "object" ] }, "id": { "description": "unique identifier of a test run", "readOnly": true, "format": "uuid", "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/test-run/definitions/id" } ] }, "created_at": { "description": "when test run was created", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "message": { "description": "human friendly message indicating reason for an error", "type": [ "string", "null" ] }, "number": { "description": "the auto incrementing test run number", "type": [ "integer" ] }, "source_blob_url": { "description": "The download location for the source code to be tested", "type": [ "string" ] }, "status": { "description": "current state of the test run", "enum": [ "pending", "cancelled", "creating", "building", "running", "succeeded", "failed", "errored", "debugging" ], "readOnly": true, "type": [ "string" ] }, "updated_at": { "description": "when test-run was updated", "format": "date-time", "readOnly": true, "type": [ "string" ] }, "warning_message": { "description": "human friently warning emitted during the test run", "type": [ "string", "null" ] } }, "links": [ { "description": "Create a new test-run.", "href": "/test-runs", "method": "POST", "rel": "create", "schema": { "properties": { "commit_branch": { "$ref": "#/definitions/test-run/definitions/commit_branch" }, "commit_message": { "$ref": "#/definitions/test-run/definitions/commit_message" }, "commit_sha": { "$ref": "#/definitions/test-run/definitions/commit_sha" }, "debug": { "$ref": "#/definitions/test-run/definitions/debug" }, "organization": { "$ref": "#/definitions/team/definitions/identity" }, "pipeline": { "$ref": "#/definitions/pipeline/definitions/identity" }, "source_blob_url": { "$ref": "#/definitions/test-run/definitions/source_blob_url" } }, "required": [ "commit_branch", "commit_message", "commit_sha", "pipeline", "source_blob_url" ], "type": [ "object" ] }, "title": "Create" }, { "description": "Info for existing test-run.", "href": "/test-runs/{(%23%2Fdefinitions%2Ftest-run%2Fdefinitions%2Fid)}", "method": "GET", "rel": "self", "title": "Info" }, { "description": "List existing test-runs for a pipeline.", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/test-runs", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/test-run" } }, "type": [ "array" ], "title": "List" }, { "description": "Info for existing test-run by Pipeline", "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/test-runs/{(%23%2Fdefinitions%2Ftest-run%2Fdefinitions%2Fnumber)}", "method": "GET", "rel": "self", "title": "Info By Pipeline" }, { "description": "Update a test-run's status.", "href": "/test-runs/{(%23%2Fdefinitions%2Ftest-run%2Fdefinitions%2Fnumber)}", "method": "PATCH", "rel": "self", "title": "Update", "schema": { "properties": { "status": { "$ref": "#/definitions/test-run/definitions/status" }, "message": { "$ref": "#/definitions/test-run/definitions/message" } }, "required": [ "status", "message" ], "type": [ "object" ] } } ], "properties": { "actor_email": { "$ref": "#/definitions/test-run/definitions/actor_email" }, "clear_cache": { "$ref": "#/definitions/test-run/definitions/clear_cache" }, "commit_branch": { "$ref": "#/definitions/test-run/definitions/commit_branch" }, "commit_message": { "$ref": "#/definitions/test-run/definitions/commit_message" }, "commit_sha": { "$ref": "#/definitions/test-run/definitions/commit_sha" }, "debug": { "$ref": "#/definitions/test-run/definitions/debug" }, "app_setup": { "$ref": "#/definitions/test-run/definitions/app_setup" }, "created_at": { "$ref": "#/definitions/test-run/definitions/created_at" }, "dyno": { "description": "the type of dynos used for this test-run", "properties": { "size": { "$ref": "#/definitions/dyno/definitions/size" } }, "type": [ "null", "object" ] }, "id": { "$ref": "#/definitions/test-run/definitions/id" }, "message": { "$ref": "#/definitions/test-run/definitions/message" }, "number": { "$ref": "#/definitions/test-run/definitions/number" }, "organization": { "description": "the team that owns this test-run", "properties": { "name": { "$ref": "#/definitions/team/definitions/name" } }, "type": [ "null", "object" ] }, "pipeline": { "description": "the pipeline which owns this test-run", "properties": { "id": { "$ref": "#/definitions/pipeline/definitions/identity" } }, "type": [ "object" ] }, "status": { "$ref": "#/definitions/test-run/definitions/status" }, "source_blob_url": { "$ref": "#/definitions/test-run/definitions/source_blob_url" }, "updated_at": { "$ref": "#/definitions/test-run/definitions/updated_at" }, "user": { "$ref": "#/definitions/account" }, "warning_message": { "$ref": "#/definitions/test-run/definitions/warning_message" } } }, "user-preferences": { "description": "Tracks a user's preferences and message dismissals", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - User Preferences", "type": [ "object" ], "definitions": { "identity": { "anyOf": [ { "$ref": "#/definitions/user-preferences/definitions/self" } ] }, "self": { "description": "Implicit reference to currently authorized user", "enum": [ "~" ], "example": "~", "readOnly": true, "type": [ "string" ] }, "timezone": { "description": "User's default timezone", "example": "UTC", "readOnly": false, "type": [ "string", "null" ] }, "default-organization": { "description": "User's default team", "example": "sushi-inc", "readOnly": false, "type": [ "string", "null" ] }, "dismissed-github-banner": { "description": "Whether the user has dismissed the GitHub link banner", "example": true, "readOnly": false, "type": [ "boolean", "null" ] }, "dismissed-getting-started": { "description": "Whether the user has dismissed the getting started banner", "example": true, "readOnly": false, "type": [ "boolean", "null" ] }, "dismissed-org-access-controls": { "description": "Whether the user has dismissed the Organization Access Controls banner", "example": true, "readOnly": false, "type": [ "boolean", "null" ] }, "dismissed-org-wizard-notification": { "description": "Whether the user has dismissed the Organization Wizard", "example": true, "readOnly": false, "type": [ "boolean", "null" ] }, "dismissed-pipelines-banner": { "description": "Whether the user has dismissed the Pipelines banner", "example": true, "readOnly": false, "type": [ "boolean", "null" ] }, "dismissed-pipelines-github-banner": { "description": "Whether the user has dismissed the GitHub banner on a pipeline overview", "example": true, "readOnly": false, "type": [ "boolean", "null" ] }, "dismissed-pipelines-github-banners": { "description": "Which pipeline uuids the user has dismissed the GitHub banner for", "example": [ "96c68759-f310-4910-9867-e0b062064098" ], "readOnly": false, "type": [ "null", "array" ], "items": { "$ref": "#/definitions/pipeline/definitions/id" } }, "dismissed-sms-banner": { "description": "Whether the user has dismissed the 2FA SMS banner", "example": true, "readOnly": false, "type": [ "boolean", "null" ] } }, "links": [ { "description": "Retrieve User Preferences", "href": "/users/{(%23%2Fdefinitions%2Fuser-preferences%2Fdefinitions%2Fidentity)}/preferences", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/user-preferences" }, "title": "List" }, { "description": "Update User Preferences", "href": "/users/{(%23%2Fdefinitions%2Fuser-preferences%2Fdefinitions%2Fidentity)}/preferences", "method": "PATCH", "rel": "update", "schema": { "type": [ "object" ], "properties": { "timezone": { "$ref": "#/definitions/user-preferences/definitions/timezone" }, "default-organization": { "$ref": "#/definitions/user-preferences/definitions/default-organization" }, "dismissed-github-banner": { "$ref": "#/definitions/user-preferences/definitions/dismissed-github-banner" }, "dismissed-getting-started": { "$ref": "#/definitions/user-preferences/definitions/dismissed-getting-started" }, "dismissed-org-access-controls": { "$ref": "#/definitions/user-preferences/definitions/dismissed-org-access-controls" }, "dismissed-org-wizard-notification": { "$ref": "#/definitions/user-preferences/definitions/dismissed-org-wizard-notification" }, "dismissed-pipelines-banner": { "$ref": "#/definitions/user-preferences/definitions/dismissed-pipelines-banner" }, "dismissed-pipelines-github-banner": { "$ref": "#/definitions/user-preferences/definitions/dismissed-pipelines-github-banner" }, "dismissed-pipelines-github-banners": { "$ref": "#/definitions/user-preferences/definitions/dismissed-pipelines-github-banners" }, "dismissed-sms-banner": { "$ref": "#/definitions/user-preferences/definitions/dismissed-sms-banner" } } }, "targetSchema": { "$ref": "#/definitions/user-preferences" }, "title": "Update" } ], "properties": { "timezone": { "$ref": "#/definitions/user-preferences/definitions/timezone" }, "default-organization": { "$ref": "#/definitions/user-preferences/definitions/default-organization" }, "dismissed-github-banner": { "$ref": "#/definitions/user-preferences/definitions/dismissed-github-banner" }, "dismissed-getting-started": { "$ref": "#/definitions/user-preferences/definitions/dismissed-getting-started" }, "dismissed-org-access-controls": { "$ref": "#/definitions/user-preferences/definitions/dismissed-org-access-controls" }, "dismissed-org-wizard-notification": { "$ref": "#/definitions/user-preferences/definitions/dismissed-org-wizard-notification" }, "dismissed-pipelines-banner": { "$ref": "#/definitions/user-preferences/definitions/dismissed-pipelines-banner" }, "dismissed-pipelines-github-banner": { "$ref": "#/definitions/user-preferences/definitions/dismissed-pipelines-github-banner" }, "dismissed-pipelines-github-banners": { "$ref": "#/definitions/user-preferences/definitions/dismissed-pipelines-github-banners" }, "dismissed-sms-banner": { "$ref": "#/definitions/user-preferences/definitions/dismissed-sms-banner" } } }, "vpn-connection": { "description": "[VPN](https://devcenter.heroku.com/articles/private-space-vpn-connection) provides a way to connect your Private Spaces to your network via VPN.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "production", "strictProperties": true, "title": "Heroku Platform API - Private Spaces VPN", "type": [ "object" ], "definitions": { "name": { "description": "VPN Name", "example": "office", "type": [ "string" ] }, "public_ip": { "description": "Public IP of VPN customer gateway", "example": "35.161.69.30", "type": [ "string" ] }, "routable_cidrs": { "description": "Routable CIDRs of VPN", "type": [ "array" ], "items": { "example": "172.16.0.0/16", "type": [ "string" ] } }, "id": { "description": "VPN ID", "example": "123456789012", "readOnly": true, "type": [ "string" ] }, "identity": { "anyOf": [ { "$ref": "#/definitions/vpn-connection/definitions/id" }, { "$ref": "#/definitions/vpn-connection/definitions/name" } ] }, "space_cidr_block": { "description": "CIDR Block of the Private Space", "example": "10.0.0.0/16", "readOnly": true, "type": [ "string" ] }, "ike_version": { "description": "IKE Version", "example": 1, "readOnly": true, "type": [ "integer" ] }, "tunnel": { "description": "Tunnel info", "readOnly": true, "type": [ "object" ], "properties": { "last_status_change": { "description": "Timestamp of last status changed", "example": "2016-10-25T22:09:05Z", "type": [ "string" ] }, "ip": { "description": "Public IP address for the tunnel", "example": "52.44.146.197", "type": [ "string" ] }, "customer_ip": { "description": "Public IP address for the customer side of the tunnel", "example": "52.44.146.197", "type": [ "string" ] }, "pre_shared_key": { "description": "Pre-shared key", "example": "secret", "type": [ "string" ] }, "status": { "description": "Status of the tunnel", "enum": [ "UP", "DOWN" ], "example": "UP", "type": [ "string" ] }, "status_message": { "description": "Details of the status", "example": "status message", "type": [ "string" ] } } }, "status": { "description": "Status of the VPN", "enum": [ "pending", "provisioning", "active", "deprovisioning", "failed" ], "example": "active", "readOnly": true, "type": [ "string" ] }, "status_message": { "description": "Details of the status", "example": "supplied CIDR block already in use", "readOnly": true, "type": [ "string" ] } }, "properties": { "id": { "$ref": "#/definitions/vpn-connection/definitions/id" }, "name": { "$ref": "#/definitions/vpn-connection/definitions/name" }, "public_ip": { "$ref": "#/definitions/vpn-connection/definitions/public_ip" }, "routable_cidrs": { "$ref": "#/definitions/vpn-connection/definitions/routable_cidrs" }, "space_cidr_block": { "$ref": "#/definitions/vpn-connection/definitions/space_cidr_block" }, "tunnels": { "items": { "$ref": "#/definitions/vpn-connection/definitions/tunnel" }, "type": [ "array" ] }, "ike_version": { "$ref": "#/definitions/vpn-connection/definitions/ike_version" }, "status": { "$ref": "#/definitions/vpn-connection/definitions/status" }, "status_message": { "$ref": "#/definitions/vpn-connection/definitions/status_message" } }, "links": [ { "description": "Create a new VPN connection in a private space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/vpn-connections", "rel": "create", "schema": { "properties": { "name": { "$ref": "#/definitions/vpn-connection/definitions/name" }, "public_ip": { "$ref": "#/definitions/vpn-connection/definitions/public_ip" }, "routable_cidrs": { "$ref": "#/definitions/vpn-connection/definitions/routable_cidrs" } }, "required": [ "name", "public_ip", "routable_cidrs" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/vpn-connection" }, "method": "POST", "title": "Create" }, { "description": "Destroy existing VPN Connection", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/vpn-connections/{(%23%2Fdefinitions%2Fvpn-connection%2Fdefinitions%2Fidentity)}", "rel": "empty", "method": "DELETE", "title": "Destroy" }, { "description": "List VPN connections for a space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/vpn-connections", "method": "GET", "rel": "instances", "targetSchema": { "items": { "$ref": "#/definitions/vpn-connection" }, "type": [ "array" ] }, "title": "List" }, { "description": "Info for an existing vpn-connection.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/vpn-connections/{(%23%2Fdefinitions%2Fvpn-connection%2Fdefinitions%2Fidentity)}", "method": "GET", "rel": "self", "targetSchema": { "$ref": "#/definitions/vpn-connection" }, "title": "Info" }, { "description": "Update a VPN connection in a private space.", "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/vpn-connections/{(%23%2Fdefinitions%2Fvpn-connection%2Fdefinitions%2Fidentity)}", "rel": "update", "schema": { "properties": { "routable_cidrs": { "$ref": "#/definitions/vpn-connection/definitions/routable_cidrs" } }, "required": [ "routable_cidrs" ], "type": [ "object" ] }, "targetSchema": { "$ref": "#/definitions/vpn-connection" }, "method": "PATCH", "title": "Update" } ] } }, "properties": { "account-feature": { "$ref": "#/definitions/account-feature" }, "account": { "$ref": "#/definitions/account" }, "add-on-action": { "$ref": "#/definitions/add-on-action" }, "add-on-attachment": { "$ref": "#/definitions/add-on-attachment" }, "add-on-config": { "$ref": "#/definitions/add-on-config" }, "add-on-plan-action": { "$ref": "#/definitions/add-on-plan-action" }, "add-on-region-capability": { "$ref": "#/definitions/add-on-region-capability" }, "add-on-service": { "$ref": "#/definitions/add-on-service" }, "add-on-webhook-delivery": { "$ref": "#/definitions/add-on-webhook-delivery" }, "add-on-webhook-event": { "$ref": "#/definitions/add-on-webhook-event" }, "add-on-webhook": { "$ref": "#/definitions/add-on-webhook" }, "add-on": { "$ref": "#/definitions/add-on" }, "allowed-add-on-service": { "$ref": "#/definitions/allowed-add-on-service" }, "app-feature": { "$ref": "#/definitions/app-feature" }, "app-formation-set": { "$ref": "#/definitions/app-formation-set" }, "app-setup": { "$ref": "#/definitions/app-setup" }, "app-transfer": { "$ref": "#/definitions/app-transfer" }, "app-webhook-delivery": { "$ref": "#/definitions/app-webhook-delivery" }, "app-webhook-event": { "$ref": "#/definitions/app-webhook-event" }, "app-webhook": { "$ref": "#/definitions/app-webhook" }, "app": { "$ref": "#/definitions/app" }, "archive": { "$ref": "#/definitions/archive" }, "audit-trail-event": { "$ref": "#/definitions/audit-trail-event" }, "build": { "$ref": "#/definitions/build" }, "buildpack-installation": { "$ref": "#/definitions/buildpack-installation" }, "collaborator": { "$ref": "#/definitions/collaborator" }, "config-var": { "$ref": "#/definitions/config-var" }, "credit": { "$ref": "#/definitions/credit" }, "domain": { "$ref": "#/definitions/domain" }, "dyno-size": { "$ref": "#/definitions/dyno-size" }, "dyno": { "$ref": "#/definitions/dyno" }, "enterprise-account-daily-usage": { "$ref": "#/definitions/enterprise-account-daily-usage" }, "enterprise-account-member": { "$ref": "#/definitions/enterprise-account-member" }, "enterprise-account-monthly-usage": { "$ref": "#/definitions/enterprise-account-monthly-usage" }, "enterprise-account": { "$ref": "#/definitions/enterprise-account" }, "filter-apps": { "$ref": "#/definitions/filter-apps" }, "formation": { "$ref": "#/definitions/formation" }, "identity-provider": { "$ref": "#/definitions/identity-provider" }, "inbound-ruleset": { "$ref": "#/definitions/inbound-ruleset" }, "invoice-address": { "$ref": "#/definitions/invoice-address" }, "invoice": { "$ref": "#/definitions/invoice" }, "key": { "$ref": "#/definitions/key" }, "log-drain": { "$ref": "#/definitions/log-drain" }, "log-session": { "$ref": "#/definitions/log-session" }, "oauth-authorization": { "$ref": "#/definitions/oauth-authorization" }, "oauth-client": { "$ref": "#/definitions/oauth-client" }, "oauth-grant": { "$ref": "#/definitions/oauth-grant" }, "oauth-token": { "$ref": "#/definitions/oauth-token" }, "outbound-ruleset": { "$ref": "#/definitions/outbound-ruleset" }, "password-reset": { "$ref": "#/definitions/password-reset" }, "peering-info": { "$ref": "#/definitions/peering-info" }, "peering": { "$ref": "#/definitions/peering" }, "permission-entity": { "$ref": "#/definitions/permission-entity" }, "pipeline-build": { "$ref": "#/definitions/pipeline-build" }, "pipeline-config-var": { "$ref": "#/definitions/pipeline-config-var" }, "pipeline-coupling": { "$ref": "#/definitions/pipeline-coupling" }, "pipeline-deployment": { "$ref": "#/definitions/pipeline-deployment" }, "pipeline-promotion-target": { "$ref": "#/definitions/pipeline-promotion-target" }, "pipeline-promotion": { "$ref": "#/definitions/pipeline-promotion" }, "pipeline-release": { "$ref": "#/definitions/pipeline-release" }, "pipeline-stack": { "$ref": "#/definitions/pipeline-stack" }, "pipeline-transfer": { "$ref": "#/definitions/pipeline-transfer" }, "pipeline": { "$ref": "#/definitions/pipeline" }, "plan": { "$ref": "#/definitions/plan" }, "rate-limit": { "$ref": "#/definitions/rate-limit" }, "region": { "$ref": "#/definitions/region" }, "release": { "$ref": "#/definitions/release" }, "review-app": { "$ref": "#/definitions/review-app" }, "review-app-config": { "$ref": "#/definitions/review-app-config" }, "slug": { "$ref": "#/definitions/slug" }, "sms-number": { "$ref": "#/definitions/sms-number" }, "sni-endpoint": { "$ref": "#/definitions/sni-endpoint" }, "source": { "$ref": "#/definitions/source" }, "space-app-access": { "$ref": "#/definitions/space-app-access" }, "space-nat": { "$ref": "#/definitions/space-nat" }, "space-topology": { "$ref": "#/definitions/space-topology" }, "space-transfer": { "$ref": "#/definitions/space-transfer" }, "space": { "$ref": "#/definitions/space" }, "ssl-endpoint": { "$ref": "#/definitions/ssl-endpoint" }, "stack": { "$ref": "#/definitions/stack" }, "team-add-on": { "$ref": "#/definitions/team-add-on" }, "team-app-collaborator": { "$ref": "#/definitions/team-app-collaborator" }, "team-app-permission": { "$ref": "#/definitions/team-app-permission" }, "team-app": { "$ref": "#/definitions/team-app" }, "team-daily-usage": { "$ref": "#/definitions/team-daily-usage" }, "team-feature": { "$ref": "#/definitions/team-feature" }, "team-invitation": { "$ref": "#/definitions/team-invitation" }, "team-invoice": { "$ref": "#/definitions/team-invoice" }, "team-member": { "$ref": "#/definitions/team-member" }, "team-monthly-usage": { "$ref": "#/definitions/team-monthly-usage" }, "team-preferences": { "$ref": "#/definitions/team-preferences" }, "team-space": { "$ref": "#/definitions/team-space" }, "team": { "$ref": "#/definitions/team" }, "test-case": { "$ref": "#/definitions/test-case" }, "test-node": { "$ref": "#/definitions/test-node" }, "test-run": { "$ref": "#/definitions/test-run" }, "user-preferences": { "$ref": "#/definitions/user-preferences" }, "vpn-connection": { "$ref": "#/definitions/vpn-connection" } }, "description": "The platform API empowers developers to automate, extend and combine Heroku with other services.", "id": "http://api.heroku.com/schema#", "links": [ { "href": "https://api.heroku.com", "rel": "self", "title": "Index" }, { "href": "/schema", "method": "GET", "rel": "self", "title": "Schema", "targetSchema": { "additionalProperties": true } } ], "title": "Heroku Platform API" } heroku-go-5.4.0/v5/transport.go000066400000000000000000000100551413703571500163440ustar00rootroot00000000000000package v5 import ( "bufio" "bytes" "encoding/json" "errors" "fmt" "log" "net/http" "net/http/httputil" "regexp" "strings" "github.com/pborman/uuid" ) var DefaultTransport = &Transport{} var DefaultClient = &http.Client{ Transport: DefaultTransport, } type Transport struct { // Username is the HTTP basic auth username for API calls made by this Client. Username string // Password is the HTTP basic auth password for API calls made by this Client. Password string // BearerToken is a bearer token to authorize the request with. If this is // set, the basic auth credentials will be ignored. BearerToken string // UserAgent to be provided in API requests. Set to DefaultUserAgent if not // specified. UserAgent string // Debug mode can be used to dump the full request and response to stdout. Debug bool // AdditionalHeaders are extra headers to add to each HTTP request sent by // this Client. AdditionalHeaders http.Header // Transport is the HTTP transport to use when making requests. // It will default to http.DefaultTransport if nil. Transport http.RoundTripper } // Forward CancelRequest to underlying Transport func (t *Transport) CancelRequest(req *http.Request) { type canceler interface { CancelRequest(*http.Request) } tr, ok := t.Transport.(canceler) if !ok { log.Printf("heroku: Client Transport of type %T doesn't support CancelRequest; Timeout not supported\n", t.Transport) return } tr.CancelRequest(req) } func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { if t.Transport == nil { t.Transport = http.DefaultTransport } // Making a copy of the Request so that // we don't modify the Request we were given. req = cloneRequest(req) if t.UserAgent != "" { req.Header.Set("User-Agent", t.UserAgent) } req.Header.Set("Accept", "application/vnd.heroku+json; version=3") req.Header.Set("Request-Id", uuid.New()) if t.BearerToken != "" { req.Header.Add("Authorization", "Bearer "+t.BearerToken) } else if t.Username != "" || t.Password != "" { req.SetBasicAuth(t.Username, t.Password) } for k, v := range t.AdditionalHeaders { req.Header[k] = v } if t.Debug { dump, err := httputil.DumpRequestOut(req, true) if err != nil { log.Println(err) } else { scanner := bufio.NewScanner(bytes.NewReader(dump)) matcher := regexp.MustCompile(`(?i)authorization:`) for scanner.Scan() { line := scanner.Text() if matcher.MatchString(line) { matches := strings.Split(line, `:`) line = fmt.Sprintf("%s: [redacted]", matches[0]) } log.Println(line) } if err := scanner.Err(); err != nil { log.Printf("Error scanning HTTP debug output for secret tokens: %s\n", err) } } } resp, err := t.Transport.RoundTrip(req) if err != nil { if resp != nil { resp.Body.Close() } return nil, err } if t.Debug { dump, err := httputil.DumpResponse(resp, true) if err != nil { log.Println(err) } else { log.Printf("%s", dump) } } if err = checkResponse(resp); err != nil { if resp != nil { resp.Body.Close() } return nil, err } return resp, nil } type Error struct { error ID string URL string // StatusCode is the HTTP status code returned from the remote server. StatusCode int } func checkResponse(resp *http.Response) error { if resp.StatusCode/100 != 2 { // 200, 201, 202, etc var e struct { Message string ID string URL string `json:"url"` } err := json.NewDecoder(resp.Body).Decode(&e) if err != nil { return fmt.Errorf("encountered an error : %s", resp.Status) } return Error{error: errors.New(e.Message), ID: e.ID, URL: e.URL, StatusCode: resp.StatusCode} } if msg := resp.Header.Get("X-Heroku-Warning"); msg != "" { log.Println(strings.TrimSpace(msg)) } return nil } // cloneRequest returns a clone of the provided *http.Request. func cloneRequest(req *http.Request) *http.Request { // shallow copy of the struct clone := new(http.Request) *clone = *req // deep copy of the Header clone.Header = make(http.Header) for k, s := range req.Header { clone.Header[k] = s } return clone } heroku-go-5.4.0/v5/vendor/000077500000000000000000000000001413703571500152555ustar00rootroot00000000000000heroku-go-5.4.0/v5/vendor/github.com/000077500000000000000000000000001413703571500173145ustar00rootroot00000000000000heroku-go-5.4.0/v5/vendor/github.com/cenkalti/000077500000000000000000000000001413703571500211065ustar00rootroot00000000000000heroku-go-5.4.0/v5/vendor/github.com/cenkalti/backoff/000077500000000000000000000000001413703571500225015ustar00rootroot00000000000000heroku-go-5.4.0/v5/vendor/github.com/cenkalti/backoff/.gitignore000066400000000000000000000003741413703571500244750ustar00rootroot00000000000000# Compiled Object files, Static and Dynamic libs (Shared Objects) *.o *.a *.so # Folders _obj _test # Architecture specific extensions/prefixes *.[568vq] [568vq].out *.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* _testmain.go *.exe heroku-go-5.4.0/v5/vendor/github.com/cenkalti/backoff/.travis.yml000066400000000000000000000003011413703571500246040ustar00rootroot00000000000000language: go go: - 1.7 - 1.x - tip before_install: - go get github.com/mattn/goveralls - go get golang.org/x/tools/cmd/cover script: - $HOME/gopath/bin/goveralls -service=travis-ci heroku-go-5.4.0/v5/vendor/github.com/cenkalti/backoff/LICENSE000066400000000000000000000020651413703571500235110ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2014 Cenk Altı Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. heroku-go-5.4.0/v5/vendor/github.com/cenkalti/backoff/README.md000066400000000000000000000031271413703571500237630ustar00rootroot00000000000000# Exponential Backoff [![GoDoc][godoc image]][godoc] [![Build Status][travis image]][travis] [![Coverage Status][coveralls image]][coveralls] This is a Go port of the exponential backoff algorithm from [Google's HTTP Client Library for Java][google-http-java-client]. [Exponential backoff][exponential backoff wiki] is an algorithm that uses feedback to multiplicatively decrease the rate of some process, in order to gradually find an acceptable rate. The retries exponentially increase and stop increasing when a certain threshold is met. ## Usage See https://godoc.org/github.com/cenkalti/backoff#pkg-examples ## Contributing * I would like to keep this library as small as possible. * Please don't send a PR without opening an issue and discussing it first. * If proposed change is not a common use case, I will probably not accept it. [godoc]: https://godoc.org/github.com/cenkalti/backoff [godoc image]: https://godoc.org/github.com/cenkalti/backoff?status.png [travis]: https://travis-ci.org/cenkalti/backoff [travis image]: https://travis-ci.org/cenkalti/backoff.png?branch=master [coveralls]: https://coveralls.io/github/cenkalti/backoff?branch=master [coveralls image]: https://coveralls.io/repos/github/cenkalti/backoff/badge.svg?branch=master [google-http-java-client]: https://github.com/google/google-http-java-client/blob/da1aa993e90285ec18579f1553339b00e19b3ab5/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java [exponential backoff wiki]: http://en.wikipedia.org/wiki/Exponential_backoff [advanced example]: https://godoc.org/github.com/cenkalti/backoff#example_ heroku-go-5.4.0/v5/vendor/github.com/cenkalti/backoff/backoff.go000066400000000000000000000041361413703571500244270ustar00rootroot00000000000000// Package backoff implements backoff algorithms for retrying operations. // // Use Retry function for retrying operations that may fail. // If Retry does not meet your needs, // copy/paste the function into your project and modify as you wish. // // There is also Ticker type similar to time.Ticker. // You can use it if you need to work with channels. // // See Examples section below for usage examples. package backoff import "time" // BackOff is a backoff policy for retrying an operation. type BackOff interface { // NextBackOff returns the duration to wait before retrying the operation, // or backoff. Stop to indicate that no more retries should be made. // // Example usage: // // duration := backoff.NextBackOff(); // if (duration == backoff.Stop) { // // Do not retry operation. // } else { // // Sleep for duration and retry operation. // } // NextBackOff() time.Duration // Reset to initial state. Reset() } // Stop indicates that no more retries should be made for use in NextBackOff(). const Stop time.Duration = -1 // ZeroBackOff is a fixed backoff policy whose backoff time is always zero, // meaning that the operation is retried immediately without waiting, indefinitely. type ZeroBackOff struct{} func (b *ZeroBackOff) Reset() {} func (b *ZeroBackOff) NextBackOff() time.Duration { return 0 } // StopBackOff is a fixed backoff policy that always returns backoff.Stop for // NextBackOff(), meaning that the operation should never be retried. type StopBackOff struct{} func (b *StopBackOff) Reset() {} func (b *StopBackOff) NextBackOff() time.Duration { return Stop } // ConstantBackOff is a backoff policy that always returns the same backoff delay. // This is in contrast to an exponential backoff policy, // which returns a delay that grows longer as you call NextBackOff() over and over again. type ConstantBackOff struct { Interval time.Duration } func (b *ConstantBackOff) Reset() {} func (b *ConstantBackOff) NextBackOff() time.Duration { return b.Interval } func NewConstantBackOff(d time.Duration) *ConstantBackOff { return &ConstantBackOff{Interval: d} } heroku-go-5.4.0/v5/vendor/github.com/cenkalti/backoff/context.go000066400000000000000000000021341413703571500245140ustar00rootroot00000000000000package backoff import ( "context" "time" ) // BackOffContext is a backoff policy that stops retrying after the context // is canceled. type BackOffContext interface { BackOff Context() context.Context } type backOffContext struct { BackOff ctx context.Context } // WithContext returns a BackOffContext with context ctx // // ctx must not be nil func WithContext(b BackOff, ctx context.Context) BackOffContext { if ctx == nil { panic("nil context") } if b, ok := b.(*backOffContext); ok { return &backOffContext{ BackOff: b.BackOff, ctx: ctx, } } return &backOffContext{ BackOff: b, ctx: ctx, } } func ensureContext(b BackOff) BackOffContext { if cb, ok := b.(BackOffContext); ok { return cb } return WithContext(b, context.Background()) } func (b *backOffContext) Context() context.Context { return b.ctx } func (b *backOffContext) NextBackOff() time.Duration { select { case <-b.ctx.Done(): return Stop default: } next := b.BackOff.NextBackOff() if deadline, ok := b.ctx.Deadline(); ok && deadline.Sub(time.Now()) < next { return Stop } return next } heroku-go-5.4.0/v5/vendor/github.com/cenkalti/backoff/exponential.go000066400000000000000000000125241413703571500253620ustar00rootroot00000000000000package backoff import ( "math/rand" "time" ) /* ExponentialBackOff is a backoff implementation that increases the backoff period for each retry attempt using a randomization function that grows exponentially. NextBackOff() is calculated using the following formula: randomized interval = RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor]) In other words NextBackOff() will range between the randomization factor percentage below and above the retry interval. For example, given the following parameters: RetryInterval = 2 RandomizationFactor = 0.5 Multiplier = 2 the actual backoff period used in the next retry attempt will range between 1 and 3 seconds, multiplied by the exponential, that is, between 2 and 6 seconds. Note: MaxInterval caps the RetryInterval and not the randomized interval. If the time elapsed since an ExponentialBackOff instance is created goes past the MaxElapsedTime, then the method NextBackOff() starts returning backoff.Stop. The elapsed time can be reset by calling Reset(). Example: Given the following default arguments, for 10 tries the sequence will be, and assuming we go over the MaxElapsedTime on the 10th try: Request # RetryInterval (seconds) Randomized Interval (seconds) 1 0.5 [0.25, 0.75] 2 0.75 [0.375, 1.125] 3 1.125 [0.562, 1.687] 4 1.687 [0.8435, 2.53] 5 2.53 [1.265, 3.795] 6 3.795 [1.897, 5.692] 7 5.692 [2.846, 8.538] 8 8.538 [4.269, 12.807] 9 12.807 [6.403, 19.210] 10 19.210 backoff.Stop Note: Implementation is not thread-safe. */ type ExponentialBackOff struct { InitialInterval time.Duration RandomizationFactor float64 Multiplier float64 MaxInterval time.Duration // After MaxElapsedTime the ExponentialBackOff stops. // It never stops if MaxElapsedTime == 0. MaxElapsedTime time.Duration Clock Clock currentInterval time.Duration startTime time.Time } // Clock is an interface that returns current time for BackOff. type Clock interface { Now() time.Time } // Default values for ExponentialBackOff. const ( DefaultInitialInterval = 500 * time.Millisecond DefaultRandomizationFactor = 0.5 DefaultMultiplier = 1.5 DefaultMaxInterval = 60 * time.Second DefaultMaxElapsedTime = 15 * time.Minute ) // NewExponentialBackOff creates an instance of ExponentialBackOff using default values. func NewExponentialBackOff() *ExponentialBackOff { b := &ExponentialBackOff{ InitialInterval: DefaultInitialInterval, RandomizationFactor: DefaultRandomizationFactor, Multiplier: DefaultMultiplier, MaxInterval: DefaultMaxInterval, MaxElapsedTime: DefaultMaxElapsedTime, Clock: SystemClock, } b.Reset() return b } type systemClock struct{} func (t systemClock) Now() time.Time { return time.Now() } // SystemClock implements Clock interface that uses time.Now(). var SystemClock = systemClock{} // Reset the interval back to the initial retry interval and restarts the timer. func (b *ExponentialBackOff) Reset() { b.currentInterval = b.InitialInterval b.startTime = b.Clock.Now() } // NextBackOff calculates the next backoff interval using the formula: // Randomized interval = RetryInterval +/- (RandomizationFactor * RetryInterval) func (b *ExponentialBackOff) NextBackOff() time.Duration { // Make sure we have not gone over the maximum elapsed time. if b.MaxElapsedTime != 0 && b.GetElapsedTime() > b.MaxElapsedTime { return Stop } defer b.incrementCurrentInterval() return getRandomValueFromInterval(b.RandomizationFactor, rand.Float64(), b.currentInterval) } // GetElapsedTime returns the elapsed time since an ExponentialBackOff instance // is created and is reset when Reset() is called. // // The elapsed time is computed using time.Now().UnixNano(). It is // safe to call even while the backoff policy is used by a running // ticker. func (b *ExponentialBackOff) GetElapsedTime() time.Duration { return b.Clock.Now().Sub(b.startTime) } // Increments the current interval by multiplying it with the multiplier. func (b *ExponentialBackOff) incrementCurrentInterval() { // Check for overflow, if overflow is detected set the current interval to the max interval. if float64(b.currentInterval) >= float64(b.MaxInterval)/b.Multiplier { b.currentInterval = b.MaxInterval } else { b.currentInterval = time.Duration(float64(b.currentInterval) * b.Multiplier) } } // Returns a random value from the following interval: // [randomizationFactor * currentInterval, randomizationFactor * currentInterval]. func getRandomValueFromInterval(randomizationFactor, random float64, currentInterval time.Duration) time.Duration { var delta = randomizationFactor * float64(currentInterval) var minInterval = float64(currentInterval) - delta var maxInterval = float64(currentInterval) + delta // Get a random value from the range [minInterval, maxInterval]. // The formula used below has a +1 because if the minInterval is 1 and the maxInterval is 3 then // we want a 33% chance for selecting either 1, 2 or 3. return time.Duration(minInterval + (random * (maxInterval - minInterval + 1))) } heroku-go-5.4.0/v5/vendor/github.com/cenkalti/backoff/retry.go000066400000000000000000000035571413703571500242070ustar00rootroot00000000000000package backoff import "time" // An Operation is executing by Retry() or RetryNotify(). // The operation will be retried using a backoff policy if it returns an error. type Operation func() error // Notify is a notify-on-error function. It receives an operation error and // backoff delay if the operation failed (with an error). // // NOTE that if the backoff policy stated to stop retrying, // the notify function isn't called. type Notify func(error, time.Duration) // Retry the operation o until it does not return error or BackOff stops. // o is guaranteed to be run at least once. // // If o returns a *PermanentError, the operation is not retried, and the // wrapped error is returned. // // Retry sleeps the goroutine for the duration returned by BackOff after a // failed operation returns. func Retry(o Operation, b BackOff) error { return RetryNotify(o, b, nil) } // RetryNotify calls notify function with the error and wait duration // for each failed attempt before sleep. func RetryNotify(operation Operation, b BackOff, notify Notify) error { var err error var next time.Duration var t *time.Timer cb := ensureContext(b) b.Reset() for { if err = operation(); err == nil { return nil } if permanent, ok := err.(*PermanentError); ok { return permanent.Err } if next = cb.NextBackOff(); next == Stop { return err } if notify != nil { notify(err, next) } if t == nil { t = time.NewTimer(next) defer t.Stop() } else { t.Reset(next) } select { case <-cb.Context().Done(): return err case <-t.C: } } } // PermanentError signals that the operation should not be retried. type PermanentError struct { Err error } func (e *PermanentError) Error() string { return e.Err.Error() } // Permanent wraps the given err in a *PermanentError. func Permanent(err error) *PermanentError { return &PermanentError{ Err: err, } } heroku-go-5.4.0/v5/vendor/github.com/cenkalti/backoff/ticker.go000066400000000000000000000033241413703571500243130ustar00rootroot00000000000000package backoff import ( "sync" "time" ) // Ticker holds a channel that delivers `ticks' of a clock at times reported by a BackOff. // // Ticks will continue to arrive when the previous operation is still running, // so operations that take a while to fail could run in quick succession. type Ticker struct { C <-chan time.Time c chan time.Time b BackOffContext stop chan struct{} stopOnce sync.Once } // NewTicker returns a new Ticker containing a channel that will send // the time at times specified by the BackOff argument. Ticker is // guaranteed to tick at least once. The channel is closed when Stop // method is called or BackOff stops. It is not safe to manipulate the // provided backoff policy (notably calling NextBackOff or Reset) // while the ticker is running. func NewTicker(b BackOff) *Ticker { c := make(chan time.Time) t := &Ticker{ C: c, c: c, b: ensureContext(b), stop: make(chan struct{}), } t.b.Reset() go t.run() return t } // Stop turns off a ticker. After Stop, no more ticks will be sent. func (t *Ticker) Stop() { t.stopOnce.Do(func() { close(t.stop) }) } func (t *Ticker) run() { c := t.c defer close(c) // Ticker is guaranteed to tick at least once. afterC := t.send(time.Now()) for { if afterC == nil { return } select { case tick := <-afterC: afterC = t.send(tick) case <-t.stop: t.c = nil // Prevent future ticks from being sent to the channel. return case <-t.b.Context().Done(): return } } } func (t *Ticker) send(tick time.Time) <-chan time.Time { select { case t.c <- tick: case <-t.stop: return nil } next := t.b.NextBackOff() if next == Stop { t.Stop() return nil } return time.After(next) } heroku-go-5.4.0/v5/vendor/github.com/cenkalti/backoff/tries.go000066400000000000000000000012551413703571500241610ustar00rootroot00000000000000package backoff import "time" /* WithMaxRetries creates a wrapper around another BackOff, which will return Stop if NextBackOff() has been called too many times since the last time Reset() was called Note: Implementation is not thread-safe. */ func WithMaxRetries(b BackOff, max uint64) BackOff { return &backOffTries{delegate: b, maxTries: max} } type backOffTries struct { delegate BackOff maxTries uint64 numTries uint64 } func (b *backOffTries) NextBackOff() time.Duration { if b.maxTries > 0 { if b.maxTries <= b.numTries { return Stop } b.numTries++ } return b.delegate.NextBackOff() } func (b *backOffTries) Reset() { b.numTries = 0 b.delegate.Reset() } heroku-go-5.4.0/v5/vendor/github.com/google/000077500000000000000000000000001413703571500205705ustar00rootroot00000000000000heroku-go-5.4.0/v5/vendor/github.com/google/go-querystring/000077500000000000000000000000001413703571500235675ustar00rootroot00000000000000heroku-go-5.4.0/v5/vendor/github.com/google/go-querystring/LICENSE000066400000000000000000000026771413703571500246100ustar00rootroot00000000000000Copyright (c) 2013 Google. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. heroku-go-5.4.0/v5/vendor/github.com/google/go-querystring/query/000077500000000000000000000000001413703571500247345ustar00rootroot00000000000000heroku-go-5.4.0/v5/vendor/github.com/google/go-querystring/query/encode.go000066400000000000000000000210061413703571500265170ustar00rootroot00000000000000// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package query implements encoding of structs into URL query parameters. // // As a simple example: // // type Options struct { // Query string `url:"q"` // ShowAll bool `url:"all"` // Page int `url:"page"` // } // // opt := Options{ "foo", true, 2 } // v, _ := query.Values(opt) // fmt.Print(v.Encode()) // will output: "q=foo&all=true&page=2" // // The exact mapping between Go values and url.Values is described in the // documentation for the Values() function. package query import ( "bytes" "fmt" "net/url" "reflect" "strconv" "strings" "time" ) var timeType = reflect.TypeOf(time.Time{}) var encoderType = reflect.TypeOf(new(Encoder)).Elem() // Encoder is an interface implemented by any type that wishes to encode // itself into URL values in a non-standard way. type Encoder interface { EncodeValues(key string, v *url.Values) error } // Values returns the url.Values encoding of v. // // Values expects to be passed a struct, and traverses it recursively using the // following encoding rules. // // Each exported struct field is encoded as a URL parameter unless // // - the field's tag is "-", or // - the field is empty and its tag specifies the "omitempty" option // // The empty values are false, 0, any nil pointer or interface value, any array // slice, map, or string of length zero, and any time.Time that returns true // for IsZero(). // // The URL parameter name defaults to the struct field name but can be // specified in the struct field's tag value. The "url" key in the struct // field's tag value is the key name, followed by an optional comma and // options. For example: // // // Field is ignored by this package. // Field int `url:"-"` // // // Field appears as URL parameter "myName". // Field int `url:"myName"` // // // Field appears as URL parameter "myName" and the field is omitted if // // its value is empty // Field int `url:"myName,omitempty"` // // // Field appears as URL parameter "Field" (the default), but the field // // is skipped if empty. Note the leading comma. // Field int `url:",omitempty"` // // For encoding individual field values, the following type-dependent rules // apply: // // Boolean values default to encoding as the strings "true" or "false". // Including the "int" option signals that the field should be encoded as the // strings "1" or "0". // // time.Time values default to encoding as RFC3339 timestamps. Including the // "unix" option signals that the field should be encoded as a Unix time (see // time.Unix()) // // Slice and Array values default to encoding as multiple URL values of the // same name. Including the "comma" option signals that the field should be // encoded as a single comma-delimited value. Including the "space" option // similarly encodes the value as a single space-delimited string. Including // the "semicolon" option will encode the value as a semicolon-delimited string. // Including the "brackets" option signals that the multiple URL values should // have "[]" appended to the value name. "numbered" will append a number to // the end of each incidence of the value name, example: // name0=value0&name1=value1, etc. // // Anonymous struct fields are usually encoded as if their inner exported // fields were fields in the outer struct, subject to the standard Go // visibility rules. An anonymous struct field with a name given in its URL // tag is treated as having that name, rather than being anonymous. // // Non-nil pointer values are encoded as the value pointed to. // // Nested structs are encoded including parent fields in value names for // scoping. e.g: // // "user[name]=acme&user[addr][postcode]=1234&user[addr][city]=SFO" // // All other values are encoded using their default string representation. // // Multiple fields that encode to the same URL parameter name will be included // as multiple URL values of the same name. func Values(v interface{}) (url.Values, error) { values := make(url.Values) val := reflect.ValueOf(v) for val.Kind() == reflect.Ptr { if val.IsNil() { return values, nil } val = val.Elem() } if v == nil { return values, nil } if val.Kind() != reflect.Struct { return nil, fmt.Errorf("query: Values() expects struct input. Got %v", val.Kind()) } err := reflectValue(values, val, "") return values, err } // reflectValue populates the values parameter from the struct fields in val. // Embedded structs are followed recursively (using the rules defined in the // Values function documentation) breadth-first. func reflectValue(values url.Values, val reflect.Value, scope string) error { var embedded []reflect.Value typ := val.Type() for i := 0; i < typ.NumField(); i++ { sf := typ.Field(i) if sf.PkgPath != "" && !sf.Anonymous { // unexported continue } sv := val.Field(i) tag := sf.Tag.Get("url") if tag == "-" { continue } name, opts := parseTag(tag) if name == "" { if sf.Anonymous && sv.Kind() == reflect.Struct { // save embedded struct for later processing embedded = append(embedded, sv) continue } name = sf.Name } if scope != "" { name = scope + "[" + name + "]" } if opts.Contains("omitempty") && isEmptyValue(sv) { continue } if sv.Type().Implements(encoderType) { if !reflect.Indirect(sv).IsValid() { sv = reflect.New(sv.Type().Elem()) } m := sv.Interface().(Encoder) if err := m.EncodeValues(name, &values); err != nil { return err } continue } if sv.Kind() == reflect.Slice || sv.Kind() == reflect.Array { var del byte if opts.Contains("comma") { del = ',' } else if opts.Contains("space") { del = ' ' } else if opts.Contains("semicolon") { del = ';' } else if opts.Contains("brackets") { name = name + "[]" } if del != 0 { s := new(bytes.Buffer) first := true for i := 0; i < sv.Len(); i++ { if first { first = false } else { s.WriteByte(del) } s.WriteString(valueString(sv.Index(i), opts)) } values.Add(name, s.String()) } else { for i := 0; i < sv.Len(); i++ { k := name if opts.Contains("numbered") { k = fmt.Sprintf("%s%d", name, i) } values.Add(k, valueString(sv.Index(i), opts)) } } continue } for sv.Kind() == reflect.Ptr { if sv.IsNil() { break } sv = sv.Elem() } if sv.Type() == timeType { values.Add(name, valueString(sv, opts)) continue } if sv.Kind() == reflect.Struct { reflectValue(values, sv, name) continue } values.Add(name, valueString(sv, opts)) } for _, f := range embedded { if err := reflectValue(values, f, scope); err != nil { return err } } return nil } // valueString returns the string representation of a value. func valueString(v reflect.Value, opts tagOptions) string { for v.Kind() == reflect.Ptr { if v.IsNil() { return "" } v = v.Elem() } if v.Kind() == reflect.Bool && opts.Contains("int") { if v.Bool() { return "1" } return "0" } if v.Type() == timeType { t := v.Interface().(time.Time) if opts.Contains("unix") { return strconv.FormatInt(t.Unix(), 10) } return t.Format(time.RFC3339) } return fmt.Sprint(v.Interface()) } // isEmptyValue checks if a value should be considered empty for the purposes // of omitting fields with the "omitempty" option. func isEmptyValue(v reflect.Value) bool { switch v.Kind() { case reflect.Array, reflect.Map, reflect.Slice, reflect.String: return v.Len() == 0 case reflect.Bool: return !v.Bool() case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: return v.Int() == 0 case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: return v.Uint() == 0 case reflect.Float32, reflect.Float64: return v.Float() == 0 case reflect.Interface, reflect.Ptr: return v.IsNil() } if v.Type() == timeType { return v.Interface().(time.Time).IsZero() } return false } // tagOptions is the string following a comma in a struct field's "url" tag, or // the empty string. It does not include the leading comma. type tagOptions []string // parseTag splits a struct field's url tag into its name and comma-separated // options. func parseTag(tag string) (string, tagOptions) { s := strings.Split(tag, ",") return s[0], s[1:] } // Contains checks whether the tagOptions contains the specified option. func (o tagOptions) Contains(option string) bool { for _, s := range o { if s == option { return true } } return false } heroku-go-5.4.0/v5/vendor/github.com/google/uuid/000077500000000000000000000000001413703571500215365ustar00rootroot00000000000000heroku-go-5.4.0/v5/vendor/github.com/google/uuid/.travis.yml000066400000000000000000000001141413703571500236430ustar00rootroot00000000000000language: go go: - 1.4.3 - 1.5.3 - tip script: - go test -v ./... heroku-go-5.4.0/v5/vendor/github.com/google/uuid/CONTRIBUTING.md000066400000000000000000000004701413703571500237700ustar00rootroot00000000000000# How to contribute We definitely welcome patches and contribution to this project! ### Legal requirements In order to protect both you and ourselves, you will need to sign the [Contributor License Agreement](https://cla.developers.google.com/clas). You may have already signed it for other Google projects. heroku-go-5.4.0/v5/vendor/github.com/google/uuid/CONTRIBUTORS000066400000000000000000000001511413703571500234130ustar00rootroot00000000000000Paul Borman bmatsuo shawnps theory jboverfelt dsymonds cd1 wallclockbuilder dansouza heroku-go-5.4.0/v5/vendor/github.com/google/uuid/LICENSE000066400000000000000000000027101413703571500225430ustar00rootroot00000000000000Copyright (c) 2009,2014 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. heroku-go-5.4.0/v5/vendor/github.com/google/uuid/README.md000066400000000000000000000015571413703571500230250ustar00rootroot00000000000000# uuid ![build status](https://travis-ci.org/google/uuid.svg?branch=master) The uuid package generates and inspects UUIDs based on [RFC 4122](http://tools.ietf.org/html/rfc4122) and DCE 1.1: Authentication and Security Services. This package is based on the github.com/pborman/uuid package (previously named code.google.com/p/go-uuid). It differs from these earlier packages in that a UUID is a 16 byte array rather than a byte slice. One loss due to this change is the ability to represent an invalid UUID (vs a NIL UUID). ###### Install `go get github.com/google/uuid` ###### Documentation [![GoDoc](https://godoc.org/github.com/google/uuid?status.svg)](http://godoc.org/github.com/google/uuid) Full `go doc` style documentation for the package can be viewed online without installing this package by using the GoDoc site here: http://godoc.org/github.com/google/uuid heroku-go-5.4.0/v5/vendor/github.com/google/uuid/dce.go000066400000000000000000000040301413703571500226150ustar00rootroot00000000000000// Copyright 2016 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "encoding/binary" "fmt" "os" ) // A Domain represents a Version 2 domain type Domain byte // Domain constants for DCE Security (Version 2) UUIDs. const ( Person = Domain(0) Group = Domain(1) Org = Domain(2) ) // NewDCESecurity returns a DCE Security (Version 2) UUID. // // The domain should be one of Person, Group or Org. // On a POSIX system the id should be the users UID for the Person // domain and the users GID for the Group. The meaning of id for // the domain Org or on non-POSIX systems is site defined. // // For a given domain/id pair the same token may be returned for up to // 7 minutes and 10 seconds. func NewDCESecurity(domain Domain, id uint32) (UUID, error) { uuid, err := NewUUID() if err == nil { uuid[6] = (uuid[6] & 0x0f) | 0x20 // Version 2 uuid[9] = byte(domain) binary.BigEndian.PutUint32(uuid[0:], id) } return uuid, err } // NewDCEPerson returns a DCE Security (Version 2) UUID in the person // domain with the id returned by os.Getuid. // // NewDCESecurity(Person, uint32(os.Getuid())) func NewDCEPerson() (UUID, error) { return NewDCESecurity(Person, uint32(os.Getuid())) } // NewDCEGroup returns a DCE Security (Version 2) UUID in the group // domain with the id returned by os.Getgid. // // NewDCESecurity(Group, uint32(os.Getgid())) func NewDCEGroup() (UUID, error) { return NewDCESecurity(Group, uint32(os.Getgid())) } // Domain returns the domain for a Version 2 UUID. Domains are only defined // for Version 2 UUIDs. func (uuid UUID) Domain() Domain { return Domain(uuid[9]) } // ID returns the id for a Version 2 UUID. IDs are only defined for Version 2 // UUIDs. func (uuid UUID) ID() uint32 { return binary.BigEndian.Uint32(uuid[0:4]) } func (d Domain) String() string { switch d { case Person: return "Person" case Group: return "Group" case Org: return "Org" } return fmt.Sprintf("Domain%d", int(d)) } heroku-go-5.4.0/v5/vendor/github.com/google/uuid/doc.go000066400000000000000000000006271413703571500226370ustar00rootroot00000000000000// Copyright 2016 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package uuid generates and inspects UUIDs. // // UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security // Services. // // A UUID is a 16 byte (128 bit) array. UUIDs may be used as keys to // maps or compared directly. package uuid heroku-go-5.4.0/v5/vendor/github.com/google/uuid/hash.go000066400000000000000000000032641413703571500230150ustar00rootroot00000000000000// Copyright 2016 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "crypto/md5" "crypto/sha1" "hash" ) // Well known namespace IDs and UUIDs var ( NameSpaceDNS = Must(Parse("6ba7b810-9dad-11d1-80b4-00c04fd430c8")) NameSpaceURL = Must(Parse("6ba7b811-9dad-11d1-80b4-00c04fd430c8")) NameSpaceOID = Must(Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8")) NameSpaceX500 = Must(Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8")) Nil UUID // empty UUID, all zeros ) // NewHash returns a new UUID derived from the hash of space concatenated with // data generated by h. The hash should be at least 16 byte in length. The // first 16 bytes of the hash are used to form the UUID. The version of the // UUID will be the lower 4 bits of version. NewHash is used to implement // NewMD5 and NewSHA1. func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID { h.Reset() h.Write(space[:]) h.Write(data) s := h.Sum(nil) var uuid UUID copy(uuid[:], s) uuid[6] = (uuid[6] & 0x0f) | uint8((version&0xf)<<4) uuid[8] = (uuid[8] & 0x3f) | 0x80 // RFC 4122 variant return uuid } // NewMD5 returns a new MD5 (Version 3) UUID based on the // supplied name space and data. It is the same as calling: // // NewHash(md5.New(), space, data, 3) func NewMD5(space UUID, data []byte) UUID { return NewHash(md5.New(), space, data, 3) } // NewSHA1 returns a new SHA1 (Version 5) UUID based on the // supplied name space and data. It is the same as calling: // // NewHash(sha1.New(), space, data, 5) func NewSHA1(space UUID, data []byte) UUID { return NewHash(sha1.New(), space, data, 5) } heroku-go-5.4.0/v5/vendor/github.com/google/uuid/marshal.go000066400000000000000000000015771413703571500235260ustar00rootroot00000000000000// Copyright 2016 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import "fmt" // MarshalText implements encoding.TextMarshaler. func (uuid UUID) MarshalText() ([]byte, error) { var js [36]byte encodeHex(js[:], uuid) return js[:], nil } // UnmarshalText implements encoding.TextUnmarshaler. func (uuid *UUID) UnmarshalText(data []byte) error { id, err := ParseBytes(data) if err == nil { *uuid = id } return err } // MarshalBinary implements encoding.BinaryMarshaler. func (uuid UUID) MarshalBinary() ([]byte, error) { return uuid[:], nil } // UnmarshalBinary implements encoding.BinaryUnmarshaler. func (uuid *UUID) UnmarshalBinary(data []byte) error { if len(data) != 16 { return fmt.Errorf("invalid UUID (got %d bytes)", len(data)) } copy(uuid[:], data) return nil } heroku-go-5.4.0/v5/vendor/github.com/google/uuid/node.go000066400000000000000000000043771413703571500230250ustar00rootroot00000000000000// Copyright 2016 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "sync" ) var ( nodeMu sync.Mutex ifname string // name of interface being used nodeID [6]byte // hardware for version 1 UUIDs zeroID [6]byte // nodeID with only 0's ) // NodeInterface returns the name of the interface from which the NodeID was // derived. The interface "user" is returned if the NodeID was set by // SetNodeID. func NodeInterface() string { defer nodeMu.Unlock() nodeMu.Lock() return ifname } // SetNodeInterface selects the hardware address to be used for Version 1 UUIDs. // If name is "" then the first usable interface found will be used or a random // Node ID will be generated. If a named interface cannot be found then false // is returned. // // SetNodeInterface never fails when name is "". func SetNodeInterface(name string) bool { defer nodeMu.Unlock() nodeMu.Lock() return setNodeInterface(name) } func setNodeInterface(name string) bool { iname, addr := getHardwareInterface(name) // null implementation for js if iname != "" && addr != nil { ifname = iname copy(nodeID[:], addr) return true } // We found no interfaces with a valid hardware address. If name // does not specify a specific interface generate a random Node ID // (section 4.1.6) if name == "" { randomBits(nodeID[:]) return true } return false } // NodeID returns a slice of a copy of the current Node ID, setting the Node ID // if not already set. func NodeID() []byte { defer nodeMu.Unlock() nodeMu.Lock() if nodeID == zeroID { setNodeInterface("") } nid := nodeID return nid[:] } // SetNodeID sets the Node ID to be used for Version 1 UUIDs. The first 6 bytes // of id are used. If id is less than 6 bytes then false is returned and the // Node ID is not set. func SetNodeID(id []byte) bool { if len(id) < 6 { return false } defer nodeMu.Unlock() nodeMu.Lock() copy(nodeID[:], id) ifname = "user" return true } // NodeID returns the 6 byte node id encoded in uuid. It returns nil if uuid is // not valid. The NodeID is only well defined for version 1 and 2 UUIDs. func (uuid UUID) NodeID() []byte { var node [6]byte copy(node[:], uuid[10:]) return node[:] } heroku-go-5.4.0/v5/vendor/github.com/google/uuid/node_js.go000066400000000000000000000007631413703571500235140ustar00rootroot00000000000000// Copyright 2017 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build js package uuid // getHardwareInterface returns nil values for the JS version of the code. // This remvoves the "net" dependency, because it is not used in the browser. // Using the "net" library inflates the size of the transpiled JS code by 673k bytes. func getHardwareInterface(name string) (string, []byte) { return "", nil } heroku-go-5.4.0/v5/vendor/github.com/google/uuid/node_net.go000066400000000000000000000016651413703571500236700ustar00rootroot00000000000000// Copyright 2017 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !js package uuid import "net" var interfaces []net.Interface // cached list of interfaces // getHardwareInterface returns the name and hardware address of interface name. // If name is "" then the name and hardware address of one of the system's // interfaces is returned. If no interfaces are found (name does not exist or // there are no interfaces) then "", nil is returned. // // Only addresses of at least 6 bytes are returned. func getHardwareInterface(name string) (string, []byte) { if interfaces == nil { var err error interfaces, err = net.Interfaces() if err != nil { return "", nil } } for _, ifs := range interfaces { if len(ifs.HardwareAddr) >= 6 && (name == "" || name == ifs.Name) { return ifs.Name, ifs.HardwareAddr } } return "", nil } heroku-go-5.4.0/v5/vendor/github.com/google/uuid/sql.go000066400000000000000000000026621413703571500226720ustar00rootroot00000000000000// Copyright 2016 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "database/sql/driver" "fmt" ) // Scan implements sql.Scanner so UUIDs can be read from databases transparently // Currently, database types that map to string and []byte are supported. Please // consult database-specific driver documentation for matching types. func (uuid *UUID) Scan(src interface{}) error { switch src := src.(type) { case nil: return nil case string: // if an empty UUID comes from a table, we return a null UUID if src == "" { return nil } // see Parse for required string format u, err := Parse(src) if err != nil { return fmt.Errorf("Scan: %v", err) } *uuid = u case []byte: // if an empty UUID comes from a table, we return a null UUID if len(src) == 0 { return nil } // assumes a simple slice of bytes if 16 bytes // otherwise attempts to parse if len(src) != 16 { return uuid.Scan(string(src)) } copy((*uuid)[:], src) default: return fmt.Errorf("Scan: unable to scan type %T into UUID", src) } return nil } // Value implements sql.Valuer so that UUIDs can be written to databases // transparently. Currently, UUIDs map to strings. Please consult // database-specific driver documentation for matching types. func (uuid UUID) Value() (driver.Value, error) { return uuid.String(), nil } heroku-go-5.4.0/v5/vendor/github.com/google/uuid/time.go000066400000000000000000000066651413703571500230400ustar00rootroot00000000000000// Copyright 2016 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "encoding/binary" "sync" "time" ) // A Time represents a time as the number of 100's of nanoseconds since 15 Oct // 1582. type Time int64 const ( lillian = 2299160 // Julian day of 15 Oct 1582 unix = 2440587 // Julian day of 1 Jan 1970 epoch = unix - lillian // Days between epochs g1582 = epoch * 86400 // seconds between epochs g1582ns100 = g1582 * 10000000 // 100s of a nanoseconds between epochs ) var ( timeMu sync.Mutex lasttime uint64 // last time we returned clockSeq uint16 // clock sequence for this run timeNow = time.Now // for testing ) // UnixTime converts t the number of seconds and nanoseconds using the Unix // epoch of 1 Jan 1970. func (t Time) UnixTime() (sec, nsec int64) { sec = int64(t - g1582ns100) nsec = (sec % 10000000) * 100 sec /= 10000000 return sec, nsec } // GetTime returns the current Time (100s of nanoseconds since 15 Oct 1582) and // clock sequence as well as adjusting the clock sequence as needed. An error // is returned if the current time cannot be determined. func GetTime() (Time, uint16, error) { defer timeMu.Unlock() timeMu.Lock() return getTime() } func getTime() (Time, uint16, error) { t := timeNow() // If we don't have a clock sequence already, set one. if clockSeq == 0 { setClockSequence(-1) } now := uint64(t.UnixNano()/100) + g1582ns100 // If time has gone backwards with this clock sequence then we // increment the clock sequence if now <= lasttime { clockSeq = ((clockSeq + 1) & 0x3fff) | 0x8000 } lasttime = now return Time(now), clockSeq, nil } // ClockSequence returns the current clock sequence, generating one if not // already set. The clock sequence is only used for Version 1 UUIDs. // // The uuid package does not use global static storage for the clock sequence or // the last time a UUID was generated. Unless SetClockSequence is used, a new // random clock sequence is generated the first time a clock sequence is // requested by ClockSequence, GetTime, or NewUUID. (section 4.2.1.1) func ClockSequence() int { defer timeMu.Unlock() timeMu.Lock() return clockSequence() } func clockSequence() int { if clockSeq == 0 { setClockSequence(-1) } return int(clockSeq & 0x3fff) } // SetClockSequence sets the clock sequence to the lower 14 bits of seq. Setting to // -1 causes a new sequence to be generated. func SetClockSequence(seq int) { defer timeMu.Unlock() timeMu.Lock() setClockSequence(seq) } func setClockSequence(seq int) { if seq == -1 { var b [2]byte randomBits(b[:]) // clock sequence seq = int(b[0])<<8 | int(b[1]) } oldSeq := clockSeq clockSeq = uint16(seq&0x3fff) | 0x8000 // Set our variant if oldSeq != clockSeq { lasttime = 0 } } // Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in // uuid. The time is only defined for version 1 and 2 UUIDs. func (uuid UUID) Time() Time { time := int64(binary.BigEndian.Uint32(uuid[0:4])) time |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32 time |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48 return Time(time) } // ClockSequence returns the clock sequence encoded in uuid. // The clock sequence is only well defined for version 1 and 2 UUIDs. func (uuid UUID) ClockSequence() int { return int(binary.BigEndian.Uint16(uuid[8:10])) & 0x3fff } heroku-go-5.4.0/v5/vendor/github.com/google/uuid/util.go000066400000000000000000000036001413703571500230410ustar00rootroot00000000000000// Copyright 2016 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "io" ) // randomBits completely fills slice b with random data. func randomBits(b []byte) { if _, err := io.ReadFull(rander, b); err != nil { panic(err.Error()) // rand should never fail } } // xvalues returns the value of a byte as a hexadecimal digit or 255. var xvalues = [256]byte{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 255, 255, 255, 255, 255, 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, } // xtob converts hex characters x1 and x2 into a byte. func xtob(x1, x2 byte) (byte, bool) { b1 := xvalues[x1] b2 := xvalues[x2] return (b1 << 4) | b2, b1 != 255 && b2 != 255 } heroku-go-5.4.0/v5/vendor/github.com/google/uuid/uuid.go000066400000000000000000000112061413703571500230330ustar00rootroot00000000000000// Copyright 2016 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "bytes" "crypto/rand" "encoding/hex" "errors" "fmt" "io" "strings" ) // A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC // 4122. type UUID [16]byte // A Version represents a UUID's version. type Version byte // A Variant represents a UUID's variant. type Variant byte // Constants returned by Variant. const ( Invalid = Variant(iota) // Invalid UUID RFC4122 // The variant specified in RFC4122 Reserved // Reserved, NCS backward compatibility. Microsoft // Reserved, Microsoft Corporation backward compatibility. Future // Reserved for future definition. ) var rander = rand.Reader // random function // Parse decodes s into a UUID or returns an error. Both the UUID form of // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx and // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx are decoded. func Parse(s string) (UUID, error) { var uuid UUID if len(s) != 36 { if len(s) != 36+9 { return uuid, fmt.Errorf("invalid UUID length: %d", len(s)) } if strings.ToLower(s[:9]) != "urn:uuid:" { return uuid, fmt.Errorf("invalid urn prefix: %q", s[:9]) } s = s[9:] } if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' { return uuid, errors.New("invalid UUID format") } for i, x := range [16]int{ 0, 2, 4, 6, 9, 11, 14, 16, 19, 21, 24, 26, 28, 30, 32, 34} { v, ok := xtob(s[x], s[x+1]) if !ok { return uuid, errors.New("invalid UUID format") } uuid[i] = v } return uuid, nil } // ParseBytes is like Parse, except it parses a byte slice instead of a string. func ParseBytes(b []byte) (UUID, error) { var uuid UUID if len(b) != 36 { if len(b) != 36+9 { return uuid, fmt.Errorf("invalid UUID length: %d", len(b)) } if !bytes.Equal(bytes.ToLower(b[:9]), []byte("urn:uuid:")) { return uuid, fmt.Errorf("invalid urn prefix: %q", b[:9]) } b = b[9:] } if b[8] != '-' || b[13] != '-' || b[18] != '-' || b[23] != '-' { return uuid, errors.New("invalid UUID format") } for i, x := range [16]int{ 0, 2, 4, 6, 9, 11, 14, 16, 19, 21, 24, 26, 28, 30, 32, 34} { v, ok := xtob(b[x], b[x+1]) if !ok { return uuid, errors.New("invalid UUID format") } uuid[i] = v } return uuid, nil } // FromBytes creates a new UUID from a byte slice. Returns an error if the slice // does not have a length of 16. The bytes are copied from the slice. func FromBytes(b []byte) (uuid UUID, err error) { err = uuid.UnmarshalBinary(b) return uuid, err } // Must returns uuid if err is nil and panics otherwise. func Must(uuid UUID, err error) UUID { if err != nil { panic(err) } return uuid } // String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx // , or "" if uuid is invalid. func (uuid UUID) String() string { var buf [36]byte encodeHex(buf[:], uuid) return string(buf[:]) } // URN returns the RFC 2141 URN form of uuid, // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, or "" if uuid is invalid. func (uuid UUID) URN() string { var buf [36 + 9]byte copy(buf[:], "urn:uuid:") encodeHex(buf[9:], uuid) return string(buf[:]) } func encodeHex(dst []byte, uuid UUID) { hex.Encode(dst[:], uuid[:4]) dst[8] = '-' hex.Encode(dst[9:13], uuid[4:6]) dst[13] = '-' hex.Encode(dst[14:18], uuid[6:8]) dst[18] = '-' hex.Encode(dst[19:23], uuid[8:10]) dst[23] = '-' hex.Encode(dst[24:], uuid[10:]) } // Variant returns the variant encoded in uuid. func (uuid UUID) Variant() Variant { switch { case (uuid[8] & 0xc0) == 0x80: return RFC4122 case (uuid[8] & 0xe0) == 0xc0: return Microsoft case (uuid[8] & 0xe0) == 0xe0: return Future default: return Reserved } } // Version returns the version of uuid. func (uuid UUID) Version() Version { return Version(uuid[6] >> 4) } func (v Version) String() string { if v > 15 { return fmt.Sprintf("BAD_VERSION_%d", v) } return fmt.Sprintf("VERSION_%d", v) } func (v Variant) String() string { switch v { case RFC4122: return "RFC4122" case Reserved: return "Reserved" case Microsoft: return "Microsoft" case Future: return "Future" case Invalid: return "Invalid" } return fmt.Sprintf("BadVariant%d", int(v)) } // SetRand sets the random number generator to r, which implements io.Reader. // If r.Read returns an error when the package requests random data then // a panic will be issued. // // Calling SetRand with nil sets the random number generator to the default // generator. func SetRand(r io.Reader) { if r == nil { rander = rand.Reader return } rander = r } heroku-go-5.4.0/v5/vendor/github.com/google/uuid/version1.go000066400000000000000000000023511413703571500236340ustar00rootroot00000000000000// Copyright 2016 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "encoding/binary" ) // NewUUID returns a Version 1 UUID based on the current NodeID and clock // sequence, and the current time. If the NodeID has not been set by SetNodeID // or SetNodeInterface then it will be set automatically. If the NodeID cannot // be set NewUUID returns nil. If clock sequence has not been set by // SetClockSequence then it will be set automatically. If GetTime fails to // return the current NewUUID returns nil and an error. // // In most cases, New should be used. func NewUUID() (UUID, error) { nodeMu.Lock() if nodeID == zeroID { setNodeInterface("") } nodeMu.Unlock() var uuid UUID now, seq, err := GetTime() if err != nil { return uuid, err } timeLow := uint32(now & 0xffffffff) timeMid := uint16((now >> 32) & 0xffff) timeHi := uint16((now >> 48) & 0x0fff) timeHi |= 0x1000 // Version 1 binary.BigEndian.PutUint32(uuid[0:], timeLow) binary.BigEndian.PutUint16(uuid[4:], timeMid) binary.BigEndian.PutUint16(uuid[6:], timeHi) binary.BigEndian.PutUint16(uuid[8:], seq) copy(uuid[10:], nodeID[:]) return uuid, nil } heroku-go-5.4.0/v5/vendor/github.com/google/uuid/version4.go000066400000000000000000000021571413703571500236430ustar00rootroot00000000000000// Copyright 2016 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import "io" // New creates a new random UUID or panics. New is equivalent to // the expression // // uuid.Must(uuid.NewRandom()) func New() UUID { return Must(NewRandom()) } // NewRandom returns a Random (Version 4) UUID. // // The strength of the UUIDs is based on the strength of the crypto/rand // package. // // A note about uniqueness derived from the UUID Wikipedia entry: // // Randomly generated UUIDs have 122 random bits. One's annual risk of being // hit by a meteorite is estimated to be one chance in 17 billion, that // means the probability is about 0.00000000006 (6 × 10−11), // equivalent to the odds of creating a few tens of trillions of UUIDs in a // year and having one duplicate. func NewRandom() (UUID, error) { var uuid UUID _, err := io.ReadFull(rander, uuid[:]) if err != nil { return Nil, err } uuid[6] = (uuid[6] & 0x0f) | 0x40 // Version 4 uuid[8] = (uuid[8] & 0x3f) | 0x80 // Variant is 10 return uuid, nil } heroku-go-5.4.0/v5/vendor/github.com/pborman/000077500000000000000000000000001413703571500207525ustar00rootroot00000000000000heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/000077500000000000000000000000001413703571500217205ustar00rootroot00000000000000heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/.travis.yml000066400000000000000000000001301413703571500240230ustar00rootroot00000000000000language: go go: - "1.9" - "1.10" - "1.11" - tip script: - go test -v ./... heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/CONTRIBUTING.md000066400000000000000000000004701413703571500241520ustar00rootroot00000000000000# How to contribute We definitely welcome patches and contribution to this project! ### Legal requirements In order to protect both you and ourselves, you will need to sign the [Contributor License Agreement](https://cla.developers.google.com/clas). You may have already signed it for other Google projects. heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/CONTRIBUTORS000066400000000000000000000000401413703571500235720ustar00rootroot00000000000000Paul Borman heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/LICENSE000066400000000000000000000027101413703571500227250ustar00rootroot00000000000000Copyright (c) 2009,2014 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/README.md000066400000000000000000000014121413703571500231750ustar00rootroot00000000000000This project was automatically exported from code.google.com/p/go-uuid # uuid ![build status](https://travis-ci.org/pborman/uuid.svg?branch=master) The uuid package generates and inspects UUIDs based on [RFC 4122](http://tools.ietf.org/html/rfc4122) and DCE 1.1: Authentication and Security Services. This package now leverages the github.com/google/uuid package (which is based off an earlier version of this package). ###### Install `go get github.com/pborman/uuid` ###### Documentation [![GoDoc](https://godoc.org/github.com/pborman/uuid?status.svg)](http://godoc.org/github.com/pborman/uuid) Full `go doc` style documentation for the package can be viewed online without installing this package by using the GoDoc site here: http://godoc.org/github.com/pborman/uuid heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/dce.go000066400000000000000000000040621413703571500230040ustar00rootroot00000000000000// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "encoding/binary" "fmt" "os" ) // A Domain represents a Version 2 domain type Domain byte // Domain constants for DCE Security (Version 2) UUIDs. const ( Person = Domain(0) Group = Domain(1) Org = Domain(2) ) // NewDCESecurity returns a DCE Security (Version 2) UUID. // // The domain should be one of Person, Group or Org. // On a POSIX system the id should be the users UID for the Person // domain and the users GID for the Group. The meaning of id for // the domain Org or on non-POSIX systems is site defined. // // For a given domain/id pair the same token may be returned for up to // 7 minutes and 10 seconds. func NewDCESecurity(domain Domain, id uint32) UUID { uuid := NewUUID() if uuid != nil { uuid[6] = (uuid[6] & 0x0f) | 0x20 // Version 2 uuid[9] = byte(domain) binary.BigEndian.PutUint32(uuid[0:], id) } return uuid } // NewDCEPerson returns a DCE Security (Version 2) UUID in the person // domain with the id returned by os.Getuid. // // NewDCEPerson(Person, uint32(os.Getuid())) func NewDCEPerson() UUID { return NewDCESecurity(Person, uint32(os.Getuid())) } // NewDCEGroup returns a DCE Security (Version 2) UUID in the group // domain with the id returned by os.Getgid. // // NewDCEGroup(Group, uint32(os.Getgid())) func NewDCEGroup() UUID { return NewDCESecurity(Group, uint32(os.Getgid())) } // Domain returns the domain for a Version 2 UUID or false. func (uuid UUID) Domain() (Domain, bool) { if v, _ := uuid.Version(); v != 2 { return 0, false } return Domain(uuid[9]), true } // Id returns the id for a Version 2 UUID or false. func (uuid UUID) Id() (uint32, bool) { if v, _ := uuid.Version(); v != 2 { return 0, false } return binary.BigEndian.Uint32(uuid[0:4]), true } func (d Domain) String() string { switch d { case Person: return "Person" case Group: return "Group" case Org: return "Org" } return fmt.Sprintf("Domain%d", int(d)) } heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/doc.go000066400000000000000000000007621413703571500230210ustar00rootroot00000000000000// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // The uuid package generates and inspects UUIDs. // // UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security // Services. // // This package is a partial wrapper around the github.com/google/uuid package. // This package represents a UUID as []byte while github.com/google/uuid // represents a UUID as [16]byte. package uuid heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/go.mod000066400000000000000000000001061413703571500230230ustar00rootroot00000000000000module github.com/pborman/uuid require github.com/google/uuid v1.0.0 heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/go.sum000066400000000000000000000002431413703571500230520ustar00rootroot00000000000000github.com/google/uuid v1.0.0 h1:b4Gk+7WdP/d3HZH8EJsZpvV7EtDOgaZLtnaNGIu1adA= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/hash.go000066400000000000000000000032111413703571500231670ustar00rootroot00000000000000// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "crypto/md5" "crypto/sha1" "hash" ) // Well known Name Space IDs and UUIDs var ( NameSpace_DNS = Parse("6ba7b810-9dad-11d1-80b4-00c04fd430c8") NameSpace_URL = Parse("6ba7b811-9dad-11d1-80b4-00c04fd430c8") NameSpace_OID = Parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8") NameSpace_X500 = Parse("6ba7b814-9dad-11d1-80b4-00c04fd430c8") NIL = Parse("00000000-0000-0000-0000-000000000000") ) // NewHash returns a new UUID derived from the hash of space concatenated with // data generated by h. The hash should be at least 16 byte in length. The // first 16 bytes of the hash are used to form the UUID. The version of the // UUID will be the lower 4 bits of version. NewHash is used to implement // NewMD5 and NewSHA1. func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID { h.Reset() h.Write(space) h.Write([]byte(data)) s := h.Sum(nil) uuid := make([]byte, 16) copy(uuid, s) uuid[6] = (uuid[6] & 0x0f) | uint8((version&0xf)<<4) uuid[8] = (uuid[8] & 0x3f) | 0x80 // RFC 4122 variant return uuid } // NewMD5 returns a new MD5 (Version 3) UUID based on the // supplied name space and data. // // NewHash(md5.New(), space, data, 3) func NewMD5(space UUID, data []byte) UUID { return NewHash(md5.New(), space, data, 3) } // NewSHA1 returns a new SHA1 (Version 5) UUID based on the // supplied name space and data. // // NewHash(sha1.New(), space, data, 5) func NewSHA1(space UUID, data []byte) UUID { return NewHash(sha1.New(), space, data, 5) } heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/marshal.go000066400000000000000000000034261413703571500237030ustar00rootroot00000000000000// Copyright 2016 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "errors" "fmt" guuid "github.com/google/uuid" ) // MarshalText implements encoding.TextMarshaler. func (u UUID) MarshalText() ([]byte, error) { if len(u) != 16 { return nil, nil } var js [36]byte encodeHex(js[:], u) return js[:], nil } // UnmarshalText implements encoding.TextUnmarshaler. func (u *UUID) UnmarshalText(data []byte) error { if len(data) == 0 { return nil } id := Parse(string(data)) if id == nil { return errors.New("invalid UUID") } *u = id return nil } // MarshalBinary implements encoding.BinaryMarshaler. func (u UUID) MarshalBinary() ([]byte, error) { return u[:], nil } // UnmarshalBinary implements encoding.BinaryUnmarshaler. func (u *UUID) UnmarshalBinary(data []byte) error { if len(data) == 0 { return nil } if len(data) != 16 { return fmt.Errorf("invalid UUID (got %d bytes)", len(data)) } var id [16]byte copy(id[:], data) *u = id[:] return nil } // MarshalText implements encoding.TextMarshaler. func (u Array) MarshalText() ([]byte, error) { var js [36]byte encodeHex(js[:], u[:]) return js[:], nil } // UnmarshalText implements encoding.TextUnmarshaler. func (u *Array) UnmarshalText(data []byte) error { id, err := guuid.ParseBytes(data) if err != nil { return err } *u = Array(id) return nil } // MarshalBinary implements encoding.BinaryMarshaler. func (u Array) MarshalBinary() ([]byte, error) { return u[:], nil } // UnmarshalBinary implements encoding.BinaryUnmarshaler. func (u *Array) UnmarshalBinary(data []byte) error { if len(data) != 16 { return fmt.Errorf("invalid UUID (got %d bytes)", len(data)) } copy(u[:], data) return nil } heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/node.go000066400000000000000000000027571413703571500232070ustar00rootroot00000000000000// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( guuid "github.com/google/uuid" ) // NodeInterface returns the name of the interface from which the NodeID was // derived. The interface "user" is returned if the NodeID was set by // SetNodeID. func NodeInterface() string { return guuid.NodeInterface() } // SetNodeInterface selects the hardware address to be used for Version 1 UUIDs. // If name is "" then the first usable interface found will be used or a random // Node ID will be generated. If a named interface cannot be found then false // is returned. // // SetNodeInterface never fails when name is "". func SetNodeInterface(name string) bool { return guuid.SetNodeInterface(name) } // NodeID returns a slice of a copy of the current Node ID, setting the Node ID // if not already set. func NodeID() []byte { return guuid.NodeID() } // SetNodeID sets the Node ID to be used for Version 1 UUIDs. The first 6 bytes // of id are used. If id is less than 6 bytes then false is returned and the // Node ID is not set. func SetNodeID(id []byte) bool { return guuid.SetNodeID(id) } // NodeID returns the 6 byte node id encoded in uuid. It returns nil if uuid is // not valid. The NodeID is only well defined for version 1 and 2 UUIDs. func (uuid UUID) NodeID() []byte { if len(uuid) != 16 { return nil } node := make([]byte, 6) copy(node, uuid[10:]) return node } heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/sql.go000066400000000000000000000031441413703571500230500ustar00rootroot00000000000000// Copyright 2015 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "database/sql/driver" "errors" "fmt" ) // Scan implements sql.Scanner so UUIDs can be read from databases transparently // Currently, database types that map to string and []byte are supported. Please // consult database-specific driver documentation for matching types. func (uuid *UUID) Scan(src interface{}) error { switch src.(type) { case string: // if an empty UUID comes from a table, we return a null UUID if src.(string) == "" { return nil } // see uuid.Parse for required string format parsed := Parse(src.(string)) if parsed == nil { return errors.New("Scan: invalid UUID format") } *uuid = parsed case []byte: b := src.([]byte) // if an empty UUID comes from a table, we return a null UUID if len(b) == 0 { return nil } // assumes a simple slice of bytes if 16 bytes // otherwise attempts to parse if len(b) == 16 { parsed := make([]byte, 16) copy(parsed, b) *uuid = UUID(parsed) } else { u := Parse(string(b)) if u == nil { return errors.New("Scan: invalid UUID format") } *uuid = u } default: return fmt.Errorf("Scan: unable to scan type %T into UUID", src) } return nil } // Value implements sql.Valuer so that UUIDs can be written to databases // transparently. Currently, UUIDs map to strings. Please consult // database-specific driver documentation for matching types. func (uuid UUID) Value() (driver.Value, error) { return uuid.String(), nil } heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/time.go000066400000000000000000000041431413703571500232070ustar00rootroot00000000000000// Copyright 2014 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "encoding/binary" guuid "github.com/google/uuid" ) // A Time represents a time as the number of 100's of nanoseconds since 15 Oct // 1582. type Time = guuid.Time // GetTime returns the current Time (100s of nanoseconds since 15 Oct 1582) and // clock sequence as well as adjusting the clock sequence as needed. An error // is returned if the current time cannot be determined. func GetTime() (Time, uint16, error) { return guuid.GetTime() } // ClockSequence returns the current clock sequence, generating one if not // already set. The clock sequence is only used for Version 1 UUIDs. // // The uuid package does not use global static storage for the clock sequence or // the last time a UUID was generated. Unless SetClockSequence a new random // clock sequence is generated the first time a clock sequence is requested by // ClockSequence, GetTime, or NewUUID. (section 4.2.1.1) sequence is generated // for func ClockSequence() int { return guuid.ClockSequence() } // SetClockSeq sets the clock sequence to the lower 14 bits of seq. Setting to // -1 causes a new sequence to be generated. func SetClockSequence(seq int) { guuid.SetClockSequence(seq) } // Time returns the time in 100s of nanoseconds since 15 Oct 1582 encoded in // uuid. It returns false if uuid is not valid. The time is only well defined // for version 1 and 2 UUIDs. func (uuid UUID) Time() (Time, bool) { if len(uuid) != 16 { return 0, false } time := int64(binary.BigEndian.Uint32(uuid[0:4])) time |= int64(binary.BigEndian.Uint16(uuid[4:6])) << 32 time |= int64(binary.BigEndian.Uint16(uuid[6:8])&0xfff) << 48 return Time(time), true } // ClockSequence returns the clock sequence encoded in uuid. It returns false // if uuid is not valid. The clock sequence is only well defined for version 1 // and 2 UUIDs. func (uuid UUID) ClockSequence() (int, bool) { if len(uuid) != 16 { return 0, false } return int(binary.BigEndian.Uint16(uuid[8:10])) & 0x3fff, true } heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/util.go000066400000000000000000000032721413703571500232300ustar00rootroot00000000000000// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid // xvalues returns the value of a byte as a hexadecimal digit or 255. var xvalues = [256]byte{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 255, 255, 255, 255, 255, 255, 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 10, 11, 12, 13, 14, 15, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, } // xtob converts the the first two hex bytes of x into a byte. func xtob(x string) (byte, bool) { b1 := xvalues[x[0]] b2 := xvalues[x[1]] return (b1 << 4) | b2, b1 != 255 && b2 != 255 } heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/uuid.go000066400000000000000000000075601413703571500232250ustar00rootroot00000000000000// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( "bytes" "crypto/rand" "encoding/hex" "io" guuid "github.com/google/uuid" ) // Array is a pass-by-value UUID that can be used as an effecient key in a map. type Array [16]byte // UUID converts uuid into a slice. func (uuid Array) UUID() UUID { return uuid[:] } // String returns the string representation of uuid, // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. func (uuid Array) String() string { return guuid.UUID(uuid).String() } // A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC // 4122. type UUID []byte // A Version represents a UUIDs version. type Version = guuid.Version // A Variant represents a UUIDs variant. type Variant = guuid.Variant // Constants returned by Variant. const ( Invalid = guuid.Invalid // Invalid UUID RFC4122 = guuid.RFC4122 // The variant specified in RFC4122 Reserved = guuid.Reserved // Reserved, NCS backward compatibility. Microsoft = guuid.Microsoft // Reserved, Microsoft Corporation backward compatibility. Future = guuid.Future // Reserved for future definition. ) var rander = rand.Reader // random function // New returns a new random (version 4) UUID as a string. It is a convenience // function for NewRandom().String(). func New() string { return NewRandom().String() } // Parse decodes s into a UUID or returns nil. See github.com/google/uuid for // the formats parsed. func Parse(s string) UUID { gu, err := guuid.Parse(s) if err == nil { return gu[:] } return nil } // ParseBytes is like Parse, except it parses a byte slice instead of a string. func ParseBytes(b []byte) (UUID, error) { gu, err := guuid.ParseBytes(b) if err == nil { return gu[:], nil } return nil, err } // Equal returns true if uuid1 and uuid2 are equal. func Equal(uuid1, uuid2 UUID) bool { return bytes.Equal(uuid1, uuid2) } // Array returns an array representation of uuid that can be used as a map key. // Array panics if uuid is not valid. func (uuid UUID) Array() Array { if len(uuid) != 16 { panic("invalid uuid") } var a Array copy(a[:], uuid) return a } // String returns the string form of uuid, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx // , or "" if uuid is invalid. func (uuid UUID) String() string { if len(uuid) != 16 { return "" } var buf [36]byte encodeHex(buf[:], uuid) return string(buf[:]) } // URN returns the RFC 2141 URN form of uuid, // urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, or "" if uuid is invalid. func (uuid UUID) URN() string { if len(uuid) != 16 { return "" } var buf [36 + 9]byte copy(buf[:], "urn:uuid:") encodeHex(buf[9:], uuid) return string(buf[:]) } func encodeHex(dst []byte, uuid UUID) { hex.Encode(dst[:], uuid[:4]) dst[8] = '-' hex.Encode(dst[9:13], uuid[4:6]) dst[13] = '-' hex.Encode(dst[14:18], uuid[6:8]) dst[18] = '-' hex.Encode(dst[19:23], uuid[8:10]) dst[23] = '-' hex.Encode(dst[24:], uuid[10:]) } // Variant returns the variant encoded in uuid. It returns Invalid if // uuid is invalid. func (uuid UUID) Variant() Variant { if len(uuid) != 16 { return Invalid } switch { case (uuid[8] & 0xc0) == 0x80: return RFC4122 case (uuid[8] & 0xe0) == 0xc0: return Microsoft case (uuid[8] & 0xe0) == 0xe0: return Future default: return Reserved } } // Version returns the version of uuid. It returns false if uuid is not // valid. func (uuid UUID) Version() (Version, bool) { if len(uuid) != 16 { return 0, false } return Version(uuid[6] >> 4), true } // SetRand sets the random number generator to r, which implements io.Reader. // If r.Read returns an error when the package requests random data then // a panic will be issued. // // Calling SetRand with nil sets the random number generator to the default // generator. func SetRand(r io.Reader) { guuid.SetRand(r) } heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/version1.go000066400000000000000000000013471413703571500240220ustar00rootroot00000000000000// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import ( guuid "github.com/google/uuid" ) // NewUUID returns a Version 1 UUID based on the current NodeID and clock // sequence, and the current time. If the NodeID has not been set by SetNodeID // or SetNodeInterface then it will be set automatically. If the NodeID cannot // be set NewUUID returns nil. If clock sequence has not been set by // SetClockSequence then it will be set automatically. If GetTime fails to // return the current NewUUID returns nil. func NewUUID() UUID { gu, err := guuid.NewUUID() if err == nil { return UUID(gu[:]) } return nil } heroku-go-5.4.0/v5/vendor/github.com/pborman/uuid/version4.go000066400000000000000000000015371413703571500240260ustar00rootroot00000000000000// Copyright 2011 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package uuid import guuid "github.com/google/uuid" // Random returns a Random (Version 4) UUID or panics. // // The strength of the UUIDs is based on the strength of the crypto/rand // package. // // A note about uniqueness derived from the UUID Wikipedia entry: // // Randomly generated UUIDs have 122 random bits. One's annual risk of being // hit by a meteorite is estimated to be one chance in 17 billion, that // means the probability is about 0.00000000006 (6 × 10−11), // equivalent to the odds of creating a few tens of trillions of UUIDs in a // year and having one duplicate. func NewRandom() UUID { if gu, err := guuid.NewRandom(); err == nil { return UUID(gu[:]) } return nil } heroku-go-5.4.0/v5/vendor/modules.txt000066400000000000000000000004171413703571500174700ustar00rootroot00000000000000# github.com/cenkalti/backoff v2.1.1+incompatible github.com/cenkalti/backoff # github.com/google/go-querystring v1.0.0 github.com/google/go-querystring/query # github.com/google/uuid v1.0.0 github.com/google/uuid # github.com/pborman/uuid v1.2.0 github.com/pborman/uuid