Codebase list golang-github-cyberdelia-heroku-go / 331640a
New upstream version 1.0.0 Thorsten Alteholz 5 years ago
10 changed file(s) with 21986 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 language: go
0 memo = "86162e7f6ce833531443650739602f70c6d40b6dda64f47bc175446abbf66a1b"
1
2 [[projects]]
3 branch = "master"
4 name = "github.com/google/go-querystring"
5 packages = ["query"]
6 revision = "53e6ce116135b80d037921a7fdd5138cf32d7a8a"
7
8 [[projects]]
9 branch = "master"
10 name = "github.com/pborman/uuid"
11 packages = ["."]
12 revision = "e790cca94e6cc75c7064b1332e63811d4aae1a53"
0
1 ## Gopkg.toml example (these lines may be deleted)
2
3 ## "required" lists a set of packages (not projects) that must be included in
4 ## Gopkg.lock. This list is merged with the set of packages imported by the current
5 ## project. Use it when your project needs a package it doesn't explicitly import -
6 ## including "main" packages.
7 # required = ["github.com/user/thing/cmd/thing"]
8
9 ## "ignored" lists a set of packages (not projects) that are ignored when
10 ## dep statically analyzes source code. Ignored packages can be in this project,
11 ## or in a dependency.
12 # ignored = ["github.com/user/project/badpkg"]
13
14 ## Dependencies define constraints on dependent projects. They are respected by
15 ## dep whether coming from the Gopkg.toml of the current project or a dependency.
16 # [[dependencies]]
17 ## Required: the root import path of the project being constrained.
18 # name = "github.com/user/project"
19 #
20 ## Recommended: the version constraint to enforce for the project.
21 ## Only one of "branch", "version" or "revision" can be specified.
22 # version = "1.0.0"
23 # branch = "master"
24 # revision = "abc123"
25 #
26 ## Optional: an alternate location (URL or import path) for the project's source.
27 # source = "https://github.com/myfork/package.git"
28
29 ## Overrides have the same structure as [[dependencies]], but supercede all
30 ## [[dependencies]] declarations from all projects. Only the current project's
31 ## [[overrides]] are applied.
32 ##
33 ## Overrides are a sledgehammer. Use them only as a last resort.
34 # [[overrides]]
35 ## Required: the root import path of the project being constrained.
36 # name = "github.com/user/project"
37 #
38 ## Optional: specifying a version constraint override will cause all other
39 ## constraints on this project to be ignored; only the overriden constraint
40 ## need be satisfied.
41 ## Again, only one of "branch", "version" or "revision" can be specified.
42 # version = "1.0.0"
43 # branch = "master"
44 # revision = "abc123"
45 #
46 ## Optional: specifying an alternate source location as an override will
47 ## enforce that the alternate location is used for that project, regardless of
48 ## what source location any dependent projects specify.
49 # source = "https://github.com/myfork/package.git"
50
51
52
53 [[dependencies]]
54 branch = "master"
55 name = "github.com/google/go-querystring"
56
57 [[dependencies]]
58 branch = "master"
59 name = "github.com/pborman/uuid"
0 Copyright (©) 2014-2016 Timothée Peignier <timothee.peignier@tryphon.org>
1
2 Permission is hereby granted, free of charge, to any person obtaining a copy
3 of this software and associated documentation files (the "Software"), to deal
4 in the Software without restriction, including without limitation the rights
5 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6 copies of the Software, and to permit persons to whom the Software is
7 furnished to do so, subject to the following conditions:
8
9 The above copyright notice and this permission notice shall be included in
10 all copies or substantial portions of the Software.
11
12 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18 THE SOFTWARE.
0 # Heroku Platform API
1
2 [![GoDoc](https://godoc.org/github.com/heroku/heroku-go/v3?status.svg)](https://godoc.org/github.com/heroku/heroku-go/v3)
3
4 An API client interface for Heroku Platform API for the Go (golang) programming language.
5
6 ## Installation
7
8 To download, build, and install the package:
9
10 ```
11 $ go get github.com/heroku/heroku-go/v3
12 ```
13
14 ## Example
15
16 ```go
17 package main
18
19 import (
20 "context"
21 "flag"
22 "fmt"
23 "log"
24
25 "github.com/heroku/heroku-go/v3"
26 )
27
28 var (
29 username = flag.String("username", "", "api username")
30 password = flag.String("password", "", "api password")
31 )
32
33 func main() {
34 log.SetFlags(0)
35 flag.Parse()
36
37 heroku.DefaultTransport.Username = *username
38 heroku.DefaultTransport.Password = *password
39
40 h := heroku.NewService(heroku.DefaultClient)
41 addons, err := h.AddOnList(context.TODO(), &heroku.ListRange{Field: "name"})
42 if err != nil {
43 log.Fatal(err)
44 }
45 for _, addon := range addons {
46 fmt.Println(addon.Name)
47 }
48 }
49 ```
0 #!/usr/bin/env bash
1 set -euo pipefail
2
3 if [ -n "${DEBUG-}" ]; then
4 set -x
5 fi
6
7 cd "$(cd "$(dirname "${BASH_SOURCE[0]}")/.."; pwd)"
8
9 curl -so v3/schema.json https://api.heroku.com/schema \
10 -H "Accept: application/vnd.heroku+json; version=3"
11
12 go get -u github.com/interagent/schematic/cmd/schematic
13 schematic v3/schema.json > v3/heroku.go
14
15 # Heroku's schema.json does not specify a "version" key
16 # Replace Version="" with Version="v3"
17 sed -E -i '' \
18 's/^([[:space:]]*Version[[:space:]]*=[[:space:]]*)""$/\1"v3"/' \
19 v3/heroku.go
20
21 gofmt -w v3/heroku.go
0 // Generated service client for heroku API.
1 //
2 // To be able to interact with this API, you have to
3 // create a new service:
4 //
5 // s := heroku.NewService(nil)
6 //
7 // The Service struct has all the methods you need
8 // to interact with heroku API.
9 //
10 package heroku
11
12 import (
13 "bytes"
14 "context"
15 "encoding/json"
16 "fmt"
17 "github.com/google/go-querystring/query"
18 "io"
19 "net/http"
20 "reflect"
21 "runtime"
22 "strings"
23 "time"
24 )
25
26 const (
27 Version = "v3"
28 DefaultUserAgent = "heroku/" + Version + " (" + runtime.GOOS + "; " + runtime.GOARCH + ")"
29 DefaultURL = "https://api.heroku.com"
30 )
31
32 // Service represents your API.
33 type Service struct {
34 client *http.Client
35 URL string
36 }
37
38 // NewService creates a Service using the given, if none is provided
39 // it uses http.DefaultClient.
40 func NewService(c *http.Client) *Service {
41 if c == nil {
42 c = http.DefaultClient
43 }
44 return &Service{
45 client: c,
46 URL: DefaultURL,
47 }
48 }
49
50 // NewRequest generates an HTTP request, but does not perform the request.
51 func (s *Service) NewRequest(ctx context.Context, method, path string, body interface{}, q interface{}) (*http.Request, error) {
52 var ctype string
53 var rbody io.Reader
54 switch t := body.(type) {
55 case nil:
56 case string:
57 rbody = bytes.NewBufferString(t)
58 case io.Reader:
59 rbody = t
60 default:
61 v := reflect.ValueOf(body)
62 if !v.IsValid() {
63 break
64 }
65 if v.Type().Kind() == reflect.Ptr {
66 v = reflect.Indirect(v)
67 if !v.IsValid() {
68 break
69 }
70 }
71 j, err := json.Marshal(body)
72 if err != nil {
73 return nil, err
74 }
75 rbody = bytes.NewReader(j)
76 ctype = "application/json"
77 }
78 req, err := http.NewRequest(method, s.URL+path, rbody)
79 if err != nil {
80 return nil, err
81 }
82 req = req.WithContext(ctx)
83 if q != nil {
84 v, err := query.Values(q)
85 if err != nil {
86 return nil, err
87 }
88 query := v.Encode()
89 if req.URL.RawQuery != "" && query != "" {
90 req.URL.RawQuery += "&"
91 }
92 req.URL.RawQuery += query
93 }
94 req.Header.Set("Accept", "application/json")
95 req.Header.Set("User-Agent", DefaultUserAgent)
96 if ctype != "" {
97 req.Header.Set("Content-Type", ctype)
98 }
99 return req, nil
100 }
101
102 // Do sends a request and decodes the response into v.
103 func (s *Service) Do(ctx context.Context, v interface{}, method, path string, body interface{}, q interface{}, lr *ListRange) error {
104 req, err := s.NewRequest(ctx, method, path, body, q)
105 if err != nil {
106 return err
107 }
108 if lr != nil {
109 lr.SetHeader(req)
110 }
111 resp, err := s.client.Do(req)
112 if err != nil {
113 return err
114 }
115 defer resp.Body.Close()
116 switch t := v.(type) {
117 case nil:
118 case io.Writer:
119 _, err = io.Copy(t, resp.Body)
120 default:
121 err = json.NewDecoder(resp.Body).Decode(v)
122 }
123 return err
124 }
125
126 // Get sends a GET request and decodes the response into v.
127 func (s *Service) Get(ctx context.Context, v interface{}, path string, query interface{}, lr *ListRange) error {
128 return s.Do(ctx, v, "GET", path, nil, query, lr)
129 }
130
131 // Patch sends a Path request and decodes the response into v.
132 func (s *Service) Patch(ctx context.Context, v interface{}, path string, body interface{}) error {
133 return s.Do(ctx, v, "PATCH", path, body, nil, nil)
134 }
135
136 // Post sends a POST request and decodes the response into v.
137 func (s *Service) Post(ctx context.Context, v interface{}, path string, body interface{}) error {
138 return s.Do(ctx, v, "POST", path, body, nil, nil)
139 }
140
141 // Put sends a PUT request and decodes the response into v.
142 func (s *Service) Put(ctx context.Context, v interface{}, path string, body interface{}) error {
143 return s.Do(ctx, v, "PUT", path, body, nil, nil)
144 }
145
146 // Delete sends a DELETE request.
147 func (s *Service) Delete(ctx context.Context, v interface{}, path string) error {
148 return s.Do(ctx, v, "DELETE", path, nil, nil, nil)
149 }
150
151 // ListRange describes a range.
152 type ListRange struct {
153 Field string
154 Max int
155 Descending bool
156 FirstID string
157 LastID string
158 }
159
160 // SetHeader set headers on the given Request.
161 func (lr *ListRange) SetHeader(req *http.Request) {
162 var hdrval string
163 if lr.Field != "" {
164 hdrval += lr.Field + " "
165 }
166 hdrval += lr.FirstID + ".." + lr.LastID
167 params := make([]string, 0, 2)
168 if lr.Max != 0 {
169 params = append(params, fmt.Sprintf("max=%d", lr.Max))
170 }
171 if lr.Descending {
172 params = append(params, "order=desc")
173 }
174 if len(params) > 0 {
175 hdrval += fmt.Sprintf("; %s", strings.Join(params, ","))
176 }
177 req.Header.Set("Range", hdrval)
178 return
179 }
180
181 // Bool allocates a new int value returns a pointer to it.
182 func Bool(v bool) *bool {
183 p := new(bool)
184 *p = v
185 return p
186 }
187
188 // Int allocates a new int value returns a pointer to it.
189 func Int(v int) *int {
190 p := new(int)
191 *p = v
192 return p
193 }
194
195 // Float64 allocates a new float64 value returns a pointer to it.
196 func Float64(v float64) *float64 {
197 p := new(float64)
198 *p = v
199 return p
200 }
201
202 // String allocates a new string value returns a pointer to it.
203 func String(v string) *string {
204 p := new(string)
205 *p = v
206 return p
207 }
208
209 // An account represents an individual signed up to use the Heroku
210 // platform.
211 type Account struct {
212 AllowTracking bool `json:"allow_tracking" url:"allow_tracking,key"` // whether to allow third party web activity tracking
213 Beta bool `json:"beta" url:"beta,key"` // whether allowed to utilize beta Heroku features
214 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when account was created
215 DefaultOrganization *struct {
216 ID string `json:"id" url:"id,key"` // unique identifier of organization
217 Name string `json:"name" url:"name,key"` // unique name of organization
218 } `json:"default_organization" url:"default_organization,key"` // organization selected by default
219 DelinquentAt *time.Time `json:"delinquent_at" url:"delinquent_at,key"` // when account became delinquent
220 Email string `json:"email" url:"email,key"` // unique email address of account
221 Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider
222 ID string `json:"id" url:"id,key"` // unique identifier of an account
223 IdentityProvider *struct {
224 ID string `json:"id" url:"id,key"` // unique identifier of this identity provider
225 Organization struct {
226 Name string `json:"name" url:"name,key"` // unique name of organization
227 } `json:"organization" url:"organization,key"`
228 Owner struct {
229 ID string `json:"id" url:"id,key"` // unique identifier of the owner
230 Name string `json:"name" url:"name,key"` // name of the owner
231 Type string `json:"type" url:"type,key"` // type of the owner
232 } `json:"owner" url:"owner,key"` // entity that owns this identity provider
233 } `json:"identity_provider" url:"identity_provider,key"` // Identity Provider details for federated users.
234 LastLogin *time.Time `json:"last_login" url:"last_login,key"` // when account last authorized with Heroku
235 Name *string `json:"name" url:"name,key"` // full name of the account owner
236 SmsNumber *string `json:"sms_number" url:"sms_number,key"` // SMS number of account
237 SuspendedAt *time.Time `json:"suspended_at" url:"suspended_at,key"` // when account was suspended
238 TwoFactorAuthentication bool `json:"two_factor_authentication" url:"two_factor_authentication,key"` // whether two-factor auth is enabled on the account
239 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when account was updated
240 Verified bool `json:"verified" url:"verified,key"` // whether account has been verified with billing information
241 }
242
243 // Info for account.
244 func (s *Service) AccountInfo(ctx context.Context) (*Account, error) {
245 var account Account
246 return &account, s.Get(ctx, &account, fmt.Sprintf("/account"), nil, nil)
247 }
248
249 type AccountUpdateOpts struct {
250 AllowTracking *bool `json:"allow_tracking,omitempty" url:"allow_tracking,omitempty,key"` // whether to allow third party web activity tracking
251 Beta *bool `json:"beta,omitempty" url:"beta,omitempty,key"` // whether allowed to utilize beta Heroku features
252 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // full name of the account owner
253 }
254
255 // Update account.
256 func (s *Service) AccountUpdate(ctx context.Context, o AccountUpdateOpts) (*Account, error) {
257 var account Account
258 return &account, s.Patch(ctx, &account, fmt.Sprintf("/account"), o)
259 }
260
261 // Delete account. Note that this action cannot be undone.
262 func (s *Service) AccountDelete(ctx context.Context) (*Account, error) {
263 var account Account
264 return &account, s.Delete(ctx, &account, fmt.Sprintf("/account"))
265 }
266
267 // Info for account.
268 func (s *Service) AccountInfoByUser(ctx context.Context, accountIdentity string) (*Account, error) {
269 var account Account
270 return &account, s.Get(ctx, &account, fmt.Sprintf("/users/%v", accountIdentity), nil, nil)
271 }
272
273 type AccountUpdateByUserOpts struct {
274 AllowTracking *bool `json:"allow_tracking,omitempty" url:"allow_tracking,omitempty,key"` // whether to allow third party web activity tracking
275 Beta *bool `json:"beta,omitempty" url:"beta,omitempty,key"` // whether allowed to utilize beta Heroku features
276 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // full name of the account owner
277 }
278
279 // Update account.
280 func (s *Service) AccountUpdateByUser(ctx context.Context, accountIdentity string, o AccountUpdateByUserOpts) (*Account, error) {
281 var account Account
282 return &account, s.Patch(ctx, &account, fmt.Sprintf("/users/%v", accountIdentity), o)
283 }
284
285 // Delete account. Note that this action cannot be undone.
286 func (s *Service) AccountDeleteByUser(ctx context.Context, accountIdentity string) (*Account, error) {
287 var account Account
288 return &account, s.Delete(ctx, &account, fmt.Sprintf("/users/%v", accountIdentity))
289 }
290
291 // An account feature represents a Heroku labs capability that can be
292 // enabled or disabled for an account on Heroku.
293 type AccountFeature struct {
294 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when account feature was created
295 Description string `json:"description" url:"description,key"` // description of account feature
296 DisplayName string `json:"display_name" url:"display_name,key"` // user readable feature name
297 DocURL string `json:"doc_url" url:"doc_url,key"` // documentation URL of account feature
298 Enabled bool `json:"enabled" url:"enabled,key"` // whether or not account feature has been enabled
299 FeedbackEmail string `json:"feedback_email" url:"feedback_email,key"` // e-mail to send feedback about the feature
300 ID string `json:"id" url:"id,key"` // unique identifier of account feature
301 Name string `json:"name" url:"name,key"` // unique name of account feature
302 State string `json:"state" url:"state,key"` // state of account feature
303 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when account feature was updated
304 }
305
306 // Info for an existing account feature.
307 func (s *Service) AccountFeatureInfo(ctx context.Context, accountFeatureIdentity string) (*AccountFeature, error) {
308 var accountFeature AccountFeature
309 return &accountFeature, s.Get(ctx, &accountFeature, fmt.Sprintf("/account/features/%v", accountFeatureIdentity), nil, nil)
310 }
311
312 type AccountFeatureListResult []AccountFeature
313
314 // List existing account features.
315 func (s *Service) AccountFeatureList(ctx context.Context, lr *ListRange) (AccountFeatureListResult, error) {
316 var accountFeature AccountFeatureListResult
317 return accountFeature, s.Get(ctx, &accountFeature, fmt.Sprintf("/account/features"), nil, lr)
318 }
319
320 type AccountFeatureUpdateOpts struct {
321 Enabled bool `json:"enabled" url:"enabled,key"` // whether or not account feature has been enabled
322 }
323
324 // Update an existing account feature.
325 func (s *Service) AccountFeatureUpdate(ctx context.Context, accountFeatureIdentity string, o AccountFeatureUpdateOpts) (*AccountFeature, error) {
326 var accountFeature AccountFeature
327 return &accountFeature, s.Patch(ctx, &accountFeature, fmt.Sprintf("/account/features/%v", accountFeatureIdentity), o)
328 }
329
330 // Add-ons represent add-ons that have been provisioned and attached to
331 // one or more apps.
332 type AddOn struct {
333 Actions []struct{} `json:"actions" url:"actions,key"` // provider actions for this specific add-on
334 AddonService struct {
335 ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service
336 Name string `json:"name" url:"name,key"` // unique name of this add-on-service
337 } `json:"addon_service" url:"addon_service,key"` // identity of add-on service
338 App struct {
339 ID string `json:"id" url:"id,key"` // unique identifier of app
340 Name string `json:"name" url:"name,key"` // unique name of app
341 } `json:"app" url:"app,key"` // billing application associated with this add-on
342 BilledPrice *struct {
343 Cents int `json:"cents" url:"cents,key"` // price in cents per unit of plan
344 Contract bool `json:"contract" url:"contract,key"` // price is negotiated in a contract outside of monthly add-on billing
345 Unit string `json:"unit" url:"unit,key"` // unit of price for plan
346 } `json:"billed_price" url:"billed_price,key"` // billed price
347 BillingEntity struct {
348 ID string `json:"id" url:"id,key"` // unique identifier of the billing entity
349 Name string `json:"name" url:"name,key"` // name of the billing entity
350 Type string `json:"type" url:"type,key"` // type of Object of the billing entity; new types allowed at any time.
351 } `json:"billing_entity" url:"billing_entity,key"` // billing entity associated with this add-on
352 ConfigVars []string `json:"config_vars" url:"config_vars,key"` // config vars exposed to the owning app by this add-on
353 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on was created
354 ID string `json:"id" url:"id,key"` // unique identifier of add-on
355 Name string `json:"name" url:"name,key"` // globally unique name of the add-on
356 Plan struct {
357 ID string `json:"id" url:"id,key"` // unique identifier of this plan
358 Name string `json:"name" url:"name,key"` // unique name of this plan
359 } `json:"plan" url:"plan,key"` // identity of add-on plan
360 ProviderID string `json:"provider_id" url:"provider_id,key"` // id of this add-on with its provider
361 State string `json:"state" url:"state,key"` // state in the add-on's lifecycle
362 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on was updated
363 WebURL *string `json:"web_url" url:"web_url,key"` // URL for logging into web interface of add-on (e.g. a dashboard)
364 }
365 type AddOnListResult []AddOn
366
367 // List all existing add-ons.
368 func (s *Service) AddOnList(ctx context.Context, lr *ListRange) (AddOnListResult, error) {
369 var addOn AddOnListResult
370 return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/addons"), nil, lr)
371 }
372
373 // Info for an existing add-on.
374 func (s *Service) AddOnInfo(ctx context.Context, addOnIdentity string) (*AddOn, error) {
375 var addOn AddOn
376 return &addOn, s.Get(ctx, &addOn, fmt.Sprintf("/addons/%v", addOnIdentity), nil, nil)
377 }
378
379 type AddOnCreateOpts struct {
380 Attachment *struct {
381 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name for this add-on attachment to this app
382 } `json:"attachment,omitempty" url:"attachment,omitempty,key"` // name for add-on's initial attachment
383 Config map[string]string `json:"config,omitempty" url:"config,omitempty,key"` // custom add-on provisioning options
384 Confirm *string `json:"confirm,omitempty" url:"confirm,omitempty,key"` // name of billing entity for confirmation
385 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // globally unique name of the add-on
386 Plan string `json:"plan" url:"plan,key"` // unique identifier of this plan
387 }
388
389 // Create a new add-on.
390 func (s *Service) AddOnCreate(ctx context.Context, appIdentity string, o AddOnCreateOpts) (*AddOn, error) {
391 var addOn AddOn
392 return &addOn, s.Post(ctx, &addOn, fmt.Sprintf("/apps/%v/addons", appIdentity), o)
393 }
394
395 // Delete an existing add-on.
396 func (s *Service) AddOnDelete(ctx context.Context, appIdentity string, addOnIdentity string) (*AddOn, error) {
397 var addOn AddOn
398 return &addOn, s.Delete(ctx, &addOn, fmt.Sprintf("/apps/%v/addons/%v", appIdentity, addOnIdentity))
399 }
400
401 // Info for an existing add-on.
402 func (s *Service) AddOnInfoByApp(ctx context.Context, appIdentity string, addOnIdentity string) (*AddOn, error) {
403 var addOn AddOn
404 return &addOn, s.Get(ctx, &addOn, fmt.Sprintf("/apps/%v/addons/%v", appIdentity, addOnIdentity), nil, nil)
405 }
406
407 type AddOnListByAppResult []AddOn
408
409 // List existing add-ons for an app.
410 func (s *Service) AddOnListByApp(ctx context.Context, appIdentity string, lr *ListRange) (AddOnListByAppResult, error) {
411 var addOn AddOnListByAppResult
412 return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/apps/%v/addons", appIdentity), nil, lr)
413 }
414
415 type AddOnUpdateOpts struct {
416 Plan string `json:"plan" url:"plan,key"` // unique identifier of this plan
417 }
418
419 // Change add-on plan. Some add-ons may not support changing plans. In
420 // that case, an error will be returned.
421 func (s *Service) AddOnUpdate(ctx context.Context, appIdentity string, addOnIdentity string, o AddOnUpdateOpts) (*AddOn, error) {
422 var addOn AddOn
423 return &addOn, s.Patch(ctx, &addOn, fmt.Sprintf("/apps/%v/addons/%v", appIdentity, addOnIdentity), o)
424 }
425
426 type AddOnListByUserResult []AddOn
427
428 // List all existing add-ons a user has access to
429 func (s *Service) AddOnListByUser(ctx context.Context, accountIdentity string, lr *ListRange) (AddOnListByUserResult, error) {
430 var addOn AddOnListByUserResult
431 return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/users/%v/addons", accountIdentity), nil, lr)
432 }
433
434 type AddOnListByTeamResult []AddOn
435
436 // List add-ons used across all Team apps
437 func (s *Service) AddOnListByTeam(ctx context.Context, teamIdentity string, lr *ListRange) (AddOnListByTeamResult, error) {
438 var addOn AddOnListByTeamResult
439 return addOn, s.Get(ctx, &addOn, fmt.Sprintf("/teams/%v/addons", teamIdentity), nil, lr)
440 }
441
442 type AddOnResolutionOpts struct {
443 Addon string `json:"addon" url:"addon,key"` // globally unique name of the add-on
444 AddonService *string `json:"addon_service,omitempty" url:"addon_service,omitempty,key"` // unique name of this add-on-service
445 App *string `json:"app,omitempty" url:"app,omitempty,key"` // unique name of app
446 }
447 type AddOnResolutionResult []AddOn
448
449 // Resolve an add-on from a name, optionally passing an app name. If
450 // there are matches it returns at least one add-on (exact match) or
451 // many.
452 func (s *Service) AddOnResolution(ctx context.Context, o AddOnResolutionOpts) (AddOnResolutionResult, error) {
453 var addOn AddOnResolutionResult
454 return addOn, s.Post(ctx, &addOn, fmt.Sprintf("/actions/addons/resolve"), o)
455 }
456
457 // Add-on Actions are lifecycle operations for add-on provisioning and
458 // deprovisioning. They allow whitelisted add-on providers to
459 // (de)provision add-ons in the background and then report back when
460 // (de)provisioning is complete.
461 type AddOnAction struct{}
462 type AddOnActionProvisionResult struct {
463 Actions []struct{} `json:"actions" url:"actions,key"` // provider actions for this specific add-on
464 AddonService struct {
465 ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service
466 Name string `json:"name" url:"name,key"` // unique name of this add-on-service
467 } `json:"addon_service" url:"addon_service,key"` // identity of add-on service
468 App struct {
469 ID string `json:"id" url:"id,key"` // unique identifier of app
470 Name string `json:"name" url:"name,key"` // unique name of app
471 } `json:"app" url:"app,key"` // billing application associated with this add-on
472 BilledPrice *struct {
473 Cents int `json:"cents" url:"cents,key"` // price in cents per unit of plan
474 Contract bool `json:"contract" url:"contract,key"` // price is negotiated in a contract outside of monthly add-on billing
475 Unit string `json:"unit" url:"unit,key"` // unit of price for plan
476 } `json:"billed_price" url:"billed_price,key"` // billed price
477 BillingEntity struct {
478 ID string `json:"id" url:"id,key"` // unique identifier of the billing entity
479 Name string `json:"name" url:"name,key"` // name of the billing entity
480 Type string `json:"type" url:"type,key"` // type of Object of the billing entity; new types allowed at any time.
481 } `json:"billing_entity" url:"billing_entity,key"` // billing entity associated with this add-on
482 ConfigVars []string `json:"config_vars" url:"config_vars,key"` // config vars exposed to the owning app by this add-on
483 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on was created
484 ID string `json:"id" url:"id,key"` // unique identifier of add-on
485 Name string `json:"name" url:"name,key"` // globally unique name of the add-on
486 Plan struct {
487 ID string `json:"id" url:"id,key"` // unique identifier of this plan
488 Name string `json:"name" url:"name,key"` // unique name of this plan
489 } `json:"plan" url:"plan,key"` // identity of add-on plan
490 ProviderID string `json:"provider_id" url:"provider_id,key"` // id of this add-on with its provider
491 State string `json:"state" url:"state,key"` // state in the add-on's lifecycle
492 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on was updated
493 WebURL *string `json:"web_url" url:"web_url,key"` // URL for logging into web interface of add-on (e.g. a dashboard)
494 }
495
496 // Mark an add-on as provisioned for use.
497 func (s *Service) AddOnActionProvision(ctx context.Context, addOnIdentity string) (*AddOnActionProvisionResult, error) {
498 var addOnAction AddOnActionProvisionResult
499 return &addOnAction, s.Post(ctx, &addOnAction, fmt.Sprintf("/addons/%v/actions/provision", addOnIdentity), nil)
500 }
501
502 type AddOnActionDeprovisionResult struct {
503 Actions []struct{} `json:"actions" url:"actions,key"` // provider actions for this specific add-on
504 AddonService struct {
505 ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service
506 Name string `json:"name" url:"name,key"` // unique name of this add-on-service
507 } `json:"addon_service" url:"addon_service,key"` // identity of add-on service
508 App struct {
509 ID string `json:"id" url:"id,key"` // unique identifier of app
510 Name string `json:"name" url:"name,key"` // unique name of app
511 } `json:"app" url:"app,key"` // billing application associated with this add-on
512 BilledPrice *struct {
513 Cents int `json:"cents" url:"cents,key"` // price in cents per unit of plan
514 Contract bool `json:"contract" url:"contract,key"` // price is negotiated in a contract outside of monthly add-on billing
515 Unit string `json:"unit" url:"unit,key"` // unit of price for plan
516 } `json:"billed_price" url:"billed_price,key"` // billed price
517 BillingEntity struct {
518 ID string `json:"id" url:"id,key"` // unique identifier of the billing entity
519 Name string `json:"name" url:"name,key"` // name of the billing entity
520 Type string `json:"type" url:"type,key"` // type of Object of the billing entity; new types allowed at any time.
521 } `json:"billing_entity" url:"billing_entity,key"` // billing entity associated with this add-on
522 ConfigVars []string `json:"config_vars" url:"config_vars,key"` // config vars exposed to the owning app by this add-on
523 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on was created
524 ID string `json:"id" url:"id,key"` // unique identifier of add-on
525 Name string `json:"name" url:"name,key"` // globally unique name of the add-on
526 Plan struct {
527 ID string `json:"id" url:"id,key"` // unique identifier of this plan
528 Name string `json:"name" url:"name,key"` // unique name of this plan
529 } `json:"plan" url:"plan,key"` // identity of add-on plan
530 ProviderID string `json:"provider_id" url:"provider_id,key"` // id of this add-on with its provider
531 State string `json:"state" url:"state,key"` // state in the add-on's lifecycle
532 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on was updated
533 WebURL *string `json:"web_url" url:"web_url,key"` // URL for logging into web interface of add-on (e.g. a dashboard)
534 }
535
536 // Mark an add-on as deprovisioned.
537 func (s *Service) AddOnActionDeprovision(ctx context.Context, addOnIdentity string) (*AddOnActionDeprovisionResult, error) {
538 var addOnAction AddOnActionDeprovisionResult
539 return &addOnAction, s.Post(ctx, &addOnAction, fmt.Sprintf("/addons/%v/actions/deprovision", addOnIdentity), nil)
540 }
541
542 // An add-on attachment represents a connection between an app and an
543 // add-on that it has been given access to.
544 type AddOnAttachment struct {
545 Addon struct {
546 App struct {
547 ID string `json:"id" url:"id,key"` // unique identifier of app
548 Name string `json:"name" url:"name,key"` // unique name of app
549 } `json:"app" url:"app,key"` // billing application associated with this add-on
550 ID string `json:"id" url:"id,key"` // unique identifier of add-on
551 Name string `json:"name" url:"name,key"` // globally unique name of the add-on
552 } `json:"addon" url:"addon,key"` // identity of add-on
553 App struct {
554 ID string `json:"id" url:"id,key"` // unique identifier of app
555 Name string `json:"name" url:"name,key"` // unique name of app
556 } `json:"app" url:"app,key"` // application that is attached to add-on
557 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on attachment was created
558 ID string `json:"id" url:"id,key"` // unique identifier of this add-on attachment
559 LogInputURL *string `json:"log_input_url" url:"log_input_url,key"` // URL for add-on partners to write to an add-on's logs
560 Name string `json:"name" url:"name,key"` // unique name for this add-on attachment to this app
561 Namespace *string `json:"namespace" url:"namespace,key"` // attachment namespace
562 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on attachment was updated
563 WebURL *string `json:"web_url" url:"web_url,key"` // URL for logging into web interface of add-on in attached app context
564 }
565 type AddOnAttachmentCreateOpts struct {
566 Addon string `json:"addon" url:"addon,key"` // unique identifier of add-on
567 App string `json:"app" url:"app,key"` // unique identifier of app
568 Confirm *string `json:"confirm,omitempty" url:"confirm,omitempty,key"` // name of owning app for confirmation
569 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name for this add-on attachment to this app
570 Namespace *string `json:"namespace,omitempty" url:"namespace,omitempty,key"` // attachment namespace
571 }
572
573 // Create a new add-on attachment.
574 func (s *Service) AddOnAttachmentCreate(ctx context.Context, o AddOnAttachmentCreateOpts) (*AddOnAttachment, error) {
575 var addOnAttachment AddOnAttachment
576 return &addOnAttachment, s.Post(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments"), o)
577 }
578
579 // Delete an existing add-on attachment.
580 func (s *Service) AddOnAttachmentDelete(ctx context.Context, addOnAttachmentIdentity string) (*AddOnAttachment, error) {
581 var addOnAttachment AddOnAttachment
582 return &addOnAttachment, s.Delete(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments/%v", addOnAttachmentIdentity))
583 }
584
585 // Info for existing add-on attachment.
586 func (s *Service) AddOnAttachmentInfo(ctx context.Context, addOnAttachmentIdentity string) (*AddOnAttachment, error) {
587 var addOnAttachment AddOnAttachment
588 return &addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments/%v", addOnAttachmentIdentity), nil, nil)
589 }
590
591 type AddOnAttachmentListResult []AddOnAttachment
592
593 // List existing add-on attachments.
594 func (s *Service) AddOnAttachmentList(ctx context.Context, lr *ListRange) (AddOnAttachmentListResult, error) {
595 var addOnAttachment AddOnAttachmentListResult
596 return addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/addon-attachments"), nil, lr)
597 }
598
599 type AddOnAttachmentListByAddOnResult []AddOnAttachment
600
601 // List existing add-on attachments for an add-on.
602 func (s *Service) AddOnAttachmentListByAddOn(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnAttachmentListByAddOnResult, error) {
603 var addOnAttachment AddOnAttachmentListByAddOnResult
604 return addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/addons/%v/addon-attachments", addOnIdentity), nil, lr)
605 }
606
607 type AddOnAttachmentListByAppResult []AddOnAttachment
608
609 // List existing add-on attachments for an app.
610 func (s *Service) AddOnAttachmentListByApp(ctx context.Context, appIdentity string, lr *ListRange) (AddOnAttachmentListByAppResult, error) {
611 var addOnAttachment AddOnAttachmentListByAppResult
612 return addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/apps/%v/addon-attachments", appIdentity), nil, lr)
613 }
614
615 // Info for existing add-on attachment for an app.
616 func (s *Service) AddOnAttachmentInfoByApp(ctx context.Context, appIdentity string, addOnAttachmentScopedIdentity string) (*AddOnAttachment, error) {
617 var addOnAttachment AddOnAttachment
618 return &addOnAttachment, s.Get(ctx, &addOnAttachment, fmt.Sprintf("/apps/%v/addon-attachments/%v", appIdentity, addOnAttachmentScopedIdentity), nil, nil)
619 }
620
621 type AddOnAttachmentResolutionOpts struct {
622 AddonAttachment string `json:"addon_attachment" url:"addon_attachment,key"` // unique name for this add-on attachment to this app
623 AddonService *string `json:"addon_service,omitempty" url:"addon_service,omitempty,key"` // unique name of this add-on-service
624 App *string `json:"app,omitempty" url:"app,omitempty,key"` // unique name of app
625 }
626 type AddOnAttachmentResolutionResult []AddOnAttachment
627
628 // Resolve an add-on attachment from a name, optionally passing an app
629 // name. If there are matches it returns at least one add-on attachment
630 // (exact match) or many.
631 func (s *Service) AddOnAttachmentResolution(ctx context.Context, o AddOnAttachmentResolutionOpts) (AddOnAttachmentResolutionResult, error) {
632 var addOnAttachment AddOnAttachmentResolutionResult
633 return addOnAttachment, s.Post(ctx, &addOnAttachment, fmt.Sprintf("/actions/addon-attachments/resolve"), o)
634 }
635
636 // Configuration of an Add-on
637 type AddOnConfig struct {
638 Name string `json:"name" url:"name,key"` // unique name of the config
639 Value *string `json:"value" url:"value,key"` // value of the config
640 }
641 type AddOnConfigListResult []AddOnConfig
642
643 // Get an add-on's config. Accessible by customers with access and by
644 // the add-on partner providing this add-on.
645 func (s *Service) AddOnConfigList(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnConfigListResult, error) {
646 var addOnConfig AddOnConfigListResult
647 return addOnConfig, s.Get(ctx, &addOnConfig, fmt.Sprintf("/addons/%v/config", addOnIdentity), nil, lr)
648 }
649
650 type AddOnConfigUpdateOpts struct {
651 Config []*struct {
652 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of the config
653 Value *string `json:"value,omitempty" url:"value,omitempty,key"` // value of the config
654 } `json:"config,omitempty" url:"config,omitempty,key"`
655 }
656 type AddOnConfigUpdateResult []AddOnConfig
657
658 // Update an add-on's config. Can only be accessed by the add-on partner
659 // providing this add-on.
660 func (s *Service) AddOnConfigUpdate(ctx context.Context, addOnIdentity string, o AddOnConfigUpdateOpts) (AddOnConfigUpdateResult, error) {
661 var addOnConfig AddOnConfigUpdateResult
662 return addOnConfig, s.Patch(ctx, &addOnConfig, fmt.Sprintf("/addons/%v/config", addOnIdentity), o)
663 }
664
665 // Add-on Plan Actions are Provider functionality for specific add-on
666 // installations
667 type AddOnPlanAction struct {
668 Action string `json:"action" url:"action,key"` // identifier of the action to take that is sent via SSO
669 ID string `json:"id" url:"id,key"` // a unique identifier
670 Label string `json:"label" url:"label,key"` // the display text shown in Dashboard
671 RequiresOwner bool `json:"requires_owner" url:"requires_owner,key"` // if the action requires the user to own the app
672 URL string `json:"url" url:"url,key"` // absolute URL to use instead of an action
673 }
674
675 // Add-on region capabilities represent the relationship between an
676 // Add-on Service and a specific Region. Only Beta and GA add-ons are
677 // returned by these endpoints.
678 type AddOnRegionCapability struct {
679 AddonService struct {
680 CliPluginName *string `json:"cli_plugin_name" url:"cli_plugin_name,key"` // npm package name of the add-on service's Heroku CLI plugin
681 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on-service was created
682 HumanName string `json:"human_name" url:"human_name,key"` // human-readable name of the add-on service provider
683 ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service
684 Name string `json:"name" url:"name,key"` // unique name of this add-on-service
685 State string `json:"state" url:"state,key"` // release status for add-on service
686 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
687 // add-on at the same time
688 SupportsSharing bool `json:"supports_sharing" url:"supports_sharing,key"` // whether or not apps can have access to add-ons billed to a different
689 // app
690 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on-service was updated
691 } `json:"addon_service" url:"addon_service,key"` // Add-on services represent add-ons that may be provisioned for apps.
692 // Endpoints under add-on services can be accessed without
693 // authentication.
694 ID string `json:"id" url:"id,key"` // unique identifier of this add-on-region-capability
695 Region struct {
696 Country string `json:"country" url:"country,key"` // country where the region exists
697 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when region was created
698 Description string `json:"description" url:"description,key"` // description of region
699 ID string `json:"id" url:"id,key"` // unique identifier of region
700 Locale string `json:"locale" url:"locale,key"` // area in the country where the region exists
701 Name string `json:"name" url:"name,key"` // unique name of region
702 PrivateCapable bool `json:"private_capable" url:"private_capable,key"` // whether or not region is available for creating a Private Space
703 Provider struct {
704 Name string `json:"name" url:"name,key"` // name of provider
705 Region string `json:"region" url:"region,key"` // region name used by provider
706 } `json:"provider" url:"provider,key"` // provider of underlying substrate
707 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when region was updated
708 } `json:"region" url:"region,key"` // A region represents a geographic location in which your application
709 // may run.
710 SupportsPrivateNetworking bool `json:"supports_private_networking" url:"supports_private_networking,key"` // whether the add-on can be installed to a Space
711 }
712 type AddOnRegionCapabilityListResult []AddOnRegionCapability
713
714 // List all existing add-on region capabilities.
715 func (s *Service) AddOnRegionCapabilityList(ctx context.Context, lr *ListRange) (AddOnRegionCapabilityListResult, error) {
716 var addOnRegionCapability AddOnRegionCapabilityListResult
717 return addOnRegionCapability, s.Get(ctx, &addOnRegionCapability, fmt.Sprintf("/addon-region-capabilities"), nil, lr)
718 }
719
720 type AddOnRegionCapabilityListByAddOnServiceResult []AddOnRegionCapability
721
722 // List existing add-on region capabilities for an add-on-service
723 func (s *Service) AddOnRegionCapabilityListByAddOnService(ctx context.Context, addOnServiceIdentity string, lr *ListRange) (AddOnRegionCapabilityListByAddOnServiceResult, error) {
724 var addOnRegionCapability AddOnRegionCapabilityListByAddOnServiceResult
725 return addOnRegionCapability, s.Get(ctx, &addOnRegionCapability, fmt.Sprintf("/addon-services/%v/region-capabilities", addOnServiceIdentity), nil, lr)
726 }
727
728 type AddOnRegionCapabilityListByRegionResult []AddOnRegionCapability
729
730 // List existing add-on region capabilities for a region.
731 func (s *Service) AddOnRegionCapabilityListByRegion(ctx context.Context, regionIdentity string, lr *ListRange) (AddOnRegionCapabilityListByRegionResult, error) {
732 var addOnRegionCapability AddOnRegionCapabilityListByRegionResult
733 return addOnRegionCapability, s.Get(ctx, &addOnRegionCapability, fmt.Sprintf("/regions/%v/addon-region-capabilities", regionIdentity), nil, lr)
734 }
735
736 // Add-on services represent add-ons that may be provisioned for apps.
737 // Endpoints under add-on services can be accessed without
738 // authentication.
739 type AddOnService struct {
740 CliPluginName *string `json:"cli_plugin_name" url:"cli_plugin_name,key"` // npm package name of the add-on service's Heroku CLI plugin
741 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on-service was created
742 HumanName string `json:"human_name" url:"human_name,key"` // human-readable name of the add-on service provider
743 ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service
744 Name string `json:"name" url:"name,key"` // unique name of this add-on-service
745 State string `json:"state" url:"state,key"` // release status for add-on service
746 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
747 // add-on at the same time
748 SupportsSharing bool `json:"supports_sharing" url:"supports_sharing,key"` // whether or not apps can have access to add-ons billed to a different
749 // app
750 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on-service was updated
751 }
752
753 // Info for existing add-on-service.
754 func (s *Service) AddOnServiceInfo(ctx context.Context, addOnServiceIdentity string) (*AddOnService, error) {
755 var addOnService AddOnService
756 return &addOnService, s.Get(ctx, &addOnService, fmt.Sprintf("/addon-services/%v", addOnServiceIdentity), nil, nil)
757 }
758
759 type AddOnServiceListResult []AddOnService
760
761 // List existing add-on-services.
762 func (s *Service) AddOnServiceList(ctx context.Context, lr *ListRange) (AddOnServiceListResult, error) {
763 var addOnService AddOnServiceListResult
764 return addOnService, s.Get(ctx, &addOnService, fmt.Sprintf("/addon-services"), nil, lr)
765 }
766
767 // Represents the details of a webhook subscription
768 type AddOnWebhook struct {
769 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created
770 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
771 Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for
772 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
773 // If `sync`, Heroku attempts multiple deliveries until the request is
774 // successful or a limit is reached
775 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated
776 URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent
777 }
778 type AddOnWebhookCreateOpts struct {
779 Authorization *string `json:"authorization,omitempty" url:"authorization,omitempty,key"` // a custom `Authorization` header that Heroku will include with all
780 // webhook notifications
781 Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for
782 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
783 // If `sync`, Heroku attempts multiple deliveries until the request is
784 // successful or a limit is reached
785 Secret *string `json:"secret,omitempty" url:"secret,omitempty,key"` // a value that Heroku will use to sign all webhook notification
786 // requests (the signature is included in the request’s
787 // `Heroku-Webhook-Hmac-SHA256` header)
788 URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent
789 }
790 type AddOnWebhookCreateResult struct {
791 Addon struct {
792 ID string `json:"id" url:"id,key"` // unique identifier of add-on
793 Name string `json:"name" url:"name,key"` // globally unique name of the add-on
794 } `json:"addon" url:"addon,key"` // identity of add-on. Only used for add-on partner webhooks.
795 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created
796 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
797 Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for
798 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
799 // If `sync`, Heroku attempts multiple deliveries until the request is
800 // successful or a limit is reached
801 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated
802 URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent
803 }
804
805 // Create an add-on webhook subscription. Can only be accessed by the
806 // add-on partner providing this add-on.
807 func (s *Service) AddOnWebhookCreate(ctx context.Context, addOnIdentity string, o AddOnWebhookCreateOpts) (*AddOnWebhookCreateResult, error) {
808 var addOnWebhook AddOnWebhookCreateResult
809 return &addOnWebhook, s.Post(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks", addOnIdentity), o)
810 }
811
812 type AddOnWebhookDeleteResult struct {
813 Addon struct {
814 ID string `json:"id" url:"id,key"` // unique identifier of add-on
815 Name string `json:"name" url:"name,key"` // globally unique name of the add-on
816 } `json:"addon" url:"addon,key"` // identity of add-on. Only used for add-on partner webhooks.
817 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created
818 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
819 Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for
820 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
821 // If `sync`, Heroku attempts multiple deliveries until the request is
822 // successful or a limit is reached
823 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated
824 URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent
825 }
826
827 // Removes an add-on webhook subscription. Can only be accessed by the
828 // add-on partner providing this add-on.
829 func (s *Service) AddOnWebhookDelete(ctx context.Context, addOnIdentity string, appWebhookIdentity string) (*AddOnWebhookDeleteResult, error) {
830 var addOnWebhook AddOnWebhookDeleteResult
831 return &addOnWebhook, s.Delete(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks/%v", addOnIdentity, appWebhookIdentity))
832 }
833
834 type AddOnWebhookInfoResult struct {
835 Addon struct {
836 ID string `json:"id" url:"id,key"` // unique identifier of add-on
837 Name string `json:"name" url:"name,key"` // globally unique name of the add-on
838 } `json:"addon" url:"addon,key"` // identity of add-on. Only used for add-on partner webhooks.
839 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created
840 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
841 Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for
842 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
843 // If `sync`, Heroku attempts multiple deliveries until the request is
844 // successful or a limit is reached
845 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated
846 URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent
847 }
848
849 // Returns the info for an add-on webhook subscription. Can only be
850 // accessed by the add-on partner providing this add-on.
851 func (s *Service) AddOnWebhookInfo(ctx context.Context, addOnIdentity string, appWebhookIdentity string) (*AddOnWebhookInfoResult, error) {
852 var addOnWebhook AddOnWebhookInfoResult
853 return &addOnWebhook, s.Get(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks/%v", addOnIdentity, appWebhookIdentity), nil, nil)
854 }
855
856 type AddOnWebhookListResult []struct {
857 Addon struct {
858 ID string `json:"id" url:"id,key"` // unique identifier of add-on
859 Name string `json:"name" url:"name,key"` // globally unique name of the add-on
860 } `json:"addon" url:"addon,key"` // identity of add-on. Only used for add-on partner webhooks.
861 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created
862 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
863 Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for
864 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
865 // If `sync`, Heroku attempts multiple deliveries until the request is
866 // successful or a limit is reached
867 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated
868 URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent
869 }
870
871 // List all webhook subscriptions for a particular add-on. Can only be
872 // accessed by the add-on partner providing this add-on.
873 func (s *Service) AddOnWebhookList(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnWebhookListResult, error) {
874 var addOnWebhook AddOnWebhookListResult
875 return addOnWebhook, s.Get(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks", addOnIdentity), nil, lr)
876 }
877
878 type AddOnWebhookUpdateOpts struct {
879 Authorization *string `json:"authorization,omitempty" url:"authorization,omitempty,key"` // a custom `Authorization` header that Heroku will include with all
880 // webhook notifications
881 Include []*string `json:"include,omitempty" url:"include,omitempty,key"` // the entities that the subscription provides notifications for
882 Level *string `json:"level,omitempty" url:"level,omitempty,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
883 // If `sync`, Heroku attempts multiple deliveries until the request is
884 // successful or a limit is reached
885 Secret *string `json:"secret,omitempty" url:"secret,omitempty,key"` // a value that Heroku will use to sign all webhook notification
886 // requests (the signature is included in the request’s
887 // `Heroku-Webhook-Hmac-SHA256` header)
888 URL *string `json:"url,omitempty" url:"url,omitempty,key"` // the URL where the webhook's notification requests are sent
889 }
890 type AddOnWebhookUpdateResult struct {
891 Addon struct {
892 ID string `json:"id" url:"id,key"` // unique identifier of add-on
893 Name string `json:"name" url:"name,key"` // globally unique name of the add-on
894 } `json:"addon" url:"addon,key"` // identity of add-on. Only used for add-on partner webhooks.
895 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created
896 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
897 Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for
898 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
899 // If `sync`, Heroku attempts multiple deliveries until the request is
900 // successful or a limit is reached
901 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated
902 URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent
903 }
904
905 // Updates the details of an add-on webhook subscription. Can only be
906 // accessed by the add-on partner providing this add-on.
907 func (s *Service) AddOnWebhookUpdate(ctx context.Context, addOnIdentity string, appWebhookIdentity string, o AddOnWebhookUpdateOpts) (*AddOnWebhookUpdateResult, error) {
908 var addOnWebhook AddOnWebhookUpdateResult
909 return &addOnWebhook, s.Patch(ctx, &addOnWebhook, fmt.Sprintf("/addons/%v/webhooks/%v", addOnIdentity, appWebhookIdentity), o)
910 }
911
912 // Represents the delivery of a webhook notification, including its
913 // current status.
914 type AddOnWebhookDelivery struct{}
915 type AddOnWebhookDeliveryInfoResult struct {
916 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the delivery was created
917 Event struct {
918 ID string `json:"id" url:"id,key"` // the event's unique identifier
919 Include string `json:"include" url:"include,key"` // the type of entity that the event is related to
920 } `json:"event" url:"event,key"` // identity of event
921 ID string `json:"id" url:"id,key"` // the delivery's unique identifier
922 LastAttempt *struct {
923 Code *int `json:"code" url:"code,key"` // http response code received during attempt
924 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when attempt was created
925 ErrorClass *string `json:"error_class" url:"error_class,key"` // error class encountered during attempt
926 ID string `json:"id" url:"id,key"` // unique identifier of attempt
927 Status string `json:"status" url:"status,key"` // status of an attempt
928 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when attempt was updated
929 } `json:"last_attempt" url:"last_attempt,key"` // last attempt of a delivery
930 NextAttemptAt *time.Time `json:"next_attempt_at" url:"next_attempt_at,key"` // when delivery will be attempted again
931 NumAttempts int `json:"num_attempts" url:"num_attempts,key"` // number of times a delivery has been attempted
932 Status string `json:"status" url:"status,key"` // the delivery's status
933 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the delivery was last updated
934 Webhook struct {
935 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
936 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
937 // If `sync`, Heroku attempts multiple deliveries until the request is
938 // successful or a limit is reached
939 } `json:"webhook" url:"webhook,key"` // identity of webhook
940 }
941
942 // Returns the info for an existing delivery. Can only be accessed by
943 // the add-on partner providing this add-on.
944 func (s *Service) AddOnWebhookDeliveryInfo(ctx context.Context, addOnIdentity string, appWebhookDeliveryIdentity string) (*AddOnWebhookDeliveryInfoResult, error) {
945 var addOnWebhookDelivery AddOnWebhookDeliveryInfoResult
946 return &addOnWebhookDelivery, s.Get(ctx, &addOnWebhookDelivery, fmt.Sprintf("/addons/%v/webhook-deliveries/%v", addOnIdentity, appWebhookDeliveryIdentity), nil, nil)
947 }
948
949 type AddOnWebhookDeliveryListResult []struct {
950 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the delivery was created
951 Event struct {
952 ID string `json:"id" url:"id,key"` // the event's unique identifier
953 Include string `json:"include" url:"include,key"` // the type of entity that the event is related to
954 } `json:"event" url:"event,key"` // identity of event
955 ID string `json:"id" url:"id,key"` // the delivery's unique identifier
956 LastAttempt *struct {
957 Code *int `json:"code" url:"code,key"` // http response code received during attempt
958 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when attempt was created
959 ErrorClass *string `json:"error_class" url:"error_class,key"` // error class encountered during attempt
960 ID string `json:"id" url:"id,key"` // unique identifier of attempt
961 Status string `json:"status" url:"status,key"` // status of an attempt
962 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when attempt was updated
963 } `json:"last_attempt" url:"last_attempt,key"` // last attempt of a delivery
964 NextAttemptAt *time.Time `json:"next_attempt_at" url:"next_attempt_at,key"` // when delivery will be attempted again
965 NumAttempts int `json:"num_attempts" url:"num_attempts,key"` // number of times a delivery has been attempted
966 Status string `json:"status" url:"status,key"` // the delivery's status
967 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the delivery was last updated
968 Webhook struct {
969 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
970 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
971 // If `sync`, Heroku attempts multiple deliveries until the request is
972 // successful or a limit is reached
973 } `json:"webhook" url:"webhook,key"` // identity of webhook
974 }
975
976 // Lists existing deliveries for an add-on. Can only be accessed by the
977 // add-on partner providing this add-on.
978 func (s *Service) AddOnWebhookDeliveryList(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnWebhookDeliveryListResult, error) {
979 var addOnWebhookDelivery AddOnWebhookDeliveryListResult
980 return addOnWebhookDelivery, s.Get(ctx, &addOnWebhookDelivery, fmt.Sprintf("/addons/%v/webhook-deliveries", addOnIdentity), nil, lr)
981 }
982
983 // Represents a webhook event that occurred.
984 type AddOnWebhookEvent struct{}
985 type AddOnWebhookEventInfoResult struct {
986 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when event was created
987 ID string `json:"id" url:"id,key"` // the event's unique identifier
988 Include string `json:"include" url:"include,key"` // the type of entity that the event is related to
989 Payload struct {
990 Action string `json:"action" url:"action,key"` // the type of event that occurred
991 Actor struct {
992 Email string `json:"email" url:"email,key"` // unique email address of account
993 ID string `json:"id" url:"id,key"` // unique identifier of an account
994 } `json:"actor" url:"actor,key"` // user that caused event
995 Data struct{} `json:"data" url:"data,key"` // the current details of the event
996 PreviousData struct{} `json:"previous_data" url:"previous_data,key"` // previous details of the event (if any)
997 Resource string `json:"resource" url:"resource,key"` // the type of resource associated with the event
998 Version string `json:"version" url:"version,key"` // the version of the details provided for the event
999 } `json:"payload" url:"payload,key"` // payload of event
1000 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the event was last updated
1001 }
1002
1003 // Returns the info for a specified webhook event. Can only be accessed
1004 // by the add-on partner providing this add-on.
1005 func (s *Service) AddOnWebhookEventInfo(ctx context.Context, addOnIdentity string, appWebhookEventIdentity string) (*AddOnWebhookEventInfoResult, error) {
1006 var addOnWebhookEvent AddOnWebhookEventInfoResult
1007 return &addOnWebhookEvent, s.Get(ctx, &addOnWebhookEvent, fmt.Sprintf("/addons/%v/webhook-events/%v", addOnIdentity, appWebhookEventIdentity), nil, nil)
1008 }
1009
1010 type AddOnWebhookEventListResult []struct {
1011 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when event was created
1012 ID string `json:"id" url:"id,key"` // the event's unique identifier
1013 Include string `json:"include" url:"include,key"` // the type of entity that the event is related to
1014 Payload struct {
1015 Action string `json:"action" url:"action,key"` // the type of event that occurred
1016 Actor struct {
1017 Email string `json:"email" url:"email,key"` // unique email address of account
1018 ID string `json:"id" url:"id,key"` // unique identifier of an account
1019 } `json:"actor" url:"actor,key"` // user that caused event
1020 Data struct{} `json:"data" url:"data,key"` // the current details of the event
1021 PreviousData struct{} `json:"previous_data" url:"previous_data,key"` // previous details of the event (if any)
1022 Resource string `json:"resource" url:"resource,key"` // the type of resource associated with the event
1023 Version string `json:"version" url:"version,key"` // the version of the details provided for the event
1024 } `json:"payload" url:"payload,key"` // payload of event
1025 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the event was last updated
1026 }
1027
1028 // Lists existing webhook events for an add-on. Can only be accessed by
1029 // the add-on partner providing this add-on.
1030 func (s *Service) AddOnWebhookEventList(ctx context.Context, addOnIdentity string, lr *ListRange) (AddOnWebhookEventListResult, error) {
1031 var addOnWebhookEvent AddOnWebhookEventListResult
1032 return addOnWebhookEvent, s.Get(ctx, &addOnWebhookEvent, fmt.Sprintf("/addons/%v/webhook-events", addOnIdentity), nil, lr)
1033 }
1034
1035 // An app represents the program that you would like to deploy and run
1036 // on Heroku.
1037 type App struct {
1038 Acm bool `json:"acm" url:"acm,key"` // ACM status of this app
1039 ArchivedAt *time.Time `json:"archived_at" url:"archived_at,key"` // when app was archived
1040 BuildStack struct {
1041 ID string `json:"id" url:"id,key"` // unique identifier of stack
1042 Name string `json:"name" url:"name,key"` // unique name of stack
1043 } `json:"build_stack" url:"build_stack,key"` // identity of the stack that will be used for new builds
1044 BuildpackProvidedDescription *string `json:"buildpack_provided_description" url:"buildpack_provided_description,key"` // description from buildpack of app
1045 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app was created
1046 GitURL string `json:"git_url" url:"git_url,key"` // git repo URL of app
1047 ID string `json:"id" url:"id,key"` // unique identifier of app
1048 InternalRouting *bool `json:"internal_routing" url:"internal_routing,key"` // describes whether a Private Spaces app is externally routable or not
1049 Maintenance bool `json:"maintenance" url:"maintenance,key"` // maintenance status of app
1050 Name string `json:"name" url:"name,key"` // unique name of app
1051 Organization *struct {
1052 ID string `json:"id" url:"id,key"` // unique identifier of organization
1053 Name string `json:"name" url:"name,key"` // unique name of organization
1054 } `json:"organization" url:"organization,key"` // identity of organization
1055 Owner struct {
1056 Email string `json:"email" url:"email,key"` // unique email address of account
1057 ID string `json:"id" url:"id,key"` // unique identifier of an account
1058 } `json:"owner" url:"owner,key"` // identity of app owner
1059 Region struct {
1060 ID string `json:"id" url:"id,key"` // unique identifier of region
1061 Name string `json:"name" url:"name,key"` // unique name of region
1062 } `json:"region" url:"region,key"` // identity of app region
1063 ReleasedAt *time.Time `json:"released_at" url:"released_at,key"` // when app was released
1064 RepoSize *int `json:"repo_size" url:"repo_size,key"` // git repo size in bytes of app
1065 SlugSize *int `json:"slug_size" url:"slug_size,key"` // slug size in bytes of app
1066 Space *struct {
1067 ID string `json:"id" url:"id,key"` // unique identifier of space
1068 Name string `json:"name" url:"name,key"` // unique name of space
1069 Shield bool `json:"shield" url:"shield,key"` // true if this space has shield enabled
1070 } `json:"space" url:"space,key"` // identity of space
1071 Stack struct {
1072 ID string `json:"id" url:"id,key"` // unique identifier of stack
1073 Name string `json:"name" url:"name,key"` // unique name of stack
1074 } `json:"stack" url:"stack,key"` // identity of app stack
1075 Team *struct {
1076 ID string `json:"id" url:"id,key"` // unique identifier of team
1077 Name string `json:"name" url:"name,key"` // unique name of team
1078 } `json:"team" url:"team,key"` // identity of team
1079 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app was updated
1080 WebURL string `json:"web_url" url:"web_url,key"` // web URL of app
1081 }
1082 type AppCreateOpts struct {
1083 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of app
1084 Region *string `json:"region,omitempty" url:"region,omitempty,key"` // unique identifier of region
1085 Stack *string `json:"stack,omitempty" url:"stack,omitempty,key"` // unique name of stack
1086 }
1087
1088 // Create a new app.
1089 func (s *Service) AppCreate(ctx context.Context, o AppCreateOpts) (*App, error) {
1090 var app App
1091 return &app, s.Post(ctx, &app, fmt.Sprintf("/apps"), o)
1092 }
1093
1094 // Delete an existing app.
1095 func (s *Service) AppDelete(ctx context.Context, appIdentity string) (*App, error) {
1096 var app App
1097 return &app, s.Delete(ctx, &app, fmt.Sprintf("/apps/%v", appIdentity))
1098 }
1099
1100 // Info for existing app.
1101 func (s *Service) AppInfo(ctx context.Context, appIdentity string) (*App, error) {
1102 var app App
1103 return &app, s.Get(ctx, &app, fmt.Sprintf("/apps/%v", appIdentity), nil, nil)
1104 }
1105
1106 type AppListResult []App
1107
1108 // List existing apps.
1109 func (s *Service) AppList(ctx context.Context, lr *ListRange) (AppListResult, error) {
1110 var app AppListResult
1111 return app, s.Get(ctx, &app, fmt.Sprintf("/apps"), nil, lr)
1112 }
1113
1114 type AppListOwnedAndCollaboratedResult []App
1115
1116 // List owned and collaborated apps (excludes team apps).
1117 func (s *Service) AppListOwnedAndCollaborated(ctx context.Context, accountIdentity string, lr *ListRange) (AppListOwnedAndCollaboratedResult, error) {
1118 var app AppListOwnedAndCollaboratedResult
1119 return app, s.Get(ctx, &app, fmt.Sprintf("/users/%v/apps", accountIdentity), nil, lr)
1120 }
1121
1122 type AppUpdateOpts struct {
1123 BuildStack *string `json:"build_stack,omitempty" url:"build_stack,omitempty,key"` // unique name of stack
1124 Maintenance *bool `json:"maintenance,omitempty" url:"maintenance,omitempty,key"` // maintenance status of app
1125 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of app
1126 }
1127
1128 // Update an existing app.
1129 func (s *Service) AppUpdate(ctx context.Context, appIdentity string, o AppUpdateOpts) (*App, error) {
1130 var app App
1131 return &app, s.Patch(ctx, &app, fmt.Sprintf("/apps/%v", appIdentity), o)
1132 }
1133
1134 // Enable ACM flag for an app
1135 func (s *Service) AppEnableACM(ctx context.Context, appIdentity string) (*App, error) {
1136 var app App
1137 return &app, s.Post(ctx, &app, fmt.Sprintf("/apps/%v/acm", appIdentity), nil)
1138 }
1139
1140 // Disable ACM flag for an app
1141 func (s *Service) AppDisableACM(ctx context.Context, appIdentity string) (*App, error) {
1142 var app App
1143 return &app, s.Delete(ctx, &app, fmt.Sprintf("/apps/%v/acm", appIdentity))
1144 }
1145
1146 // Refresh ACM for an app
1147 func (s *Service) AppRefreshACM(ctx context.Context, appIdentity string) (*App, error) {
1148 var app App
1149 return &app, s.Patch(ctx, &app, fmt.Sprintf("/apps/%v/acm", appIdentity), nil)
1150 }
1151
1152 // An app feature represents a Heroku labs capability that can be
1153 // enabled or disabled for an app on Heroku.
1154 type AppFeature struct {
1155 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app feature was created
1156 Description string `json:"description" url:"description,key"` // description of app feature
1157 DisplayName string `json:"display_name" url:"display_name,key"` // user readable feature name
1158 DocURL string `json:"doc_url" url:"doc_url,key"` // documentation URL of app feature
1159 Enabled bool `json:"enabled" url:"enabled,key"` // whether or not app feature has been enabled
1160 FeedbackEmail string `json:"feedback_email" url:"feedback_email,key"` // e-mail to send feedback about the feature
1161 ID string `json:"id" url:"id,key"` // unique identifier of app feature
1162 Name string `json:"name" url:"name,key"` // unique name of app feature
1163 State string `json:"state" url:"state,key"` // state of app feature
1164 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app feature was updated
1165 }
1166
1167 // Info for an existing app feature.
1168 func (s *Service) AppFeatureInfo(ctx context.Context, appIdentity string, appFeatureIdentity string) (*AppFeature, error) {
1169 var appFeature AppFeature
1170 return &appFeature, s.Get(ctx, &appFeature, fmt.Sprintf("/apps/%v/features/%v", appIdentity, appFeatureIdentity), nil, nil)
1171 }
1172
1173 type AppFeatureListResult []AppFeature
1174
1175 // List existing app features.
1176 func (s *Service) AppFeatureList(ctx context.Context, appIdentity string, lr *ListRange) (AppFeatureListResult, error) {
1177 var appFeature AppFeatureListResult
1178 return appFeature, s.Get(ctx, &appFeature, fmt.Sprintf("/apps/%v/features", appIdentity), nil, lr)
1179 }
1180
1181 type AppFeatureUpdateOpts struct {
1182 Enabled bool `json:"enabled" url:"enabled,key"` // whether or not app feature has been enabled
1183 }
1184
1185 // Update an existing app feature.
1186 func (s *Service) AppFeatureUpdate(ctx context.Context, appIdentity string, appFeatureIdentity string, o AppFeatureUpdateOpts) (*AppFeature, error) {
1187 var appFeature AppFeature
1188 return &appFeature, s.Patch(ctx, &appFeature, fmt.Sprintf("/apps/%v/features/%v", appIdentity, appFeatureIdentity), o)
1189 }
1190
1191 // App formation set describes the combination of process types with
1192 // their quantities and sizes as well as application process tier
1193 type AppFormationSet struct {
1194 App struct {
1195 ID string `json:"id" url:"id,key"` // unique identifier of app
1196 Name string `json:"name" url:"name,key"` // unique name of app
1197 } `json:"app" url:"app,key"` // app being described by the formation-set
1198 Description string `json:"description" url:"description,key"` // a string representation of the formation set
1199 ProcessTier string `json:"process_tier" url:"process_tier,key"` // application process tier
1200 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // last time fomation-set was updated
1201 }
1202
1203 // An app setup represents an app on Heroku that is setup using an
1204 // environment, addons, and scripts described in an app.json manifest
1205 // file.
1206 type AppSetup struct {
1207 App struct {
1208 ID string `json:"id" url:"id,key"` // unique identifier of app
1209 Name string `json:"name" url:"name,key"` // unique name of app
1210 } `json:"app" url:"app,key"` // identity of app
1211 Build *struct {
1212 ID string `json:"id" url:"id,key"` // unique identifier of build
1213 OutputStreamURL string `json:"output_stream_url" url:"output_stream_url,key"` // Build process output will be available from this URL as a stream. The
1214 // stream is available as either `text/plain` or `text/event-stream`.
1215 // Clients should be prepared to handle disconnects and can resume the
1216 // stream by sending a `Range` header (for `text/plain`) or a
1217 // `Last-Event-Id` header (for `text/event-stream`).
1218 Status string `json:"status" url:"status,key"` // status of build
1219 } `json:"build" url:"build,key"` // identity and status of build
1220 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app setup was created
1221 FailureMessage *string `json:"failure_message" url:"failure_message,key"` // reason that app setup has failed
1222 ID string `json:"id" url:"id,key"` // unique identifier of app setup
1223 ManifestErrors []string `json:"manifest_errors" url:"manifest_errors,key"` // errors associated with invalid app.json manifest file
1224 Postdeploy *struct {
1225 ExitCode int `json:"exit_code" url:"exit_code,key"` // The exit code of the postdeploy script
1226 Output string `json:"output" url:"output,key"` // output of the postdeploy script
1227 } `json:"postdeploy" url:"postdeploy,key"` // result of postdeploy script
1228 ResolvedSuccessURL *string `json:"resolved_success_url" url:"resolved_success_url,key"` // fully qualified success url
1229 Status string `json:"status" url:"status,key"` // the overall status of app setup
1230 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app setup was updated
1231 }
1232 type AppSetupCreateOpts struct {
1233 App *struct {
1234 Locked *bool `json:"locked,omitempty" url:"locked,omitempty,key"` // are other organization members forbidden from joining this app.
1235 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of app
1236 Organization *string `json:"organization,omitempty" url:"organization,omitempty,key"` // unique name of organization
1237 Personal *bool `json:"personal,omitempty" url:"personal,omitempty,key"` // force creation of the app in the user account even if a default org
1238 // is set.
1239 Region *string `json:"region,omitempty" url:"region,omitempty,key"` // unique name of region
1240 Space *string `json:"space,omitempty" url:"space,omitempty,key"` // unique name of space
1241 Stack *string `json:"stack,omitempty" url:"stack,omitempty,key"` // unique name of stack
1242 } `json:"app,omitempty" url:"app,omitempty,key"` // optional parameters for created app
1243 Overrides *struct {
1244 Buildpacks []*struct {
1245 URL *string `json:"url,omitempty" url:"url,omitempty,key"` // location of the buildpack
1246 } `json:"buildpacks,omitempty" url:"buildpacks,omitempty,key"` // overrides the buildpacks specified in the app.json manifest file
1247 Env map[string]string `json:"env,omitempty" url:"env,omitempty,key"` // overrides of the env specified in the app.json manifest file
1248 } `json:"overrides,omitempty" url:"overrides,omitempty,key"` // overrides of keys in the app.json manifest file
1249 SourceBlob struct {
1250 Checksum *string `json:"checksum,omitempty" url:"checksum,omitempty,key"` // an optional checksum of the gzipped tarball for verifying its
1251 // integrity
1252 URL *string `json:"url,omitempty" url:"url,omitempty,key"` // URL of gzipped tarball of source code containing app.json manifest
1253 // file
1254 Version *string `json:"version,omitempty" url:"version,omitempty,key"` // Version of the gzipped tarball.
1255 } `json:"source_blob" url:"source_blob,key"` // gzipped tarball of source code containing app.json manifest file
1256 }
1257
1258 // Create a new app setup from a gzipped tar archive containing an
1259 // app.json manifest file.
1260 func (s *Service) AppSetupCreate(ctx context.Context, o AppSetupCreateOpts) (*AppSetup, error) {
1261 var appSetup AppSetup
1262 return &appSetup, s.Post(ctx, &appSetup, fmt.Sprintf("/app-setups"), o)
1263 }
1264
1265 // Get the status of an app setup.
1266 func (s *Service) AppSetupInfo(ctx context.Context, appSetupIdentity string) (*AppSetup, error) {
1267 var appSetup AppSetup
1268 return &appSetup, s.Get(ctx, &appSetup, fmt.Sprintf("/app-setups/%v", appSetupIdentity), nil, nil)
1269 }
1270
1271 // An app transfer represents a two party interaction for transferring
1272 // ownership of an app.
1273 type AppTransfer struct {
1274 App struct {
1275 ID string `json:"id" url:"id,key"` // unique identifier of app
1276 Name string `json:"name" url:"name,key"` // unique name of app
1277 } `json:"app" url:"app,key"` // app involved in the transfer
1278 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app transfer was created
1279 ID string `json:"id" url:"id,key"` // unique identifier of app transfer
1280 Owner struct {
1281 Email string `json:"email" url:"email,key"` // unique email address of account
1282 ID string `json:"id" url:"id,key"` // unique identifier of an account
1283 } `json:"owner" url:"owner,key"` // identity of the owner of the transfer
1284 Recipient struct {
1285 Email string `json:"email" url:"email,key"` // unique email address of account
1286 ID string `json:"id" url:"id,key"` // unique identifier of an account
1287 } `json:"recipient" url:"recipient,key"` // identity of the recipient of the transfer
1288 State string `json:"state" url:"state,key"` // the current state of an app transfer
1289 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app transfer was updated
1290 }
1291 type AppTransferCreateOpts struct {
1292 App string `json:"app" url:"app,key"` // unique identifier of app
1293 Recipient string `json:"recipient" url:"recipient,key"` // unique email address of account
1294 Silent *bool `json:"silent,omitempty" url:"silent,omitempty,key"` // whether to suppress email notification when transferring apps
1295 }
1296
1297 // Create a new app transfer.
1298 func (s *Service) AppTransferCreate(ctx context.Context, o AppTransferCreateOpts) (*AppTransfer, error) {
1299 var appTransfer AppTransfer
1300 return &appTransfer, s.Post(ctx, &appTransfer, fmt.Sprintf("/account/app-transfers"), o)
1301 }
1302
1303 // Delete an existing app transfer
1304 func (s *Service) AppTransferDelete(ctx context.Context, appTransferIdentity string) (*AppTransfer, error) {
1305 var appTransfer AppTransfer
1306 return &appTransfer, s.Delete(ctx, &appTransfer, fmt.Sprintf("/account/app-transfers/%v", appTransferIdentity))
1307 }
1308
1309 // Info for existing app transfer.
1310 func (s *Service) AppTransferInfo(ctx context.Context, appTransferIdentity string) (*AppTransfer, error) {
1311 var appTransfer AppTransfer
1312 return &appTransfer, s.Get(ctx, &appTransfer, fmt.Sprintf("/account/app-transfers/%v", appTransferIdentity), nil, nil)
1313 }
1314
1315 type AppTransferListResult []AppTransfer
1316
1317 // List existing apps transfers.
1318 func (s *Service) AppTransferList(ctx context.Context, lr *ListRange) (AppTransferListResult, error) {
1319 var appTransfer AppTransferListResult
1320 return appTransfer, s.Get(ctx, &appTransfer, fmt.Sprintf("/account/app-transfers"), nil, lr)
1321 }
1322
1323 type AppTransferUpdateOpts struct {
1324 State string `json:"state" url:"state,key"` // the current state of an app transfer
1325 }
1326
1327 // Update an existing app transfer.
1328 func (s *Service) AppTransferUpdate(ctx context.Context, appTransferIdentity string, o AppTransferUpdateOpts) (*AppTransfer, error) {
1329 var appTransfer AppTransfer
1330 return &appTransfer, s.Patch(ctx, &appTransfer, fmt.Sprintf("/account/app-transfers/%v", appTransferIdentity), o)
1331 }
1332
1333 // Represents the details of a webhook subscription
1334 type AppWebhook struct{}
1335 type AppWebhookCreateOpts struct {
1336 Authorization *string `json:"authorization,omitempty" url:"authorization,omitempty,key"` // a custom `Authorization` header that Heroku will include with all
1337 // webhook notifications
1338 Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for
1339 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
1340 // If `sync`, Heroku attempts multiple deliveries until the request is
1341 // successful or a limit is reached
1342 Secret *string `json:"secret,omitempty" url:"secret,omitempty,key"` // a value that Heroku will use to sign all webhook notification
1343 // requests (the signature is included in the request’s
1344 // `Heroku-Webhook-Hmac-SHA256` header)
1345 URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent
1346 }
1347 type AppWebhookCreateResult struct {
1348 App struct {
1349 ID string `json:"id" url:"id,key"` // unique identifier of app
1350 Name string `json:"name" url:"name,key"` // unique name of app
1351 } `json:"app" url:"app,key"` // identity of app. Only used for customer webhooks.
1352 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created
1353 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
1354 Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for
1355 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
1356 // If `sync`, Heroku attempts multiple deliveries until the request is
1357 // successful or a limit is reached
1358 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated
1359 URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent
1360 }
1361
1362 // Create an app webhook subscription.
1363 func (s *Service) AppWebhookCreate(ctx context.Context, appIdentity string, o AppWebhookCreateOpts) (*AppWebhookCreateResult, error) {
1364 var appWebhook AppWebhookCreateResult
1365 return &appWebhook, s.Post(ctx, &appWebhook, fmt.Sprintf("/apps/%v/webhooks", appIdentity), o)
1366 }
1367
1368 type AppWebhookDeleteResult struct {
1369 App struct {
1370 ID string `json:"id" url:"id,key"` // unique identifier of app
1371 Name string `json:"name" url:"name,key"` // unique name of app
1372 } `json:"app" url:"app,key"` // identity of app. Only used for customer webhooks.
1373 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created
1374 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
1375 Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for
1376 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
1377 // If `sync`, Heroku attempts multiple deliveries until the request is
1378 // successful or a limit is reached
1379 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated
1380 URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent
1381 }
1382
1383 // Removes an app webhook subscription.
1384 func (s *Service) AppWebhookDelete(ctx context.Context, appIdentity string, appWebhookIdentity string) (*AppWebhookDeleteResult, error) {
1385 var appWebhook AppWebhookDeleteResult
1386 return &appWebhook, s.Delete(ctx, &appWebhook, fmt.Sprintf("/apps/%v/webhooks/%v", appIdentity, appWebhookIdentity))
1387 }
1388
1389 type AppWebhookInfoResult struct {
1390 App struct {
1391 ID string `json:"id" url:"id,key"` // unique identifier of app
1392 Name string `json:"name" url:"name,key"` // unique name of app
1393 } `json:"app" url:"app,key"` // identity of app. Only used for customer webhooks.
1394 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created
1395 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
1396 Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for
1397 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
1398 // If `sync`, Heroku attempts multiple deliveries until the request is
1399 // successful or a limit is reached
1400 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated
1401 URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent
1402 }
1403
1404 // Returns the info for an app webhook subscription.
1405 func (s *Service) AppWebhookInfo(ctx context.Context, appIdentity string, appWebhookIdentity string) (*AppWebhookInfoResult, error) {
1406 var appWebhook AppWebhookInfoResult
1407 return &appWebhook, s.Get(ctx, &appWebhook, fmt.Sprintf("/apps/%v/webhooks/%v", appIdentity, appWebhookIdentity), nil, nil)
1408 }
1409
1410 type AppWebhookListResult []struct {
1411 App struct {
1412 ID string `json:"id" url:"id,key"` // unique identifier of app
1413 Name string `json:"name" url:"name,key"` // unique name of app
1414 } `json:"app" url:"app,key"` // identity of app. Only used for customer webhooks.
1415 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created
1416 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
1417 Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for
1418 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
1419 // If `sync`, Heroku attempts multiple deliveries until the request is
1420 // successful or a limit is reached
1421 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated
1422 URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent
1423 }
1424
1425 // List all webhook subscriptions for a particular app.
1426 func (s *Service) AppWebhookList(ctx context.Context, appIdentity string, lr *ListRange) (AppWebhookListResult, error) {
1427 var appWebhook AppWebhookListResult
1428 return appWebhook, s.Get(ctx, &appWebhook, fmt.Sprintf("/apps/%v/webhooks", appIdentity), nil, lr)
1429 }
1430
1431 type AppWebhookUpdateOpts struct {
1432 Authorization *string `json:"authorization,omitempty" url:"authorization,omitempty,key"` // a custom `Authorization` header that Heroku will include with all
1433 // webhook notifications
1434 Include []*string `json:"include,omitempty" url:"include,omitempty,key"` // the entities that the subscription provides notifications for
1435 Level *string `json:"level,omitempty" url:"level,omitempty,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
1436 // If `sync`, Heroku attempts multiple deliveries until the request is
1437 // successful or a limit is reached
1438 Secret *string `json:"secret,omitempty" url:"secret,omitempty,key"` // a value that Heroku will use to sign all webhook notification
1439 // requests (the signature is included in the request’s
1440 // `Heroku-Webhook-Hmac-SHA256` header)
1441 URL *string `json:"url,omitempty" url:"url,omitempty,key"` // the URL where the webhook's notification requests are sent
1442 }
1443 type AppWebhookUpdateResult struct {
1444 App struct {
1445 ID string `json:"id" url:"id,key"` // unique identifier of app
1446 Name string `json:"name" url:"name,key"` // unique name of app
1447 } `json:"app" url:"app,key"` // identity of app. Only used for customer webhooks.
1448 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the webhook was created
1449 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
1450 Include []string `json:"include" url:"include,key"` // the entities that the subscription provides notifications for
1451 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
1452 // If `sync`, Heroku attempts multiple deliveries until the request is
1453 // successful or a limit is reached
1454 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the webhook was updated
1455 URL string `json:"url" url:"url,key"` // the URL where the webhook's notification requests are sent
1456 }
1457
1458 // Updates the details of an app webhook subscription.
1459 func (s *Service) AppWebhookUpdate(ctx context.Context, appIdentity string, appWebhookIdentity string, o AppWebhookUpdateOpts) (*AppWebhookUpdateResult, error) {
1460 var appWebhook AppWebhookUpdateResult
1461 return &appWebhook, s.Patch(ctx, &appWebhook, fmt.Sprintf("/apps/%v/webhooks/%v", appIdentity, appWebhookIdentity), o)
1462 }
1463
1464 // Represents the delivery of a webhook notification, including its
1465 // current status.
1466 type AppWebhookDelivery struct {
1467 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the delivery was created
1468 Event struct {
1469 ID string `json:"id" url:"id,key"` // the event's unique identifier
1470 Include string `json:"include" url:"include,key"` // the type of entity that the event is related to
1471 } `json:"event" url:"event,key"` // identity of event
1472 ID string `json:"id" url:"id,key"` // the delivery's unique identifier
1473 LastAttempt *struct {
1474 Code *int `json:"code" url:"code,key"` // http response code received during attempt
1475 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when attempt was created
1476 ErrorClass *string `json:"error_class" url:"error_class,key"` // error class encountered during attempt
1477 ID string `json:"id" url:"id,key"` // unique identifier of attempt
1478 Status string `json:"status" url:"status,key"` // status of an attempt
1479 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when attempt was updated
1480 } `json:"last_attempt" url:"last_attempt,key"` // last attempt of a delivery
1481 NextAttemptAt *time.Time `json:"next_attempt_at" url:"next_attempt_at,key"` // when delivery will be attempted again
1482 NumAttempts int `json:"num_attempts" url:"num_attempts,key"` // number of times a delivery has been attempted
1483 Status string `json:"status" url:"status,key"` // the delivery's status
1484 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the delivery was last updated
1485 Webhook struct {
1486 ID string `json:"id" url:"id,key"` // the webhook's unique identifier
1487 Level string `json:"level" url:"level,key"` // if `notify`, Heroku makes a single, fire-and-forget delivery attempt.
1488 // If `sync`, Heroku attempts multiple deliveries until the request is
1489 // successful or a limit is reached
1490 } `json:"webhook" url:"webhook,key"` // identity of webhook
1491 }
1492
1493 // Returns the info for an existing delivery.
1494 func (s *Service) AppWebhookDeliveryInfo(ctx context.Context, appIdentity string, appWebhookDeliveryIdentity string) (*AppWebhookDelivery, error) {
1495 var appWebhookDelivery AppWebhookDelivery
1496 return &appWebhookDelivery, s.Get(ctx, &appWebhookDelivery, fmt.Sprintf("/apps/%v/webhook-deliveries/%v", appIdentity, appWebhookDeliveryIdentity), nil, nil)
1497 }
1498
1499 type AppWebhookDeliveryListResult []AppWebhookDelivery
1500
1501 // Lists existing deliveries for an app.
1502 func (s *Service) AppWebhookDeliveryList(ctx context.Context, appIdentity string, lr *ListRange) (AppWebhookDeliveryListResult, error) {
1503 var appWebhookDelivery AppWebhookDeliveryListResult
1504 return appWebhookDelivery, s.Get(ctx, &appWebhookDelivery, fmt.Sprintf("/apps/%v/webhook-deliveries", appIdentity), nil, lr)
1505 }
1506
1507 // Represents a webhook event that occurred.
1508 type AppWebhookEvent struct {
1509 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when event was created
1510 ID string `json:"id" url:"id,key"` // the event's unique identifier
1511 Include string `json:"include" url:"include,key"` // the type of entity that the event is related to
1512 Payload struct {
1513 Action string `json:"action" url:"action,key"` // the type of event that occurred
1514 Actor struct {
1515 Email string `json:"email" url:"email,key"` // unique email address of account
1516 ID string `json:"id" url:"id,key"` // unique identifier of an account
1517 } `json:"actor" url:"actor,key"` // user that caused event
1518 Data struct{} `json:"data" url:"data,key"` // the current details of the event
1519 PreviousData struct{} `json:"previous_data" url:"previous_data,key"` // previous details of the event (if any)
1520 Resource string `json:"resource" url:"resource,key"` // the type of resource associated with the event
1521 Version string `json:"version" url:"version,key"` // the version of the details provided for the event
1522 } `json:"payload" url:"payload,key"` // payload of event
1523 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the event was last updated
1524 }
1525
1526 // Returns the info for a specified webhook event.
1527 func (s *Service) AppWebhookEventInfo(ctx context.Context, appIdentity string, appWebhookEventIdentity string) (*AppWebhookEvent, error) {
1528 var appWebhookEvent AppWebhookEvent
1529 return &appWebhookEvent, s.Get(ctx, &appWebhookEvent, fmt.Sprintf("/apps/%v/webhook-events/%v", appIdentity, appWebhookEventIdentity), nil, nil)
1530 }
1531
1532 type AppWebhookEventListResult []AppWebhookEvent
1533
1534 // Lists existing webhook events for an app.
1535 func (s *Service) AppWebhookEventList(ctx context.Context, appIdentity string, lr *ListRange) (AppWebhookEventListResult, error) {
1536 var appWebhookEvent AppWebhookEventListResult
1537 return appWebhookEvent, s.Get(ctx, &appWebhookEvent, fmt.Sprintf("/apps/%v/webhook-events", appIdentity), nil, lr)
1538 }
1539
1540 // A build represents the process of transforming a code tarball into a
1541 // slug
1542 type Build struct {
1543 App struct {
1544 ID string `json:"id" url:"id,key"` // unique identifier of app
1545 } `json:"app" url:"app,key"` // app that the build belongs to
1546 Buildpacks []struct {
1547 Name string `json:"name" url:"name,key"` // Buildpack Registry name of the buildpack for the app
1548 URL string `json:"url" url:"url,key"` // the URL of the buildpack for the app
1549 } `json:"buildpacks" url:"buildpacks,key"` // buildpacks executed for this build, in order
1550 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when build was created
1551 ID string `json:"id" url:"id,key"` // unique identifier of build
1552 OutputStreamURL string `json:"output_stream_url" url:"output_stream_url,key"` // Build process output will be available from this URL as a stream. The
1553 // stream is available as either `text/plain` or `text/event-stream`.
1554 // Clients should be prepared to handle disconnects and can resume the
1555 // stream by sending a `Range` header (for `text/plain`) or a
1556 // `Last-Event-Id` header (for `text/event-stream`).
1557 Release *struct {
1558 ID string `json:"id" url:"id,key"` // unique identifier of release
1559 } `json:"release" url:"release,key"` // release resulting from the build
1560 Slug *struct {
1561 ID string `json:"id" url:"id,key"` // unique identifier of slug
1562 } `json:"slug" url:"slug,key"` // slug created by this build
1563 SourceBlob struct {
1564 Checksum *string `json:"checksum" url:"checksum,key"` // an optional checksum of the gzipped tarball for verifying its
1565 // integrity
1566 URL string `json:"url" url:"url,key"` // URL where gzipped tar archive of source code for build was
1567 // downloaded.
1568 Version *string `json:"version" url:"version,key"` // Version of the gzipped tarball.
1569 } `json:"source_blob" url:"source_blob,key"` // location of gzipped tarball of source code used to create build
1570 Stack string `json:"stack" url:"stack,key"` // stack of build
1571 Status string `json:"status" url:"status,key"` // status of build
1572 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when build was updated
1573 User struct {
1574 Email string `json:"email" url:"email,key"` // unique email address of account
1575 ID string `json:"id" url:"id,key"` // unique identifier of an account
1576 } `json:"user" url:"user,key"` // user that started the build
1577 }
1578 type BuildCreateOpts struct {
1579 Buildpacks []*struct {
1580 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // Buildpack Registry name of the buildpack for the app
1581 URL *string `json:"url,omitempty" url:"url,omitempty,key"` // the URL of the buildpack for the app
1582 } `json:"buildpacks,omitempty" url:"buildpacks,omitempty,key"` // buildpacks executed for this build, in order
1583 SourceBlob struct {
1584 Checksum *string `json:"checksum,omitempty" url:"checksum,omitempty,key"` // an optional checksum of the gzipped tarball for verifying its
1585 // integrity
1586 URL *string `json:"url,omitempty" url:"url,omitempty,key"` // URL where gzipped tar archive of source code for build was
1587 // downloaded.
1588 Version *string `json:"version,omitempty" url:"version,omitempty,key"` // Version of the gzipped tarball.
1589 } `json:"source_blob" url:"source_blob,key"` // location of gzipped tarball of source code used to create build
1590 }
1591
1592 // Create a new build.
1593 func (s *Service) BuildCreate(ctx context.Context, appIdentity string, o BuildCreateOpts) (*Build, error) {
1594 var build Build
1595 return &build, s.Post(ctx, &build, fmt.Sprintf("/apps/%v/builds", appIdentity), o)
1596 }
1597
1598 // Info for existing build.
1599 func (s *Service) BuildInfo(ctx context.Context, appIdentity string, buildIdentity string) (*Build, error) {
1600 var build Build
1601 return &build, s.Get(ctx, &build, fmt.Sprintf("/apps/%v/builds/%v", appIdentity, buildIdentity), nil, nil)
1602 }
1603
1604 type BuildListResult []Build
1605
1606 // List existing build.
1607 func (s *Service) BuildList(ctx context.Context, appIdentity string, lr *ListRange) (BuildListResult, error) {
1608 var build BuildListResult
1609 return build, s.Get(ctx, &build, fmt.Sprintf("/apps/%v/builds", appIdentity), nil, lr)
1610 }
1611
1612 // Destroy a build cache.
1613 func (s *Service) BuildDeleteCache(ctx context.Context, appIdentity string) (*Build, error) {
1614 var build Build
1615 return &build, s.Delete(ctx, &build, fmt.Sprintf("/apps/%v/build-cache", appIdentity))
1616 }
1617
1618 // A build result contains the output from a build.
1619 type BuildResult struct {
1620 Build struct {
1621 ID string `json:"id" url:"id,key"` // unique identifier of build
1622 OutputStreamURL string `json:"output_stream_url" url:"output_stream_url,key"` // Build process output will be available from this URL as a stream. The
1623 // stream is available as either `text/plain` or `text/event-stream`.
1624 // Clients should be prepared to handle disconnects and can resume the
1625 // stream by sending a `Range` header (for `text/plain`) or a
1626 // `Last-Event-Id` header (for `text/event-stream`).
1627 Status string `json:"status" url:"status,key"` // status of build
1628 } `json:"build" url:"build,key"` // identity of build
1629 ExitCode float64 `json:"exit_code" url:"exit_code,key"` // status from the build
1630 Lines []struct {
1631 Line string `json:"line" url:"line,key"` // A line of output from the build.
1632 Stream string `json:"stream" url:"stream,key"` // The output stream where the line was sent.
1633 } `json:"lines" url:"lines,key"` // A list of all the lines of a build's output. This has been replaced
1634 // by the `output_stream_url` attribute on the build resource.
1635 }
1636
1637 // Info for existing result.
1638 func (s *Service) BuildResultInfo(ctx context.Context, appIdentity string, buildIdentity string) (*BuildResult, error) {
1639 var buildResult BuildResult
1640 return &buildResult, s.Get(ctx, &buildResult, fmt.Sprintf("/apps/%v/builds/%v/result", appIdentity, buildIdentity), nil, nil)
1641 }
1642
1643 // A buildpack installation represents a buildpack that will be run
1644 // against an app.
1645 type BuildpackInstallation struct {
1646 Buildpack struct {
1647 Name string `json:"name" url:"name,key"` // either the Buildpack Registry name or a URL of the buildpack for the
1648 // app
1649 URL string `json:"url" url:"url,key"` // location of the buildpack for the app. Either a url (unofficial
1650 // buildpacks) or an internal urn (heroku official buildpacks).
1651 } `json:"buildpack" url:"buildpack,key"` // buildpack
1652 Ordinal int `json:"ordinal" url:"ordinal,key"` // determines the order in which the buildpacks will execute
1653 }
1654 type BuildpackInstallationUpdateOpts struct {
1655 Updates []struct {
1656 Buildpack string `json:"buildpack" url:"buildpack,key"` // location of the buildpack for the app. Either a url (unofficial
1657 // buildpacks) or an internal urn (heroku official buildpacks).
1658 } `json:"updates" url:"updates,key"` // The buildpack attribute can accept a name, a url, or a urn.
1659 }
1660 type BuildpackInstallationUpdateResult []BuildpackInstallation
1661
1662 // Update an app's buildpack installations.
1663 func (s *Service) BuildpackInstallationUpdate(ctx context.Context, appIdentity string, o BuildpackInstallationUpdateOpts) (BuildpackInstallationUpdateResult, error) {
1664 var buildpackInstallation BuildpackInstallationUpdateResult
1665 return buildpackInstallation, s.Put(ctx, &buildpackInstallation, fmt.Sprintf("/apps/%v/buildpack-installations", appIdentity), o)
1666 }
1667
1668 type BuildpackInstallationListResult []BuildpackInstallation
1669
1670 // List an app's existing buildpack installations.
1671 func (s *Service) BuildpackInstallationList(ctx context.Context, appIdentity string, lr *ListRange) (BuildpackInstallationListResult, error) {
1672 var buildpackInstallation BuildpackInstallationListResult
1673 return buildpackInstallation, s.Get(ctx, &buildpackInstallation, fmt.Sprintf("/apps/%v/buildpack-installations", appIdentity), nil, lr)
1674 }
1675
1676 // A collaborator represents an account that has been given access to an
1677 // app on Heroku.
1678 type Collaborator struct {
1679 App struct {
1680 ID string `json:"id" url:"id,key"` // unique identifier of app
1681 Name string `json:"name" url:"name,key"` // unique name of app
1682 } `json:"app" url:"app,key"` // app collaborator belongs to
1683 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when collaborator was created
1684 ID string `json:"id" url:"id,key"` // unique identifier of collaborator
1685 Permissions []struct {
1686 Description string `json:"description" url:"description,key"` // A description of what the app permission allows.
1687 Name string `json:"name" url:"name,key"` // The name of the app permission.
1688 } `json:"permissions" url:"permissions,key"`
1689 Role *string `json:"role" url:"role,key"` // role in the team
1690 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when collaborator was updated
1691 User struct {
1692 Email string `json:"email" url:"email,key"` // unique email address of account
1693 Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider
1694 ID string `json:"id" url:"id,key"` // unique identifier of an account
1695 } `json:"user" url:"user,key"` // identity of collaborated account
1696 }
1697 type CollaboratorCreateOpts struct {
1698 Silent *bool `json:"silent,omitempty" url:"silent,omitempty,key"` // whether to suppress email invitation when creating collaborator
1699 User string `json:"user" url:"user,key"` // unique email address of account
1700 }
1701
1702 // Create a new collaborator.
1703 func (s *Service) CollaboratorCreate(ctx context.Context, appIdentity string, o CollaboratorCreateOpts) (*Collaborator, error) {
1704 var collaborator Collaborator
1705 return &collaborator, s.Post(ctx, &collaborator, fmt.Sprintf("/apps/%v/collaborators", appIdentity), o)
1706 }
1707
1708 // Delete an existing collaborator.
1709 func (s *Service) CollaboratorDelete(ctx context.Context, appIdentity string, collaboratorIdentity string) (*Collaborator, error) {
1710 var collaborator Collaborator
1711 return &collaborator, s.Delete(ctx, &collaborator, fmt.Sprintf("/apps/%v/collaborators/%v", appIdentity, collaboratorIdentity))
1712 }
1713
1714 // Info for existing collaborator.
1715 func (s *Service) CollaboratorInfo(ctx context.Context, appIdentity string, collaboratorIdentity string) (*Collaborator, error) {
1716 var collaborator Collaborator
1717 return &collaborator, s.Get(ctx, &collaborator, fmt.Sprintf("/apps/%v/collaborators/%v", appIdentity, collaboratorIdentity), nil, nil)
1718 }
1719
1720 type CollaboratorListResult []Collaborator
1721
1722 // List existing collaborators.
1723 func (s *Service) CollaboratorList(ctx context.Context, appIdentity string, lr *ListRange) (CollaboratorListResult, error) {
1724 var collaborator CollaboratorListResult
1725 return collaborator, s.Get(ctx, &collaborator, fmt.Sprintf("/apps/%v/collaborators", appIdentity), nil, lr)
1726 }
1727
1728 // Config Vars allow you to manage the configuration information
1729 // provided to an app on Heroku.
1730 type ConfigVar map[string]string
1731 type ConfigVarInfoForAppResult map[string]*string
1732
1733 // Get config-vars for app.
1734 func (s *Service) ConfigVarInfoForApp(ctx context.Context, appIdentity string) (ConfigVarInfoForAppResult, error) {
1735 var configVar ConfigVarInfoForAppResult
1736 return configVar, s.Get(ctx, &configVar, fmt.Sprintf("/apps/%v/config-vars", appIdentity), nil, nil)
1737 }
1738
1739 type ConfigVarInfoForAppReleaseResult map[string]*string
1740
1741 // Get config-vars for a release.
1742 func (s *Service) ConfigVarInfoForAppRelease(ctx context.Context, appIdentity string, releaseIdentity string) (ConfigVarInfoForAppReleaseResult, error) {
1743 var configVar ConfigVarInfoForAppReleaseResult
1744 return configVar, s.Get(ctx, &configVar, fmt.Sprintf("/apps/%v/releases/%v/config-vars", appIdentity, releaseIdentity), nil, nil)
1745 }
1746
1747 type ConfigVarUpdateResult map[string]*string
1748
1749 // Update config-vars for app. You can update existing config-vars by
1750 // setting them again, and remove by setting it to `null`.
1751 func (s *Service) ConfigVarUpdate(ctx context.Context, appIdentity string, o map[string]*string) (ConfigVarUpdateResult, error) {
1752 var configVar ConfigVarUpdateResult
1753 return configVar, s.Patch(ctx, &configVar, fmt.Sprintf("/apps/%v/config-vars", appIdentity), o)
1754 }
1755
1756 // A credit represents value that will be used up before further charges
1757 // are assigned to an account.
1758 type Credit struct {
1759 Amount float64 `json:"amount" url:"amount,key"` // total value of credit in cents
1760 Balance float64 `json:"balance" url:"balance,key"` // remaining value of credit in cents
1761 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when credit was created
1762 ExpiresAt time.Time `json:"expires_at" url:"expires_at,key"` // when credit will expire
1763 ID string `json:"id" url:"id,key"` // unique identifier of credit
1764 Title string `json:"title" url:"title,key"` // a name for credit
1765 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when credit was updated
1766 }
1767 type CreditCreateOpts struct {
1768 Code1 *string `json:"code1,omitempty" url:"code1,omitempty,key"` // first code from a discount card
1769 Code2 *string `json:"code2,omitempty" url:"code2,omitempty,key"` // second code from a discount card
1770 }
1771
1772 // Create a new credit.
1773 func (s *Service) CreditCreate(ctx context.Context, o CreditCreateOpts) (*Credit, error) {
1774 var credit Credit
1775 return &credit, s.Post(ctx, &credit, fmt.Sprintf("/account/credits"), o)
1776 }
1777
1778 // Info for existing credit.
1779 func (s *Service) CreditInfo(ctx context.Context, creditIdentity string) (*Credit, error) {
1780 var credit Credit
1781 return &credit, s.Get(ctx, &credit, fmt.Sprintf("/account/credits/%v", creditIdentity), nil, nil)
1782 }
1783
1784 type CreditListResult []Credit
1785
1786 // List existing credits.
1787 func (s *Service) CreditList(ctx context.Context, lr *ListRange) (CreditListResult, error) {
1788 var credit CreditListResult
1789 return credit, s.Get(ctx, &credit, fmt.Sprintf("/account/credits"), nil, lr)
1790 }
1791
1792 // Domains define what web routes should be routed to an app on Heroku.
1793 type Domain struct {
1794 AcmStatus *string `json:"acm_status" url:"acm_status,key"` // status of this record's ACM
1795 AcmStatusReason *string `json:"acm_status_reason" url:"acm_status_reason,key"` // reason for the status of this record's ACM
1796 App struct {
1797 ID string `json:"id" url:"id,key"` // unique identifier of app
1798 Name string `json:"name" url:"name,key"` // unique name of app
1799 } `json:"app" url:"app,key"` // app that owns the domain
1800 CName *string `json:"cname" url:"cname,key"` // canonical name record, the address to point a domain at
1801 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when domain was created
1802 Hostname string `json:"hostname" url:"hostname,key"` // full hostname
1803 ID string `json:"id" url:"id,key"` // unique identifier of this domain
1804 Kind string `json:"kind" url:"kind,key"` // type of domain name
1805 Status string `json:"status" url:"status,key"` // status of this record's cname
1806 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when domain was updated
1807 }
1808 type DomainCreateOpts struct {
1809 Hostname string `json:"hostname" url:"hostname,key"` // full hostname
1810 }
1811
1812 // Create a new domain.
1813 func (s *Service) DomainCreate(ctx context.Context, appIdentity string, o DomainCreateOpts) (*Domain, error) {
1814 var domain Domain
1815 return &domain, s.Post(ctx, &domain, fmt.Sprintf("/apps/%v/domains", appIdentity), o)
1816 }
1817
1818 // Delete an existing domain
1819 func (s *Service) DomainDelete(ctx context.Context, appIdentity string, domainIdentity string) (*Domain, error) {
1820 var domain Domain
1821 return &domain, s.Delete(ctx, &domain, fmt.Sprintf("/apps/%v/domains/%v", appIdentity, domainIdentity))
1822 }
1823
1824 // Info for existing domain.
1825 func (s *Service) DomainInfo(ctx context.Context, appIdentity string, domainIdentity string) (*Domain, error) {
1826 var domain Domain
1827 return &domain, s.Get(ctx, &domain, fmt.Sprintf("/apps/%v/domains/%v", appIdentity, domainIdentity), nil, nil)
1828 }
1829
1830 type DomainListResult []Domain
1831
1832 // List existing domains.
1833 func (s *Service) DomainList(ctx context.Context, appIdentity string, lr *ListRange) (DomainListResult, error) {
1834 var domain DomainListResult
1835 return domain, s.Get(ctx, &domain, fmt.Sprintf("/apps/%v/domains", appIdentity), nil, lr)
1836 }
1837
1838 // Dynos encapsulate running processes of an app on Heroku. Detailed
1839 // information about dyno sizes can be found at:
1840 // [https://devcenter.heroku.com/articles/dyno-types](https://devcenter.h
1841 // eroku.com/articles/dyno-types).
1842 type Dyno struct {
1843 App struct {
1844 ID string `json:"id" url:"id,key"` // unique identifier of app
1845 Name string `json:"name" url:"name,key"` // unique name of app
1846 } `json:"app" url:"app,key"` // app formation belongs to
1847 AttachURL *string `json:"attach_url" url:"attach_url,key"` // a URL to stream output from for attached processes or null for
1848 // non-attached processes
1849 Command string `json:"command" url:"command,key"` // command used to start this process
1850 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when dyno was created
1851 ID string `json:"id" url:"id,key"` // unique identifier of this dyno
1852 Name string `json:"name" url:"name,key"` // the name of this process on this dyno
1853 Release struct {
1854 ID string `json:"id" url:"id,key"` // unique identifier of release
1855 Version int `json:"version" url:"version,key"` // unique version assigned to the release
1856 } `json:"release" url:"release,key"` // app release of the dyno
1857 Size string `json:"size" url:"size,key"` // dyno size (default: "standard-1X")
1858 State string `json:"state" url:"state,key"` // current status of process (either: crashed, down, idle, starting, or
1859 // up)
1860 Type string `json:"type" url:"type,key"` // type of process
1861 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when process last changed state
1862 }
1863 type DynoCreateOpts struct {
1864 Attach *bool `json:"attach,omitempty" url:"attach,omitempty,key"` // whether to stream output or not
1865 Command string `json:"command" url:"command,key"` // command used to start this process
1866 Env map[string]string `json:"env,omitempty" url:"env,omitempty,key"` // custom environment to add to the dyno config vars
1867 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
1868 Size *string `json:"size,omitempty" url:"size,omitempty,key"` // dyno size (default: "standard-1X")
1869 TimeToLive *int `json:"time_to_live,omitempty" url:"time_to_live,omitempty,key"` // seconds until dyno expires, after which it will soon be killed
1870 Type *string `json:"type,omitempty" url:"type,omitempty,key"` // type of process
1871 }
1872
1873 // Create a new dyno.
1874 func (s *Service) DynoCreate(ctx context.Context, appIdentity string, o DynoCreateOpts) (*Dyno, error) {
1875 var dyno Dyno
1876 return &dyno, s.Post(ctx, &dyno, fmt.Sprintf("/apps/%v/dynos", appIdentity), o)
1877 }
1878
1879 type DynoRestartResult struct{}
1880
1881 // Restart dyno.
1882 func (s *Service) DynoRestart(ctx context.Context, appIdentity string, dynoIdentity string) (DynoRestartResult, error) {
1883 var dyno DynoRestartResult
1884 return dyno, s.Delete(ctx, &dyno, fmt.Sprintf("/apps/%v/dynos/%v", appIdentity, dynoIdentity))
1885 }
1886
1887 type DynoRestartAllResult struct{}
1888
1889 // Restart all dynos.
1890 func (s *Service) DynoRestartAll(ctx context.Context, appIdentity string) (DynoRestartAllResult, error) {
1891 var dyno DynoRestartAllResult
1892 return dyno, s.Delete(ctx, &dyno, fmt.Sprintf("/apps/%v/dynos", appIdentity))
1893 }
1894
1895 type DynoStopResult struct{}
1896
1897 // Stop dyno.
1898 func (s *Service) DynoStop(ctx context.Context, appIdentity string, dynoIdentity string) (DynoStopResult, error) {
1899 var dyno DynoStopResult
1900 return dyno, s.Post(ctx, &dyno, fmt.Sprintf("/apps/%v/dynos/%v/actions/stop", appIdentity, dynoIdentity), nil)
1901 }
1902
1903 // Info for existing dyno.
1904 func (s *Service) DynoInfo(ctx context.Context, appIdentity string, dynoIdentity string) (*Dyno, error) {
1905 var dyno Dyno
1906 return &dyno, s.Get(ctx, &dyno, fmt.Sprintf("/apps/%v/dynos/%v", appIdentity, dynoIdentity), nil, nil)
1907 }
1908
1909 type DynoListResult []Dyno
1910
1911 // List existing dynos.
1912 func (s *Service) DynoList(ctx context.Context, appIdentity string, lr *ListRange) (DynoListResult, error) {
1913 var dyno DynoListResult
1914 return dyno, s.Get(ctx, &dyno, fmt.Sprintf("/apps/%v/dynos", appIdentity), nil, lr)
1915 }
1916
1917 // Dyno sizes are the values and details of sizes that can be assigned
1918 // to dynos. This information can also be found at :
1919 // [https://devcenter.heroku.com/articles/dyno-types](https://devcenter.h
1920 // eroku.com/articles/dyno-types).
1921 type DynoSize struct {
1922 Compute int `json:"compute" url:"compute,key"` // minimum vCPUs, non-dedicated may get more depending on load
1923 Cost *struct{} `json:"cost" url:"cost,key"` // price information for this dyno size
1924 Dedicated bool `json:"dedicated" url:"dedicated,key"` // whether this dyno will be dedicated to one user
1925 DynoUnits int `json:"dyno_units" url:"dyno_units,key"` // unit of consumption for Heroku Enterprise customers
1926 ID string `json:"id" url:"id,key"` // unique identifier of this dyno size
1927 Memory float64 `json:"memory" url:"memory,key"` // amount of RAM in GB
1928 Name string `json:"name" url:"name,key"` // the name of this dyno-size
1929 PrivateSpaceOnly bool `json:"private_space_only" url:"private_space_only,key"` // whether this dyno can only be provisioned in a private space
1930 }
1931
1932 // Info for existing dyno size.
1933 func (s *Service) DynoSizeInfo(ctx context.Context, dynoSizeIdentity string) (*DynoSize, error) {
1934 var dynoSize DynoSize
1935 return &dynoSize, s.Get(ctx, &dynoSize, fmt.Sprintf("/dyno-sizes/%v", dynoSizeIdentity), nil, nil)
1936 }
1937
1938 type DynoSizeListResult []DynoSize
1939
1940 // List existing dyno sizes.
1941 func (s *Service) DynoSizeList(ctx context.Context, lr *ListRange) (DynoSizeListResult, error) {
1942 var dynoSize DynoSizeListResult
1943 return dynoSize, s.Get(ctx, &dynoSize, fmt.Sprintf("/dyno-sizes"), nil, lr)
1944 }
1945
1946 // Filters are special endpoints to allow for API consumers to specify a
1947 // subset of resources to consume in order to reduce the number of
1948 // requests that are performed. Each filter endpoint endpoint is
1949 // responsible for determining its supported request format. The
1950 // endpoints are over POST in order to handle large request bodies
1951 // without hitting request uri query length limitations, but the
1952 // requests themselves are idempotent and will not have side effects.
1953 type FilterApps struct{}
1954 type FilterAppsAppsOpts struct {
1955 In *struct {
1956 ID []*string `json:"id,omitempty" url:"id,omitempty,key"`
1957 } `json:"in,omitempty" url:"in,omitempty,key"`
1958 }
1959 type FilterAppsAppsResult []struct {
1960 ArchivedAt *time.Time `json:"archived_at" url:"archived_at,key"` // when app was archived
1961 BuildStack struct {
1962 ID string `json:"id" url:"id,key"` // unique identifier of stack
1963 Name string `json:"name" url:"name,key"` // unique name of stack
1964 } `json:"build_stack" url:"build_stack,key"` // identity of the stack that will be used for new builds
1965 BuildpackProvidedDescription *string `json:"buildpack_provided_description" url:"buildpack_provided_description,key"` // description from buildpack of app
1966 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app was created
1967 GitURL string `json:"git_url" url:"git_url,key"` // git repo URL of app
1968 ID string `json:"id" url:"id,key"` // unique identifier of app
1969 InternalRouting *bool `json:"internal_routing" url:"internal_routing,key"` // describes whether a Private Spaces app is externally routable or not
1970 Joined bool `json:"joined" url:"joined,key"` // is the current member a collaborator on this app.
1971 Locked bool `json:"locked" url:"locked,key"` // are other team members forbidden from joining this app.
1972 Maintenance bool `json:"maintenance" url:"maintenance,key"` // maintenance status of app
1973 Name string `json:"name" url:"name,key"` // unique name of app
1974 Owner *struct {
1975 Email string `json:"email" url:"email,key"` // unique email address of account
1976 ID string `json:"id" url:"id,key"` // unique identifier of an account
1977 } `json:"owner" url:"owner,key"` // identity of app owner
1978 Region struct {
1979 ID string `json:"id" url:"id,key"` // unique identifier of region
1980 Name string `json:"name" url:"name,key"` // unique name of region
1981 } `json:"region" url:"region,key"` // identity of app region
1982 ReleasedAt *time.Time `json:"released_at" url:"released_at,key"` // when app was released
1983 RepoSize *int `json:"repo_size" url:"repo_size,key"` // git repo size in bytes of app
1984 SlugSize *int `json:"slug_size" url:"slug_size,key"` // slug size in bytes of app
1985 Space *struct {
1986 ID string `json:"id" url:"id,key"` // unique identifier of space
1987 Name string `json:"name" url:"name,key"` // unique name of space
1988 } `json:"space" url:"space,key"` // identity of space
1989 Stack struct {
1990 ID string `json:"id" url:"id,key"` // unique identifier of stack
1991 Name string `json:"name" url:"name,key"` // unique name of stack
1992 } `json:"stack" url:"stack,key"` // identity of app stack
1993 Team *struct {
1994 Name string `json:"name" url:"name,key"` // unique name of team
1995 } `json:"team" url:"team,key"` // team that owns this app
1996 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app was updated
1997 WebURL string `json:"web_url" url:"web_url,key"` // web URL of app
1998 }
1999
2000 // Request an apps list filtered by app id.
2001 func (s *Service) FilterAppsApps(ctx context.Context, o FilterAppsAppsOpts) (FilterAppsAppsResult, error) {
2002 var filterApps FilterAppsAppsResult
2003 return filterApps, s.Post(ctx, &filterApps, fmt.Sprintf("/filters/apps"), o)
2004 }
2005
2006 // The formation of processes that should be maintained for an app.
2007 // Update the formation to scale processes or change dyno sizes.
2008 // Available process type names and commands are defined by the
2009 // `process_types` attribute for the [slug](#slug) currently released on
2010 // an app.
2011 type Formation struct {
2012 App struct {
2013 ID string `json:"id" url:"id,key"` // unique identifier of app
2014 Name string `json:"name" url:"name,key"` // unique name of app
2015 } `json:"app" url:"app,key"` // app formation belongs to
2016 Command string `json:"command" url:"command,key"` // command to use to launch this process
2017 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when process type was created
2018 ID string `json:"id" url:"id,key"` // unique identifier of this process type
2019 Quantity int `json:"quantity" url:"quantity,key"` // number of processes to maintain
2020 Size string `json:"size" url:"size,key"` // dyno size (default: "standard-1X")
2021 Type string `json:"type" url:"type,key"` // type of process to maintain
2022 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when dyno type was updated
2023 }
2024
2025 // Info for a process type
2026 func (s *Service) FormationInfo(ctx context.Context, appIdentity string, formationIdentity string) (*Formation, error) {
2027 var formation Formation
2028 return &formation, s.Get(ctx, &formation, fmt.Sprintf("/apps/%v/formation/%v", appIdentity, formationIdentity), nil, nil)
2029 }
2030
2031 type FormationListResult []Formation
2032
2033 // List process type formation
2034 func (s *Service) FormationList(ctx context.Context, appIdentity string, lr *ListRange) (FormationListResult, error) {
2035 var formation FormationListResult
2036 return formation, s.Get(ctx, &formation, fmt.Sprintf("/apps/%v/formation", appIdentity), nil, lr)
2037 }
2038
2039 type FormationBatchUpdateOpts struct {
2040 Updates []struct {
2041 Quantity *int `json:"quantity,omitempty" url:"quantity,omitempty,key"` // number of processes to maintain
2042 Size *string `json:"size,omitempty" url:"size,omitempty,key"` // dyno size (default: "standard-1X")
2043 Type string `json:"type" url:"type,key"` // type of process to maintain
2044 } `json:"updates" url:"updates,key"` // Array with formation updates. Each element must have "type", the id
2045 // or name of the process type to be updated, and can optionally update
2046 // its "quantity" or "size".
2047 }
2048 type FormationBatchUpdateResult []Formation
2049
2050 // Batch update process types
2051 func (s *Service) FormationBatchUpdate(ctx context.Context, appIdentity string, o FormationBatchUpdateOpts) (FormationBatchUpdateResult, error) {
2052 var formation FormationBatchUpdateResult
2053 return formation, s.Patch(ctx, &formation, fmt.Sprintf("/apps/%v/formation", appIdentity), o)
2054 }
2055
2056 type FormationUpdateOpts struct {
2057 Quantity *int `json:"quantity,omitempty" url:"quantity,omitempty,key"` // number of processes to maintain
2058 Size *string `json:"size,omitempty" url:"size,omitempty,key"` // dyno size (default: "standard-1X")
2059 }
2060
2061 // Update process type
2062 func (s *Service) FormationUpdate(ctx context.Context, appIdentity string, formationIdentity string, o FormationUpdateOpts) (*Formation, error) {
2063 var formation Formation
2064 return &formation, s.Patch(ctx, &formation, fmt.Sprintf("/apps/%v/formation/%v", appIdentity, formationIdentity), o)
2065 }
2066
2067 // Identity Providers represent the SAML configuration of an
2068 // Organization.
2069 type IdentityProvider struct {
2070 Certificate string `json:"certificate" url:"certificate,key"` // raw contents of the public certificate (eg: .crt or .pem file)
2071 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when provider record was created
2072 EntityID string `json:"entity_id" url:"entity_id,key"` // URL identifier provided by the identity provider
2073 ID string `json:"id" url:"id,key"` // unique identifier of this identity provider
2074 Organization *struct {
2075 Name string `json:"name" url:"name,key"` // unique name of organization
2076 } `json:"organization" url:"organization,key"` // organization associated with this identity provider
2077 Owner struct {
2078 ID string `json:"id" url:"id,key"` // unique identifier of the owner
2079 Name string `json:"name" url:"name,key"` // name of the owner
2080 Type string `json:"type" url:"type,key"` // type of the owner
2081 } `json:"owner" url:"owner,key"` // entity that owns this identity provider
2082 SloTargetURL string `json:"slo_target_url" url:"slo_target_url,key"` // single log out URL for this identity provider
2083 SsoTargetURL string `json:"sso_target_url" url:"sso_target_url,key"` // single sign on URL for this identity provider
2084 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the identity provider record was updated
2085 }
2086 type IdentityProviderListByOrganizationResult []IdentityProvider
2087
2088 // Get a list of an organization's Identity Providers
2089 func (s *Service) IdentityProviderListByOrganization(ctx context.Context, organizationName string, lr *ListRange) (IdentityProviderListByOrganizationResult, error) {
2090 var identityProvider IdentityProviderListByOrganizationResult
2091 return identityProvider, s.Get(ctx, &identityProvider, fmt.Sprintf("/organizations/%v/identity-providers", organizationName), nil, lr)
2092 }
2093
2094 type IdentityProviderCreateByOrganizationOpts struct {
2095 Certificate string `json:"certificate" url:"certificate,key"` // raw contents of the public certificate (eg: .crt or .pem file)
2096 EntityID string `json:"entity_id" url:"entity_id,key"` // URL identifier provided by the identity provider
2097 SloTargetURL *string `json:"slo_target_url,omitempty" url:"slo_target_url,omitempty,key"` // single log out URL for this identity provider
2098 SsoTargetURL string `json:"sso_target_url" url:"sso_target_url,key"` // single sign on URL for this identity provider
2099 }
2100
2101 // Create an Identity Provider for an organization
2102 func (s *Service) IdentityProviderCreateByOrganization(ctx context.Context, organizationName string, o IdentityProviderCreateByOrganizationOpts) (*IdentityProvider, error) {
2103 var identityProvider IdentityProvider
2104 return &identityProvider, s.Post(ctx, &identityProvider, fmt.Sprintf("/organizations/%v/identity-providers", organizationName), o)
2105 }
2106
2107 type IdentityProviderUpdateByOrganizationOpts struct {
2108 Certificate *string `json:"certificate,omitempty" url:"certificate,omitempty,key"` // raw contents of the public certificate (eg: .crt or .pem file)
2109 EntityID *string `json:"entity_id,omitempty" url:"entity_id,omitempty,key"` // URL identifier provided by the identity provider
2110 SloTargetURL *string `json:"slo_target_url,omitempty" url:"slo_target_url,omitempty,key"` // single log out URL for this identity provider
2111 SsoTargetURL *string `json:"sso_target_url,omitempty" url:"sso_target_url,omitempty,key"` // single sign on URL for this identity provider
2112 }
2113
2114 // Update an organization's Identity Provider
2115 func (s *Service) IdentityProviderUpdateByOrganization(ctx context.Context, organizationName string, identityProviderID string, o IdentityProviderUpdateByOrganizationOpts) (*IdentityProvider, error) {
2116 var identityProvider IdentityProvider
2117 return &identityProvider, s.Patch(ctx, &identityProvider, fmt.Sprintf("/organizations/%v/identity-providers/%v", organizationName, identityProviderID), o)
2118 }
2119
2120 // Delete an organization's Identity Provider
2121 func (s *Service) IdentityProviderDeleteByOrganization(ctx context.Context, organizationName string, identityProviderID string) (*IdentityProvider, error) {
2122 var identityProvider IdentityProvider
2123 return &identityProvider, s.Delete(ctx, &identityProvider, fmt.Sprintf("/organizations/%v/identity-providers/%v", organizationName, identityProviderID))
2124 }
2125
2126 type IdentityProviderListByTeamResult []IdentityProvider
2127
2128 // Get a list of a team's Identity Providers
2129 func (s *Service) IdentityProviderListByTeam(ctx context.Context, teamIdentity string, lr *ListRange) (IdentityProviderListByTeamResult, error) {
2130 var identityProvider IdentityProviderListByTeamResult
2131 return identityProvider, s.Get(ctx, &identityProvider, fmt.Sprintf("/teams/%v/identity-providers", teamIdentity), nil, lr)
2132 }
2133
2134 type IdentityProviderCreateByTeamOpts struct {
2135 Certificate string `json:"certificate" url:"certificate,key"` // raw contents of the public certificate (eg: .crt or .pem file)
2136 EntityID string `json:"entity_id" url:"entity_id,key"` // URL identifier provided by the identity provider
2137 SloTargetURL *string `json:"slo_target_url,omitempty" url:"slo_target_url,omitempty,key"` // single log out URL for this identity provider
2138 SsoTargetURL string `json:"sso_target_url" url:"sso_target_url,key"` // single sign on URL for this identity provider
2139 }
2140
2141 // Create an Identity Provider for a team
2142 func (s *Service) IdentityProviderCreateByTeam(ctx context.Context, teamIdentity string, o IdentityProviderCreateByTeamOpts) (*IdentityProvider, error) {
2143 var identityProvider IdentityProvider
2144 return &identityProvider, s.Post(ctx, &identityProvider, fmt.Sprintf("/teams/%v/identity-providers", teamIdentity), o)
2145 }
2146
2147 type IdentityProviderUpdateByTeamOpts struct {
2148 Certificate *string `json:"certificate,omitempty" url:"certificate,omitempty,key"` // raw contents of the public certificate (eg: .crt or .pem file)
2149 EntityID *string `json:"entity_id,omitempty" url:"entity_id,omitempty,key"` // URL identifier provided by the identity provider
2150 SloTargetURL *string `json:"slo_target_url,omitempty" url:"slo_target_url,omitempty,key"` // single log out URL for this identity provider
2151 SsoTargetURL *string `json:"sso_target_url,omitempty" url:"sso_target_url,omitempty,key"` // single sign on URL for this identity provider
2152 }
2153
2154 // Update a team's Identity Provider
2155 func (s *Service) IdentityProviderUpdateByTeam(ctx context.Context, teamIdentity string, identityProviderID string, o IdentityProviderUpdateByTeamOpts) (*IdentityProvider, error) {
2156 var identityProvider IdentityProvider
2157 return &identityProvider, s.Patch(ctx, &identityProvider, fmt.Sprintf("/teams/%v/identity-providers/%v", teamIdentity, identityProviderID), o)
2158 }
2159
2160 // Delete a team's Identity Provider
2161 func (s *Service) IdentityProviderDeleteByTeam(ctx context.Context, teamName string, identityProviderID string) (*IdentityProvider, error) {
2162 var identityProvider IdentityProvider
2163 return &identityProvider, s.Delete(ctx, &identityProvider, fmt.Sprintf("/teams/%v/identity-providers/%v", teamName, identityProviderID))
2164 }
2165
2166 // An inbound-ruleset is a collection of rules that specify what hosts
2167 // can or cannot connect to an application.
2168 type InboundRuleset struct {
2169 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when inbound-ruleset was created
2170 CreatedBy string `json:"created_by" url:"created_by,key"` // unique email address of account
2171 ID string `json:"id" url:"id,key"` // unique identifier of an inbound-ruleset
2172 Rules []struct {
2173 Action string `json:"action" url:"action,key"` // states whether the connection is allowed or denied
2174 Source string `json:"source" url:"source,key"` // is the request’s source in CIDR notation
2175 } `json:"rules" url:"rules,key"`
2176 Space struct {
2177 ID string `json:"id" url:"id,key"` // unique identifier of space
2178 Name string `json:"name" url:"name,key"` // unique name of space
2179 } `json:"space" url:"space,key"` // identity of space
2180 }
2181
2182 // Current inbound ruleset for a space
2183 func (s *Service) InboundRulesetCurrent(ctx context.Context, spaceIdentity string) (*InboundRuleset, error) {
2184 var inboundRuleset InboundRuleset
2185 return &inboundRuleset, s.Get(ctx, &inboundRuleset, fmt.Sprintf("/spaces/%v/inbound-ruleset", spaceIdentity), nil, nil)
2186 }
2187
2188 // Info on an existing Inbound Ruleset
2189 func (s *Service) InboundRulesetInfo(ctx context.Context, spaceIdentity string, inboundRulesetIdentity string) (*InboundRuleset, error) {
2190 var inboundRuleset InboundRuleset
2191 return &inboundRuleset, s.Get(ctx, &inboundRuleset, fmt.Sprintf("/spaces/%v/inbound-rulesets/%v", spaceIdentity, inboundRulesetIdentity), nil, nil)
2192 }
2193
2194 type InboundRulesetListResult []InboundRuleset
2195
2196 // List all inbound rulesets for a space
2197 func (s *Service) InboundRulesetList(ctx context.Context, spaceIdentity string, lr *ListRange) (InboundRulesetListResult, error) {
2198 var inboundRuleset InboundRulesetListResult
2199 return inboundRuleset, s.Get(ctx, &inboundRuleset, fmt.Sprintf("/spaces/%v/inbound-rulesets", spaceIdentity), nil, lr)
2200 }
2201
2202 type InboundRulesetCreateOpts struct {
2203 Rules []*struct {
2204 Action string `json:"action" url:"action,key"` // states whether the connection is allowed or denied
2205 Source string `json:"source" url:"source,key"` // is the request’s source in CIDR notation
2206 } `json:"rules,omitempty" url:"rules,omitempty,key"`
2207 }
2208
2209 // Create a new inbound ruleset
2210 func (s *Service) InboundRulesetCreate(ctx context.Context, spaceIdentity string, o InboundRulesetCreateOpts) (*InboundRuleset, error) {
2211 var inboundRuleset InboundRuleset
2212 return &inboundRuleset, s.Put(ctx, &inboundRuleset, fmt.Sprintf("/spaces/%v/inbound-ruleset", spaceIdentity), o)
2213 }
2214
2215 // An invoice is an itemized bill of goods for an account which includes
2216 // pricing and charges.
2217 type Invoice struct {
2218 ChargesTotal float64 `json:"charges_total" url:"charges_total,key"` // total charges on this invoice
2219 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when invoice was created
2220 CreditsTotal float64 `json:"credits_total" url:"credits_total,key"` // total credits on this invoice
2221 ID string `json:"id" url:"id,key"` // unique identifier of this invoice
2222 Number int `json:"number" url:"number,key"` // human readable invoice number
2223 PeriodEnd string `json:"period_end" url:"period_end,key"` // the ending date that the invoice covers
2224 PeriodStart string `json:"period_start" url:"period_start,key"` // the starting date that this invoice covers
2225 State int `json:"state" url:"state,key"` // payment status for this invoice (pending, successful, failed)
2226 Total float64 `json:"total" url:"total,key"` // combined total of charges and credits on this invoice
2227 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when invoice was updated
2228 }
2229
2230 // Info for existing invoice.
2231 func (s *Service) InvoiceInfo(ctx context.Context, invoiceIdentity int) (*Invoice, error) {
2232 var invoice Invoice
2233 return &invoice, s.Get(ctx, &invoice, fmt.Sprintf("/account/invoices/%v", invoiceIdentity), nil, nil)
2234 }
2235
2236 type InvoiceListResult []Invoice
2237
2238 // List existing invoices.
2239 func (s *Service) InvoiceList(ctx context.Context, lr *ListRange) (InvoiceListResult, error) {
2240 var invoice InvoiceListResult
2241 return invoice, s.Get(ctx, &invoice, fmt.Sprintf("/account/invoices"), nil, lr)
2242 }
2243
2244 // An invoice address represents the address that should be listed on an
2245 // invoice.
2246 type InvoiceAddress struct {
2247 Address1 string `json:"address_1" url:"address_1,key"` // invoice street address line 1
2248 Address2 string `json:"address_2" url:"address_2,key"` // invoice street address line 2
2249 City string `json:"city" url:"city,key"` // invoice city
2250 Country string `json:"country" url:"country,key"` // country
2251 HerokuID string `json:"heroku_id" url:"heroku_id,key"` // heroku_id identifier reference
2252 Other string `json:"other" url:"other,key"` // metadata / additional information to go on invoice
2253 PostalCode string `json:"postal_code" url:"postal_code,key"` // invoice zip code
2254 State string `json:"state" url:"state,key"` // invoice state
2255 UseInvoiceAddress bool `json:"use_invoice_address" url:"use_invoice_address,key"` // flag to use the invoice address for an account or not
2256 }
2257
2258 // Retrieve existing invoice address.
2259 func (s *Service) InvoiceAddressInfo(ctx context.Context) (*InvoiceAddress, error) {
2260 var invoiceAddress InvoiceAddress
2261 return &invoiceAddress, s.Get(ctx, &invoiceAddress, fmt.Sprintf("/account/invoice-address"), nil, nil)
2262 }
2263
2264 type InvoiceAddressUpdateOpts struct {
2265 Address1 *string `json:"address_1,omitempty" url:"address_1,omitempty,key"` // invoice street address line 1
2266 Address2 *string `json:"address_2,omitempty" url:"address_2,omitempty,key"` // invoice street address line 2
2267 City *string `json:"city,omitempty" url:"city,omitempty,key"` // invoice city
2268 Country *string `json:"country,omitempty" url:"country,omitempty,key"` // country
2269 Other *string `json:"other,omitempty" url:"other,omitempty,key"` // metadata / additional information to go on invoice
2270 PostalCode *string `json:"postal_code,omitempty" url:"postal_code,omitempty,key"` // invoice zip code
2271 State *string `json:"state,omitempty" url:"state,omitempty,key"` // invoice state
2272 UseInvoiceAddress *bool `json:"use_invoice_address,omitempty" url:"use_invoice_address,omitempty,key"` // flag to use the invoice address for an account or not
2273 }
2274
2275 // Update invoice address for an account.
2276 func (s *Service) InvoiceAddressUpdate(ctx context.Context, o InvoiceAddressUpdateOpts) (*InvoiceAddress, error) {
2277 var invoiceAddress InvoiceAddress
2278 return &invoiceAddress, s.Put(ctx, &invoiceAddress, fmt.Sprintf("/account/invoice-address"), o)
2279 }
2280
2281 // Keys represent public SSH keys associated with an account and are
2282 // used to authorize accounts as they are performing git operations.
2283 type Key struct {
2284 Comment string `json:"comment" url:"comment,key"` // comment on the key
2285 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when key was created
2286 Email string `json:"email" url:"email,key"` // deprecated. Please refer to 'comment' instead
2287 Fingerprint string `json:"fingerprint" url:"fingerprint,key"` // a unique identifying string based on contents
2288 ID string `json:"id" url:"id,key"` // unique identifier of this key
2289 PublicKey string `json:"public_key" url:"public_key,key"` // full public_key as uploaded
2290 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when key was updated
2291 }
2292
2293 // Info for existing key.
2294 func (s *Service) KeyInfo(ctx context.Context, keyIdentity string) (*Key, error) {
2295 var key Key
2296 return &key, s.Get(ctx, &key, fmt.Sprintf("/account/keys/%v", keyIdentity), nil, nil)
2297 }
2298
2299 type KeyListResult []Key
2300
2301 // List existing keys.
2302 func (s *Service) KeyList(ctx context.Context, lr *ListRange) (KeyListResult, error) {
2303 var key KeyListResult
2304 return key, s.Get(ctx, &key, fmt.Sprintf("/account/keys"), nil, lr)
2305 }
2306
2307 // [Log drains](https://devcenter.heroku.com/articles/log-drains)
2308 // provide a way to forward your Heroku logs to an external syslog
2309 // server for long-term archiving. This external service must be
2310 // configured to receive syslog packets from Heroku, whereupon its URL
2311 // can be added to an app using this API. Some add-ons will add a log
2312 // drain when they are provisioned to an app. These drains can only be
2313 // removed by removing the add-on.
2314 type LogDrain struct {
2315 Addon *struct {
2316 ID string `json:"id" url:"id,key"` // unique identifier of add-on
2317 Name string `json:"name" url:"name,key"` // globally unique name of the add-on
2318 } `json:"addon" url:"addon,key"` // add-on that created the drain
2319 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when log drain was created
2320 ID string `json:"id" url:"id,key"` // unique identifier of this log drain
2321 Token string `json:"token" url:"token,key"` // token associated with the log drain
2322 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when log drain was updated
2323 URL string `json:"url" url:"url,key"` // url associated with the log drain
2324 }
2325 type LogDrainCreateOpts struct {
2326 URL string `json:"url" url:"url,key"` // url associated with the log drain
2327 }
2328
2329 // Create a new log drain.
2330 func (s *Service) LogDrainCreate(ctx context.Context, appIdentity string, o LogDrainCreateOpts) (*LogDrain, error) {
2331 var logDrain LogDrain
2332 return &logDrain, s.Post(ctx, &logDrain, fmt.Sprintf("/apps/%v/log-drains", appIdentity), o)
2333 }
2334
2335 type LogDrainUpdateOpts struct {
2336 URL string `json:"url" url:"url,key"` // url associated with the log drain
2337 }
2338
2339 // Update an add-on owned log drain.
2340 func (s *Service) LogDrainUpdate(ctx context.Context, addOnIdentity string, logDrainQueryIdentity string, o LogDrainUpdateOpts) (*LogDrain, error) {
2341 var logDrain LogDrain
2342 return &logDrain, s.Put(ctx, &logDrain, fmt.Sprintf("/addons/%v/log-drains/%v", addOnIdentity, logDrainQueryIdentity), o)
2343 }
2344
2345 // Delete an existing log drain. Log drains added by add-ons can only be
2346 // removed by removing the add-on.
2347 func (s *Service) LogDrainDelete(ctx context.Context, appIdentity string, logDrainQueryIdentity string) (*LogDrain, error) {
2348 var logDrain LogDrain
2349 return &logDrain, s.Delete(ctx, &logDrain, fmt.Sprintf("/apps/%v/log-drains/%v", appIdentity, logDrainQueryIdentity))
2350 }
2351
2352 // Info for existing log drain.
2353 func (s *Service) LogDrainInfo(ctx context.Context, appIdentity string, logDrainQueryIdentity string) (*LogDrain, error) {
2354 var logDrain LogDrain
2355 return &logDrain, s.Get(ctx, &logDrain, fmt.Sprintf("/apps/%v/log-drains/%v", appIdentity, logDrainQueryIdentity), nil, nil)
2356 }
2357
2358 type LogDrainListByAddOnResult []LogDrain
2359
2360 // List existing log drains for an add-on.
2361 func (s *Service) LogDrainListByAddOn(ctx context.Context, addOnIdentity string, lr *ListRange) (LogDrainListByAddOnResult, error) {
2362 var logDrain LogDrainListByAddOnResult
2363 return logDrain, s.Get(ctx, &logDrain, fmt.Sprintf("/addons/%v/log-drains", addOnIdentity), nil, lr)
2364 }
2365
2366 type LogDrainListResult []LogDrain
2367
2368 // List existing log drains.
2369 func (s *Service) LogDrainList(ctx context.Context, appIdentity string, lr *ListRange) (LogDrainListResult, error) {
2370 var logDrain LogDrainListResult
2371 return logDrain, s.Get(ctx, &logDrain, fmt.Sprintf("/apps/%v/log-drains", appIdentity), nil, lr)
2372 }
2373
2374 // A log session is a reference to the http based log stream for an app.
2375 type LogSession struct {
2376 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when log connection was created
2377 ID string `json:"id" url:"id,key"` // unique identifier of this log session
2378 LogplexURL string `json:"logplex_url" url:"logplex_url,key"` // URL for log streaming session
2379 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when log session was updated
2380 }
2381 type LogSessionCreateOpts struct {
2382 Dyno *string `json:"dyno,omitempty" url:"dyno,omitempty,key"` // dyno to limit results to
2383 Lines *int `json:"lines,omitempty" url:"lines,omitempty,key"` // number of log lines to stream at once
2384 Source *string `json:"source,omitempty" url:"source,omitempty,key"` // log source to limit results to
2385 Tail *bool `json:"tail,omitempty" url:"tail,omitempty,key"` // whether to stream ongoing logs
2386 }
2387
2388 // Create a new log session.
2389 func (s *Service) LogSessionCreate(ctx context.Context, appIdentity string, o LogSessionCreateOpts) (*LogSession, error) {
2390 var logSession LogSession
2391 return &logSession, s.Post(ctx, &logSession, fmt.Sprintf("/apps/%v/log-sessions", appIdentity), o)
2392 }
2393
2394 // OAuth authorizations represent clients that a Heroku user has
2395 // authorized to automate, customize or extend their usage of the
2396 // platform. For more information please refer to the [Heroku OAuth
2397 // documentation](https://devcenter.heroku.com/articles/oauth)
2398 type OAuthAuthorization struct {
2399 AccessToken *struct {
2400 ExpiresIn *int `json:"expires_in" url:"expires_in,key"` // seconds until OAuth token expires; may be `null` for tokens with
2401 // indefinite lifetime
2402 ID string `json:"id" url:"id,key"` // unique identifier of OAuth token
2403 Token string `json:"token" url:"token,key"` // contents of the token to be used for authorization
2404 } `json:"access_token" url:"access_token,key"` // access token for this authorization
2405 Client *struct {
2406 ID string `json:"id" url:"id,key"` // unique identifier of this OAuth client
2407 Name string `json:"name" url:"name,key"` // OAuth client name
2408 RedirectURI string `json:"redirect_uri" url:"redirect_uri,key"` // endpoint for redirection after authorization with OAuth client
2409 } `json:"client" url:"client,key"` // identifier of the client that obtained this authorization, if any
2410 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when OAuth authorization was created
2411 Grant *struct {
2412 Code string `json:"code" url:"code,key"` // grant code received from OAuth web application authorization
2413 ExpiresIn int `json:"expires_in" url:"expires_in,key"` // seconds until OAuth grant expires
2414 ID string `json:"id" url:"id,key"` // unique identifier of OAuth grant
2415 } `json:"grant" url:"grant,key"` // this authorization's grant
2416 ID string `json:"id" url:"id,key"` // unique identifier of OAuth authorization
2417 RefreshToken *struct {
2418 ExpiresIn *int `json:"expires_in" url:"expires_in,key"` // seconds until OAuth token expires; may be `null` for tokens with
2419 // indefinite lifetime
2420 ID string `json:"id" url:"id,key"` // unique identifier of OAuth token
2421 Token string `json:"token" url:"token,key"` // contents of the token to be used for authorization
2422 } `json:"refresh_token" url:"refresh_token,key"` // refresh token for this authorization
2423 Scope []string `json:"scope" url:"scope,key"` // The scope of access OAuth authorization allows
2424 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when OAuth authorization was updated
2425 User struct {
2426 Email string `json:"email" url:"email,key"` // unique email address of account
2427 FullName *string `json:"full_name" url:"full_name,key"` // full name of the account owner
2428 ID string `json:"id" url:"id,key"` // unique identifier of an account
2429 } `json:"user" url:"user,key"` // authenticated user associated with this authorization
2430 }
2431 type OAuthAuthorizationCreateOpts struct {
2432 Client *string `json:"client,omitempty" url:"client,omitempty,key"` // unique identifier of this OAuth client
2433 Description *string `json:"description,omitempty" url:"description,omitempty,key"` // human-friendly description of this OAuth authorization
2434 ExpiresIn *int `json:"expires_in,omitempty" url:"expires_in,omitempty,key"` // seconds until OAuth token expires; may be `null` for tokens with
2435 // indefinite lifetime
2436 Scope []string `json:"scope" url:"scope,key"` // The scope of access OAuth authorization allows
2437 }
2438
2439 // Create a new OAuth authorization.
2440 func (s *Service) OAuthAuthorizationCreate(ctx context.Context, o OAuthAuthorizationCreateOpts) (*OAuthAuthorization, error) {
2441 var oauthAuthorization OAuthAuthorization
2442 return &oauthAuthorization, s.Post(ctx, &oauthAuthorization, fmt.Sprintf("/oauth/authorizations"), o)
2443 }
2444
2445 // Delete OAuth authorization.
2446 func (s *Service) OAuthAuthorizationDelete(ctx context.Context, oauthAuthorizationIdentity string) (*OAuthAuthorization, error) {
2447 var oauthAuthorization OAuthAuthorization
2448 return &oauthAuthorization, s.Delete(ctx, &oauthAuthorization, fmt.Sprintf("/oauth/authorizations/%v", oauthAuthorizationIdentity))
2449 }
2450
2451 // Info for an OAuth authorization.
2452 func (s *Service) OAuthAuthorizationInfo(ctx context.Context, oauthAuthorizationIdentity string) (*OAuthAuthorization, error) {
2453 var oauthAuthorization OAuthAuthorization
2454 return &oauthAuthorization, s.Get(ctx, &oauthAuthorization, fmt.Sprintf("/oauth/authorizations/%v", oauthAuthorizationIdentity), nil, nil)
2455 }
2456
2457 type OAuthAuthorizationListResult []OAuthAuthorization
2458
2459 // List OAuth authorizations.
2460 func (s *Service) OAuthAuthorizationList(ctx context.Context, lr *ListRange) (OAuthAuthorizationListResult, error) {
2461 var oauthAuthorization OAuthAuthorizationListResult
2462 return oauthAuthorization, s.Get(ctx, &oauthAuthorization, fmt.Sprintf("/oauth/authorizations"), nil, lr)
2463 }
2464
2465 // Regenerate OAuth tokens. This endpoint is only available to direct
2466 // authorizations or privileged OAuth clients.
2467 func (s *Service) OAuthAuthorizationRegenerate(ctx context.Context, oauthAuthorizationIdentity string) (*OAuthAuthorization, error) {
2468 var oauthAuthorization OAuthAuthorization
2469 return &oauthAuthorization, s.Post(ctx, &oauthAuthorization, fmt.Sprintf("/oauth/authorizations/%v/actions/regenerate-tokens", oauthAuthorizationIdentity), nil)
2470 }
2471
2472 // OAuth clients are applications that Heroku users can authorize to
2473 // automate, customize or extend their usage of the platform. For more
2474 // information please refer to the [Heroku OAuth
2475 // documentation](https://devcenter.heroku.com/articles/oauth).
2476 type OAuthClient struct {
2477 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when OAuth client was created
2478 ID string `json:"id" url:"id,key"` // unique identifier of this OAuth client
2479 IgnoresDelinquent *bool `json:"ignores_delinquent" url:"ignores_delinquent,key"` // whether the client is still operable given a delinquent account
2480 Name string `json:"name" url:"name,key"` // OAuth client name
2481 RedirectURI string `json:"redirect_uri" url:"redirect_uri,key"` // endpoint for redirection after authorization with OAuth client
2482 Secret string `json:"secret" url:"secret,key"` // secret used to obtain OAuth authorizations under this client
2483 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when OAuth client was updated
2484 }
2485 type OAuthClientCreateOpts struct {
2486 Name string `json:"name" url:"name,key"` // OAuth client name
2487 RedirectURI string `json:"redirect_uri" url:"redirect_uri,key"` // endpoint for redirection after authorization with OAuth client
2488 }
2489
2490 // Create a new OAuth client.
2491 func (s *Service) OAuthClientCreate(ctx context.Context, o OAuthClientCreateOpts) (*OAuthClient, error) {
2492 var oauthClient OAuthClient
2493 return &oauthClient, s.Post(ctx, &oauthClient, fmt.Sprintf("/oauth/clients"), o)
2494 }
2495
2496 // Delete OAuth client.
2497 func (s *Service) OAuthClientDelete(ctx context.Context, oauthClientIdentity string) (*OAuthClient, error) {
2498 var oauthClient OAuthClient
2499 return &oauthClient, s.Delete(ctx, &oauthClient, fmt.Sprintf("/oauth/clients/%v", oauthClientIdentity))
2500 }
2501
2502 // Info for an OAuth client
2503 func (s *Service) OAuthClientInfo(ctx context.Context, oauthClientIdentity string) (*OAuthClient, error) {
2504 var oauthClient OAuthClient
2505 return &oauthClient, s.Get(ctx, &oauthClient, fmt.Sprintf("/oauth/clients/%v", oauthClientIdentity), nil, nil)
2506 }
2507
2508 type OAuthClientListResult []OAuthClient
2509
2510 // List OAuth clients
2511 func (s *Service) OAuthClientList(ctx context.Context, lr *ListRange) (OAuthClientListResult, error) {
2512 var oauthClient OAuthClientListResult
2513 return oauthClient, s.Get(ctx, &oauthClient, fmt.Sprintf("/oauth/clients"), nil, lr)
2514 }
2515
2516 type OAuthClientUpdateOpts struct {
2517 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // OAuth client name
2518 RedirectURI *string `json:"redirect_uri,omitempty" url:"redirect_uri,omitempty,key"` // endpoint for redirection after authorization with OAuth client
2519 }
2520
2521 // Update OAuth client
2522 func (s *Service) OAuthClientUpdate(ctx context.Context, oauthClientIdentity string, o OAuthClientUpdateOpts) (*OAuthClient, error) {
2523 var oauthClient OAuthClient
2524 return &oauthClient, s.Patch(ctx, &oauthClient, fmt.Sprintf("/oauth/clients/%v", oauthClientIdentity), o)
2525 }
2526
2527 // Rotate credentials for an OAuth client
2528 func (s *Service) OAuthClientRotateCredentials(ctx context.Context, oauthClientIdentity string) (*OAuthClient, error) {
2529 var oauthClient OAuthClient
2530 return &oauthClient, s.Post(ctx, &oauthClient, fmt.Sprintf("/oauth/clients/%v/actions/rotate-credentials", oauthClientIdentity), nil)
2531 }
2532
2533 // OAuth grants are used to obtain authorizations on behalf of a user.
2534 // For more information please refer to the [Heroku OAuth
2535 // documentation](https://devcenter.heroku.com/articles/oauth)
2536 type OAuthGrant struct{}
2537
2538 // OAuth tokens provide access for authorized clients to act on behalf
2539 // of a Heroku user to automate, customize or extend their usage of the
2540 // platform. For more information please refer to the [Heroku OAuth
2541 // documentation](https://devcenter.heroku.com/articles/oauth)
2542 type OAuthToken struct {
2543 AccessToken struct {
2544 ExpiresIn *int `json:"expires_in" url:"expires_in,key"` // seconds until OAuth token expires; may be `null` for tokens with
2545 // indefinite lifetime
2546 ID string `json:"id" url:"id,key"` // unique identifier of OAuth token
2547 Token string `json:"token" url:"token,key"` // contents of the token to be used for authorization
2548 } `json:"access_token" url:"access_token,key"` // current access token
2549 Authorization struct {
2550 ID string `json:"id" url:"id,key"` // unique identifier of OAuth authorization
2551 } `json:"authorization" url:"authorization,key"` // authorization for this set of tokens
2552 Client *struct {
2553 Secret string `json:"secret" url:"secret,key"` // secret used to obtain OAuth authorizations under this client
2554 } `json:"client" url:"client,key"` // OAuth client secret used to obtain token
2555 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when OAuth token was created
2556 Grant struct {
2557 Code string `json:"code" url:"code,key"` // grant code received from OAuth web application authorization
2558 Type string `json:"type" url:"type,key"` // type of grant requested, one of `authorization_code` or
2559 // `refresh_token`
2560 } `json:"grant" url:"grant,key"` // grant used on the underlying authorization
2561 ID string `json:"id" url:"id,key"` // unique identifier of OAuth token
2562 RefreshToken struct {
2563 ExpiresIn *int `json:"expires_in" url:"expires_in,key"` // seconds until OAuth token expires; may be `null` for tokens with
2564 // indefinite lifetime
2565 ID string `json:"id" url:"id,key"` // unique identifier of OAuth token
2566 Token string `json:"token" url:"token,key"` // contents of the token to be used for authorization
2567 } `json:"refresh_token" url:"refresh_token,key"` // refresh token for this authorization
2568 Session struct {
2569 ID string `json:"id" url:"id,key"` // unique identifier of OAuth token
2570 } `json:"session" url:"session,key"` // OAuth session using this token
2571 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when OAuth token was updated
2572 User struct {
2573 ID string `json:"id" url:"id,key"` // unique identifier of an account
2574 } `json:"user" url:"user,key"` // Reference to the user associated with this token
2575 }
2576 type OAuthTokenCreateOpts struct {
2577 Client struct {
2578 Secret *string `json:"secret,omitempty" url:"secret,omitempty,key"` // secret used to obtain OAuth authorizations under this client
2579 } `json:"client" url:"client,key"`
2580 Grant struct {
2581 Code *string `json:"code,omitempty" url:"code,omitempty,key"` // grant code received from OAuth web application authorization
2582 Type *string `json:"type,omitempty" url:"type,omitempty,key"` // type of grant requested, one of `authorization_code` or
2583 // `refresh_token`
2584 } `json:"grant" url:"grant,key"`
2585 RefreshToken struct {
2586 Token *string `json:"token,omitempty" url:"token,omitempty,key"` // contents of the token to be used for authorization
2587 } `json:"refresh_token" url:"refresh_token,key"`
2588 }
2589
2590 // Create a new OAuth token.
2591 func (s *Service) OAuthTokenCreate(ctx context.Context, o OAuthTokenCreateOpts) (*OAuthToken, error) {
2592 var oauthToken OAuthToken
2593 return &oauthToken, s.Post(ctx, &oauthToken, fmt.Sprintf("/oauth/tokens"), o)
2594 }
2595
2596 // Revoke OAuth access token.
2597 func (s *Service) OAuthTokenDelete(ctx context.Context, oauthTokenIdentity string) (*OAuthToken, error) {
2598 var oauthToken OAuthToken
2599 return &oauthToken, s.Delete(ctx, &oauthToken, fmt.Sprintf("/oauth/tokens/%v", oauthTokenIdentity))
2600 }
2601
2602 // Deprecated: Organizations allow you to manage access to a shared
2603 // group of applications across your development team.
2604 type Organization struct {
2605 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the organization was created
2606 CreditCardCollections bool `json:"credit_card_collections" url:"credit_card_collections,key"` // whether charges incurred by the org are paid by credit card.
2607 Default bool `json:"default" url:"default,key"` // whether to use this organization when none is specified
2608 ID string `json:"id" url:"id,key"` // unique identifier of organization
2609 MembershipLimit *float64 `json:"membership_limit" url:"membership_limit,key"` // upper limit of members allowed in an organization.
2610 Name string `json:"name" url:"name,key"` // unique name of organization
2611 ProvisionedLicenses bool `json:"provisioned_licenses" url:"provisioned_licenses,key"` // whether the org is provisioned licenses by salesforce.
2612 Role *string `json:"role" url:"role,key"` // role in the organization
2613 Type string `json:"type" url:"type,key"` // type of organization.
2614 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the organization was updated
2615 }
2616 type OrganizationListResult []Organization
2617
2618 // List organizations in which you are a member.
2619 func (s *Service) OrganizationList(ctx context.Context, lr *ListRange) (OrganizationListResult, error) {
2620 var organization OrganizationListResult
2621 return organization, s.Get(ctx, &organization, fmt.Sprintf("/organizations"), nil, lr)
2622 }
2623
2624 // Info for an organization.
2625 func (s *Service) OrganizationInfo(ctx context.Context, organizationIdentity string) (*Organization, error) {
2626 var organization Organization
2627 return &organization, s.Get(ctx, &organization, fmt.Sprintf("/organizations/%v", organizationIdentity), nil, nil)
2628 }
2629
2630 type OrganizationUpdateOpts struct {
2631 Default *bool `json:"default,omitempty" url:"default,omitempty,key"` // whether to use this organization when none is specified
2632 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of organization
2633 }
2634
2635 // Update organization properties.
2636 func (s *Service) OrganizationUpdate(ctx context.Context, organizationIdentity string, o OrganizationUpdateOpts) (*Organization, error) {
2637 var organization Organization
2638 return &organization, s.Patch(ctx, &organization, fmt.Sprintf("/organizations/%v", organizationIdentity), o)
2639 }
2640
2641 type OrganizationCreateOpts struct {
2642 Address1 *string `json:"address_1,omitempty" url:"address_1,omitempty,key"` // street address line 1
2643 Address2 *string `json:"address_2,omitempty" url:"address_2,omitempty,key"` // street address line 2
2644 CardNumber *string `json:"card_number,omitempty" url:"card_number,omitempty,key"` // encrypted card number of payment method
2645 City *string `json:"city,omitempty" url:"city,omitempty,key"` // city
2646 Country *string `json:"country,omitempty" url:"country,omitempty,key"` // country
2647 Cvv *string `json:"cvv,omitempty" url:"cvv,omitempty,key"` // card verification value
2648 ExpirationMonth *string `json:"expiration_month,omitempty" url:"expiration_month,omitempty,key"` // expiration month
2649 ExpirationYear *string `json:"expiration_year,omitempty" url:"expiration_year,omitempty,key"` // expiration year
2650 FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty,key"` // the first name for payment method
2651 LastName *string `json:"last_name,omitempty" url:"last_name,omitempty,key"` // the last name for payment method
2652 Name string `json:"name" url:"name,key"` // unique name of organization
2653 Other *string `json:"other,omitempty" url:"other,omitempty,key"` // metadata
2654 PostalCode *string `json:"postal_code,omitempty" url:"postal_code,omitempty,key"` // postal code
2655 State *string `json:"state,omitempty" url:"state,omitempty,key"` // state
2656 }
2657
2658 // Create a new organization.
2659 func (s *Service) OrganizationCreate(ctx context.Context, o OrganizationCreateOpts) (*Organization, error) {
2660 var organization Organization
2661 return &organization, s.Post(ctx, &organization, fmt.Sprintf("/organizations"), o)
2662 }
2663
2664 // Delete an existing organization.
2665 func (s *Service) OrganizationDelete(ctx context.Context, organizationIdentity string) (*Organization, error) {
2666 var organization Organization
2667 return &organization, s.Delete(ctx, &organization, fmt.Sprintf("/organizations/%v", organizationIdentity))
2668 }
2669
2670 // Deprecated: A list of add-ons the Organization uses across all apps
2671 type OrganizationAddOn struct{}
2672 type OrganizationAddOnListForOrganizationResult []struct {
2673 Actions []struct{} `json:"actions" url:"actions,key"` // provider actions for this specific add-on
2674 AddonService struct {
2675 ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service
2676 Name string `json:"name" url:"name,key"` // unique name of this add-on-service
2677 } `json:"addon_service" url:"addon_service,key"` // identity of add-on service
2678 App struct {
2679 ID string `json:"id" url:"id,key"` // unique identifier of app
2680 Name string `json:"name" url:"name,key"` // unique name of app
2681 } `json:"app" url:"app,key"` // billing application associated with this add-on
2682 BilledPrice *struct {
2683 Cents int `json:"cents" url:"cents,key"` // price in cents per unit of plan
2684 Contract bool `json:"contract" url:"contract,key"` // price is negotiated in a contract outside of monthly add-on billing
2685 Unit string `json:"unit" url:"unit,key"` // unit of price for plan
2686 } `json:"billed_price" url:"billed_price,key"` // billed price
2687 BillingEntity struct {
2688 ID string `json:"id" url:"id,key"` // unique identifier of the billing entity
2689 Name string `json:"name" url:"name,key"` // name of the billing entity
2690 Type string `json:"type" url:"type,key"` // type of Object of the billing entity; new types allowed at any time.
2691 } `json:"billing_entity" url:"billing_entity,key"` // billing entity associated with this add-on
2692 ConfigVars []string `json:"config_vars" url:"config_vars,key"` // config vars exposed to the owning app by this add-on
2693 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when add-on was created
2694 ID string `json:"id" url:"id,key"` // unique identifier of add-on
2695 Name string `json:"name" url:"name,key"` // globally unique name of the add-on
2696 Plan struct {
2697 ID string `json:"id" url:"id,key"` // unique identifier of this plan
2698 Name string `json:"name" url:"name,key"` // unique name of this plan
2699 } `json:"plan" url:"plan,key"` // identity of add-on plan
2700 ProviderID string `json:"provider_id" url:"provider_id,key"` // id of this add-on with its provider
2701 State string `json:"state" url:"state,key"` // state in the add-on's lifecycle
2702 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when add-on was updated
2703 WebURL *string `json:"web_url" url:"web_url,key"` // URL for logging into web interface of add-on (e.g. a dashboard)
2704 }
2705
2706 // List add-ons used across all Organization apps
2707 func (s *Service) OrganizationAddOnListForOrganization(ctx context.Context, organizationIdentity string, lr *ListRange) (OrganizationAddOnListForOrganizationResult, error) {
2708 var organizationAddOn OrganizationAddOnListForOrganizationResult
2709 return organizationAddOn, s.Get(ctx, &organizationAddOn, fmt.Sprintf("/organizations/%v/addons", organizationIdentity), nil, lr)
2710 }
2711
2712 // Deprecated: An organization app encapsulates the organization
2713 // specific functionality of Heroku apps.
2714 type OrganizationApp struct {
2715 ArchivedAt *time.Time `json:"archived_at" url:"archived_at,key"` // when app was archived
2716 BuildStack struct {
2717 ID string `json:"id" url:"id,key"` // unique identifier of stack
2718 Name string `json:"name" url:"name,key"` // unique name of stack
2719 } `json:"build_stack" url:"build_stack,key"` // identity of the stack that will be used for new builds
2720 BuildpackProvidedDescription *string `json:"buildpack_provided_description" url:"buildpack_provided_description,key"` // description from buildpack of app
2721 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app was created
2722 GitURL string `json:"git_url" url:"git_url,key"` // git repo URL of app
2723 ID string `json:"id" url:"id,key"` // unique identifier of app
2724 Joined bool `json:"joined" url:"joined,key"` // is the current member a collaborator on this app.
2725 Locked bool `json:"locked" url:"locked,key"` // are other organization members forbidden from joining this app.
2726 Maintenance bool `json:"maintenance" url:"maintenance,key"` // maintenance status of app
2727 Name string `json:"name" url:"name,key"` // unique name of app
2728 Organization *struct {
2729 Name string `json:"name" url:"name,key"` // unique name of organization
2730 } `json:"organization" url:"organization,key"` // organization that owns this app
2731 Owner *struct {
2732 Email string `json:"email" url:"email,key"` // unique email address of account
2733 ID string `json:"id" url:"id,key"` // unique identifier of an account
2734 } `json:"owner" url:"owner,key"` // identity of app owner
2735 Region struct {
2736 ID string `json:"id" url:"id,key"` // unique identifier of region
2737 Name string `json:"name" url:"name,key"` // unique name of region
2738 } `json:"region" url:"region,key"` // identity of app region
2739 ReleasedAt *time.Time `json:"released_at" url:"released_at,key"` // when app was released
2740 RepoSize *int `json:"repo_size" url:"repo_size,key"` // git repo size in bytes of app
2741 SlugSize *int `json:"slug_size" url:"slug_size,key"` // slug size in bytes of app
2742 Space *struct {
2743 ID string `json:"id" url:"id,key"` // unique identifier of space
2744 Name string `json:"name" url:"name,key"` // unique name of space
2745 } `json:"space" url:"space,key"` // identity of space
2746 Stack struct {
2747 ID string `json:"id" url:"id,key"` // unique identifier of stack
2748 Name string `json:"name" url:"name,key"` // unique name of stack
2749 } `json:"stack" url:"stack,key"` // identity of app stack
2750 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app was updated
2751 WebURL string `json:"web_url" url:"web_url,key"` // web URL of app
2752 }
2753 type OrganizationAppCreateOpts struct {
2754 Locked *bool `json:"locked,omitempty" url:"locked,omitempty,key"` // are other organization members forbidden from joining this app.
2755 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of app
2756 Organization *string `json:"organization,omitempty" url:"organization,omitempty,key"` // unique name of organization
2757 Personal *bool `json:"personal,omitempty" url:"personal,omitempty,key"` // force creation of the app in the user account even if a default org
2758 // is set.
2759 Region *string `json:"region,omitempty" url:"region,omitempty,key"` // unique name of region
2760 Space *string `json:"space,omitempty" url:"space,omitempty,key"` // unique name of space
2761 Stack *string `json:"stack,omitempty" url:"stack,omitempty,key"` // unique name of stack
2762 }
2763
2764 // Create a new app in the specified organization, in the default
2765 // organization if unspecified, or in personal account, if default
2766 // organization is not set.
2767 func (s *Service) OrganizationAppCreate(ctx context.Context, o OrganizationAppCreateOpts) (*OrganizationApp, error) {
2768 var organizationApp OrganizationApp
2769 return &organizationApp, s.Post(ctx, &organizationApp, fmt.Sprintf("/organizations/apps"), o)
2770 }
2771
2772 type OrganizationAppListForOrganizationResult []OrganizationApp
2773
2774 // List organization apps.
2775 func (s *Service) OrganizationAppListForOrganization(ctx context.Context, organizationIdentity string, lr *ListRange) (OrganizationAppListForOrganizationResult, error) {
2776 var organizationApp OrganizationAppListForOrganizationResult
2777 return organizationApp, s.Get(ctx, &organizationApp, fmt.Sprintf("/organizations/%v/apps", organizationIdentity), nil, lr)
2778 }
2779
2780 // Info for an organization app.
2781 func (s *Service) OrganizationAppInfo(ctx context.Context, organizationAppIdentity string) (*OrganizationApp, error) {
2782 var organizationApp OrganizationApp
2783 return &organizationApp, s.Get(ctx, &organizationApp, fmt.Sprintf("/organizations/apps/%v", organizationAppIdentity), nil, nil)
2784 }
2785
2786 type OrganizationAppUpdateLockedOpts struct {
2787 Locked bool `json:"locked" url:"locked,key"` // are other organization members forbidden from joining this app.
2788 }
2789
2790 // Lock or unlock an organization app.
2791 func (s *Service) OrganizationAppUpdateLocked(ctx context.Context, organizationAppIdentity string, o OrganizationAppUpdateLockedOpts) (*OrganizationApp, error) {
2792 var organizationApp OrganizationApp
2793 return &organizationApp, s.Patch(ctx, &organizationApp, fmt.Sprintf("/organizations/apps/%v", organizationAppIdentity), o)
2794 }
2795
2796 type OrganizationAppTransferToAccountOpts struct {
2797 Owner string `json:"owner" url:"owner,key"` // unique email address of account
2798 }
2799
2800 // Transfer an existing organization app to another Heroku account.
2801 func (s *Service) OrganizationAppTransferToAccount(ctx context.Context, organizationAppIdentity string, o OrganizationAppTransferToAccountOpts) (*OrganizationApp, error) {
2802 var organizationApp OrganizationApp
2803 return &organizationApp, s.Patch(ctx, &organizationApp, fmt.Sprintf("/organizations/apps/%v", organizationAppIdentity), o)
2804 }
2805
2806 type OrganizationAppTransferToOrganizationOpts struct {
2807 Owner string `json:"owner" url:"owner,key"` // unique name of organization
2808 }
2809
2810 // Transfer an existing organization app to another organization.
2811 func (s *Service) OrganizationAppTransferToOrganization(ctx context.Context, organizationAppIdentity string, o OrganizationAppTransferToOrganizationOpts) (*OrganizationApp, error) {
2812 var organizationApp OrganizationApp
2813 return &organizationApp, s.Patch(ctx, &organizationApp, fmt.Sprintf("/organizations/apps/%v", organizationAppIdentity), o)
2814 }
2815
2816 // Deprecated: An organization collaborator represents an account that
2817 // has been given access to an organization app on Heroku.
2818 type OrganizationAppCollaborator struct {
2819 App struct {
2820 ID string `json:"id" url:"id,key"` // unique identifier of app
2821 Name string `json:"name" url:"name,key"` // unique name of app
2822 } `json:"app" url:"app,key"` // app collaborator belongs to
2823 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when collaborator was created
2824 ID string `json:"id" url:"id,key"` // unique identifier of collaborator
2825 Role *string `json:"role" url:"role,key"` // role in the organization
2826 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when collaborator was updated
2827 User struct {
2828 Email string `json:"email" url:"email,key"` // unique email address of account
2829 Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider
2830 ID string `json:"id" url:"id,key"` // unique identifier of an account
2831 } `json:"user" url:"user,key"` // identity of collaborated account
2832 }
2833 type OrganizationAppCollaboratorCreateOpts struct {
2834 Permissions []*string `json:"permissions,omitempty" url:"permissions,omitempty,key"` // An array of permissions to give to the collaborator.
2835 Silent *bool `json:"silent,omitempty" url:"silent,omitempty,key"` // whether to suppress email invitation when creating collaborator
2836 User string `json:"user" url:"user,key"` // unique email address of account
2837 }
2838
2839 // Create a new collaborator on an organization app. Use this endpoint
2840 // instead of the `/apps/{app_id_or_name}/collaborator` endpoint when
2841 // you want the collaborator to be granted [permissions]
2842 // (https://devcenter.heroku.com/articles/org-users-access#roles-and-app-
2843 // permissions) according to their role in the organization.
2844 func (s *Service) OrganizationAppCollaboratorCreate(ctx context.Context, appIdentity string, o OrganizationAppCollaboratorCreateOpts) (*OrganizationAppCollaborator, error) {
2845 var organizationAppCollaborator OrganizationAppCollaborator
2846 return &organizationAppCollaborator, s.Post(ctx, &organizationAppCollaborator, fmt.Sprintf("/organizations/apps/%v/collaborators", appIdentity), o)
2847 }
2848
2849 // Delete an existing collaborator from an organization app.
2850 func (s *Service) OrganizationAppCollaboratorDelete(ctx context.Context, organizationAppIdentity string, organizationAppCollaboratorIdentity string) (*OrganizationAppCollaborator, error) {
2851 var organizationAppCollaborator OrganizationAppCollaborator
2852 return &organizationAppCollaborator, s.Delete(ctx, &organizationAppCollaborator, fmt.Sprintf("/organizations/apps/%v/collaborators/%v", organizationAppIdentity, organizationAppCollaboratorIdentity))
2853 }
2854
2855 // Info for a collaborator on an organization app.
2856 func (s *Service) OrganizationAppCollaboratorInfo(ctx context.Context, organizationAppIdentity string, organizationAppCollaboratorIdentity string) (*OrganizationAppCollaborator, error) {
2857 var organizationAppCollaborator OrganizationAppCollaborator
2858 return &organizationAppCollaborator, s.Get(ctx, &organizationAppCollaborator, fmt.Sprintf("/organizations/apps/%v/collaborators/%v", organizationAppIdentity, organizationAppCollaboratorIdentity), nil, nil)
2859 }
2860
2861 type OrganizationAppCollaboratorUpdateOpts struct {
2862 Permissions []string `json:"permissions" url:"permissions,key"` // An array of permissions to give to the collaborator.
2863 }
2864
2865 // Update an existing collaborator from an organization app.
2866 func (s *Service) OrganizationAppCollaboratorUpdate(ctx context.Context, organizationAppIdentity string, organizationAppCollaboratorIdentity string, o OrganizationAppCollaboratorUpdateOpts) (*OrganizationAppCollaborator, error) {
2867 var organizationAppCollaborator OrganizationAppCollaborator
2868 return &organizationAppCollaborator, s.Patch(ctx, &organizationAppCollaborator, fmt.Sprintf("/organizations/apps/%v/collaborators/%v", organizationAppIdentity, organizationAppCollaboratorIdentity), o)
2869 }
2870
2871 type OrganizationAppCollaboratorListResult []OrganizationAppCollaborator
2872
2873 // List collaborators on an organization app.
2874 func (s *Service) OrganizationAppCollaboratorList(ctx context.Context, organizationAppIdentity string, lr *ListRange) (OrganizationAppCollaboratorListResult, error) {
2875 var organizationAppCollaborator OrganizationAppCollaboratorListResult
2876 return organizationAppCollaborator, s.Get(ctx, &organizationAppCollaborator, fmt.Sprintf("/organizations/apps/%v/collaborators", organizationAppIdentity), nil, lr)
2877 }
2878
2879 // Deprecated: An organization app permission is a behavior that is
2880 // assigned to a user in an organization app.
2881 type OrganizationAppPermission struct {
2882 Description string `json:"description" url:"description,key"` // A description of what the app permission allows.
2883 Name string `json:"name" url:"name,key"` // The name of the app permission.
2884 }
2885 type OrganizationAppPermissionListResult []OrganizationAppPermission
2886
2887 // Lists permissions available to organizations.
2888 func (s *Service) OrganizationAppPermissionList(ctx context.Context, lr *ListRange) (OrganizationAppPermissionListResult, error) {
2889 var organizationAppPermission OrganizationAppPermissionListResult
2890 return organizationAppPermission, s.Get(ctx, &organizationAppPermission, fmt.Sprintf("/organizations/permissions"), nil, lr)
2891 }
2892
2893 // Deprecated: An organization feature represents a feature enabled on
2894 // an organization account.
2895 type OrganizationFeature struct {
2896 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when organization feature was created
2897 Description string `json:"description" url:"description,key"` // description of organization feature
2898 DisplayName string `json:"display_name" url:"display_name,key"` // user readable feature name
2899 DocURL string `json:"doc_url" url:"doc_url,key"` // documentation URL of organization feature
2900 Enabled bool `json:"enabled" url:"enabled,key"` // whether or not organization feature has been enabled
2901 FeedbackEmail string `json:"feedback_email" url:"feedback_email,key"` // e-mail to send feedback about the feature
2902 ID string `json:"id" url:"id,key"` // unique identifier of organization feature
2903 Name string `json:"name" url:"name,key"` // unique name of organization feature
2904 State string `json:"state" url:"state,key"` // state of organization feature
2905 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when organization feature was updated
2906 }
2907
2908 // Info for an existing organization feature.
2909 func (s *Service) OrganizationFeatureInfo(ctx context.Context, organizationIdentity string, organizationFeatureIdentity string) (*OrganizationFeature, error) {
2910 var organizationFeature OrganizationFeature
2911 return &organizationFeature, s.Get(ctx, &organizationFeature, fmt.Sprintf("/organizations/%v/features/%v", organizationIdentity, organizationFeatureIdentity), nil, nil)
2912 }
2913
2914 type OrganizationFeatureListResult []OrganizationFeature
2915
2916 // List existing organization features.
2917 func (s *Service) OrganizationFeatureList(ctx context.Context, organizationIdentity string, lr *ListRange) (OrganizationFeatureListResult, error) {
2918 var organizationFeature OrganizationFeatureListResult
2919 return organizationFeature, s.Get(ctx, &organizationFeature, fmt.Sprintf("/organizations/%v/features", organizationIdentity), nil, lr)
2920 }
2921
2922 type OrganizationFeatureUpdateOpts struct {
2923 Enabled bool `json:"enabled" url:"enabled,key"` // whether or not organization feature has been enabled
2924 }
2925
2926 // Update an existing organization feature.
2927 func (s *Service) OrganizationFeatureUpdate(ctx context.Context, organizationIdentity string, organizationFeatureIdentity string, o OrganizationFeatureUpdateOpts) (*OrganizationFeature, error) {
2928 var organizationFeature OrganizationFeature
2929 return &organizationFeature, s.Patch(ctx, &organizationFeature, fmt.Sprintf("/organizations/%v/features/%v", organizationIdentity, organizationFeatureIdentity), o)
2930 }
2931
2932 // Deprecated: An organization invitation represents an invite to an
2933 // organization.
2934 type OrganizationInvitation struct {
2935 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when invitation was created
2936 ID string `json:"id" url:"id,key"` // Unique identifier of an invitation
2937 InvitedBy struct {
2938 Email string `json:"email" url:"email,key"` // unique email address of account
2939 ID string `json:"id" url:"id,key"` // unique identifier of an account
2940 Name *string `json:"name" url:"name,key"` // full name of the account owner
2941 } `json:"invited_by" url:"invited_by,key"`
2942 Organization struct {
2943 ID string `json:"id" url:"id,key"` // unique identifier of organization
2944 Name string `json:"name" url:"name,key"` // unique name of organization
2945 } `json:"organization" url:"organization,key"`
2946 Role *string `json:"role" url:"role,key"` // role in the organization
2947 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when invitation was updated
2948 User struct {
2949 Email string `json:"email" url:"email,key"` // unique email address of account
2950 ID string `json:"id" url:"id,key"` // unique identifier of an account
2951 Name *string `json:"name" url:"name,key"` // full name of the account owner
2952 } `json:"user" url:"user,key"`
2953 }
2954 type OrganizationInvitationListResult []OrganizationInvitation
2955
2956 // Get a list of an organization's Identity Providers
2957 func (s *Service) OrganizationInvitationList(ctx context.Context, organizationName string, lr *ListRange) (OrganizationInvitationListResult, error) {
2958 var organizationInvitation OrganizationInvitationListResult
2959 return organizationInvitation, s.Get(ctx, &organizationInvitation, fmt.Sprintf("/organizations/%v/invitations", organizationName), nil, lr)
2960 }
2961
2962 type OrganizationInvitationCreateOpts struct {
2963 Email string `json:"email" url:"email,key"` // unique email address of account
2964 Role *string `json:"role" url:"role,key"` // role in the organization
2965 }
2966
2967 // Create Organization Invitation
2968 func (s *Service) OrganizationInvitationCreate(ctx context.Context, organizationIdentity string, o OrganizationInvitationCreateOpts) (*OrganizationInvitation, error) {
2969 var organizationInvitation OrganizationInvitation
2970 return &organizationInvitation, s.Put(ctx, &organizationInvitation, fmt.Sprintf("/organizations/%v/invitations", organizationIdentity), o)
2971 }
2972
2973 // Revoke an organization invitation.
2974 func (s *Service) OrganizationInvitationRevoke(ctx context.Context, organizationIdentity string, organizationInvitationIdentity string) (*OrganizationInvitation, error) {
2975 var organizationInvitation OrganizationInvitation
2976 return &organizationInvitation, s.Delete(ctx, &organizationInvitation, fmt.Sprintf("/organizations/%v/invitations/%v", organizationIdentity, organizationInvitationIdentity))
2977 }
2978
2979 // Get an invitation by its token
2980 func (s *Service) OrganizationInvitationGet(ctx context.Context, organizationInvitationToken string, lr *ListRange) (*OrganizationInvitation, error) {
2981 var organizationInvitation OrganizationInvitation
2982 return &organizationInvitation, s.Get(ctx, &organizationInvitation, fmt.Sprintf("/organizations/invitations/%v", organizationInvitationToken), nil, lr)
2983 }
2984
2985 type OrganizationInvitationAcceptResult struct {
2986 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the membership record was created
2987 Email string `json:"email" url:"email,key"` // email address of the organization member
2988 Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider
2989 ID string `json:"id" url:"id,key"` // unique identifier of organization member
2990 Role *string `json:"role" url:"role,key"` // role in the organization
2991 TwoFactorAuthentication bool `json:"two_factor_authentication" url:"two_factor_authentication,key"` // whether the Enterprise organization member has two factor
2992 // authentication enabled
2993 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the membership record was updated
2994 User struct {
2995 Email string `json:"email" url:"email,key"` // unique email address of account
2996 ID string `json:"id" url:"id,key"` // unique identifier of an account
2997 Name *string `json:"name" url:"name,key"` // full name of the account owner
2998 } `json:"user" url:"user,key"` // user information for the membership
2999 }
3000
3001 // Accept Organization Invitation
3002 func (s *Service) OrganizationInvitationAccept(ctx context.Context, organizationInvitationToken string) (*OrganizationInvitationAcceptResult, error) {
3003 var organizationInvitation OrganizationInvitationAcceptResult
3004 return &organizationInvitation, s.Post(ctx, &organizationInvitation, fmt.Sprintf("/organizations/invitations/%v/accept", organizationInvitationToken), nil)
3005 }
3006
3007 // Deprecated: An organization invoice is an itemized bill of goods for
3008 // an organization which includes pricing and charges.
3009 type OrganizationInvoice struct {
3010 AddonsTotal int `json:"addons_total" url:"addons_total,key"` // total add-ons charges in on this invoice
3011 ChargesTotal int `json:"charges_total" url:"charges_total,key"` // total charges on this invoice
3012 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when invoice was created
3013 CreditsTotal int `json:"credits_total" url:"credits_total,key"` // total credits on this invoice
3014 DatabaseTotal int `json:"database_total" url:"database_total,key"` // total database charges on this invoice
3015 DynoUnits float64 `json:"dyno_units" url:"dyno_units,key"` // The total amount of dyno units consumed across dyno types.
3016 ID string `json:"id" url:"id,key"` // unique identifier of this invoice
3017 Number int `json:"number" url:"number,key"` // human readable invoice number
3018 PaymentStatus string `json:"payment_status" url:"payment_status,key"` // Status of the invoice payment.
3019 PeriodEnd string `json:"period_end" url:"period_end,key"` // the ending date that the invoice covers
3020 PeriodStart string `json:"period_start" url:"period_start,key"` // the starting date that this invoice covers
3021 PlatformTotal int `json:"platform_total" url:"platform_total,key"` // total platform charges on this invoice
3022 State int `json:"state" url:"state,key"` // payment status for this invoice (pending, successful, failed)
3023 Total int `json:"total" url:"total,key"` // combined total of charges and credits on this invoice
3024 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when invoice was updated
3025 WeightedDynoHours float64 `json:"weighted_dyno_hours" url:"weighted_dyno_hours,key"` // The total amount of hours consumed across dyno types.
3026 }
3027
3028 // Info for existing invoice.
3029 func (s *Service) OrganizationInvoiceInfo(ctx context.Context, organizationIdentity string, organizationInvoiceIdentity int) (*OrganizationInvoice, error) {
3030 var organizationInvoice OrganizationInvoice
3031 return &organizationInvoice, s.Get(ctx, &organizationInvoice, fmt.Sprintf("/organizations/%v/invoices/%v", organizationIdentity, organizationInvoiceIdentity), nil, nil)
3032 }
3033
3034 type OrganizationInvoiceListResult []OrganizationInvoice
3035
3036 // List existing invoices.
3037 func (s *Service) OrganizationInvoiceList(ctx context.Context, organizationIdentity string, lr *ListRange) (OrganizationInvoiceListResult, error) {
3038 var organizationInvoice OrganizationInvoiceListResult
3039 return organizationInvoice, s.Get(ctx, &organizationInvoice, fmt.Sprintf("/organizations/%v/invoices", organizationIdentity), nil, lr)
3040 }
3041
3042 // Deprecated: An organization member is an individual with access to an
3043 // organization.
3044 type OrganizationMember struct {
3045 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the membership record was created
3046 Email string `json:"email" url:"email,key"` // email address of the organization member
3047 Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider
3048 ID string `json:"id" url:"id,key"` // unique identifier of organization member
3049 Role *string `json:"role" url:"role,key"` // role in the organization
3050 TwoFactorAuthentication bool `json:"two_factor_authentication" url:"two_factor_authentication,key"` // whether the Enterprise organization member has two factor
3051 // authentication enabled
3052 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the membership record was updated
3053 User struct {
3054 Email string `json:"email" url:"email,key"` // unique email address of account
3055 ID string `json:"id" url:"id,key"` // unique identifier of an account
3056 Name *string `json:"name" url:"name,key"` // full name of the account owner
3057 } `json:"user" url:"user,key"` // user information for the membership
3058 }
3059 type OrganizationMemberCreateOrUpdateOpts struct {
3060 Email string `json:"email" url:"email,key"` // email address of the organization member
3061 Federated *bool `json:"federated,omitempty" url:"federated,omitempty,key"` // whether the user is federated and belongs to an Identity Provider
3062 Role *string `json:"role" url:"role,key"` // role in the organization
3063 }
3064
3065 // Create a new organization member, or update their role.
3066 func (s *Service) OrganizationMemberCreateOrUpdate(ctx context.Context, organizationIdentity string, o OrganizationMemberCreateOrUpdateOpts) (*OrganizationMember, error) {
3067 var organizationMember OrganizationMember
3068 return &organizationMember, s.Put(ctx, &organizationMember, fmt.Sprintf("/organizations/%v/members", organizationIdentity), o)
3069 }
3070
3071 type OrganizationMemberCreateOpts struct {
3072 Email string `json:"email" url:"email,key"` // email address of the organization member
3073 Federated *bool `json:"federated,omitempty" url:"federated,omitempty,key"` // whether the user is federated and belongs to an Identity Provider
3074 Role *string `json:"role" url:"role,key"` // role in the organization
3075 }
3076
3077 // Create a new organization member.
3078 func (s *Service) OrganizationMemberCreate(ctx context.Context, organizationIdentity string, o OrganizationMemberCreateOpts) (*OrganizationMember, error) {
3079 var organizationMember OrganizationMember
3080 return &organizationMember, s.Post(ctx, &organizationMember, fmt.Sprintf("/organizations/%v/members", organizationIdentity), o)
3081 }
3082
3083 type OrganizationMemberUpdateOpts struct {
3084 Email string `json:"email" url:"email,key"` // email address of the organization member
3085 Federated *bool `json:"federated,omitempty" url:"federated,omitempty,key"` // whether the user is federated and belongs to an Identity Provider
3086 Role *string `json:"role" url:"role,key"` // role in the organization
3087 }
3088
3089 // Update an organization member.
3090 func (s *Service) OrganizationMemberUpdate(ctx context.Context, organizationIdentity string, o OrganizationMemberUpdateOpts) (*OrganizationMember, error) {
3091 var organizationMember OrganizationMember
3092 return &organizationMember, s.Patch(ctx, &organizationMember, fmt.Sprintf("/organizations/%v/members", organizationIdentity), o)
3093 }
3094
3095 // Remove a member from the organization.
3096 func (s *Service) OrganizationMemberDelete(ctx context.Context, organizationIdentity string, organizationMemberIdentity string) (*OrganizationMember, error) {
3097 var organizationMember OrganizationMember
3098 return &organizationMember, s.Delete(ctx, &organizationMember, fmt.Sprintf("/organizations/%v/members/%v", organizationIdentity, organizationMemberIdentity))
3099 }
3100
3101 type OrganizationMemberListResult []OrganizationMember
3102
3103 // List members of the organization.
3104 func (s *Service) OrganizationMemberList(ctx context.Context, organizationIdentity string, lr *ListRange) (OrganizationMemberListResult, error) {
3105 var organizationMember OrganizationMemberListResult
3106 return organizationMember, s.Get(ctx, &organizationMember, fmt.Sprintf("/organizations/%v/members", organizationIdentity), nil, lr)
3107 }
3108
3109 type OrganizationMemberAppListResult []struct {
3110 ArchivedAt *time.Time `json:"archived_at" url:"archived_at,key"` // when app was archived
3111 BuildStack struct {
3112 ID string `json:"id" url:"id,key"` // unique identifier of stack
3113 Name string `json:"name" url:"name,key"` // unique name of stack
3114 } `json:"build_stack" url:"build_stack,key"` // identity of the stack that will be used for new builds
3115 BuildpackProvidedDescription *string `json:"buildpack_provided_description" url:"buildpack_provided_description,key"` // description from buildpack of app
3116 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app was created
3117 GitURL string `json:"git_url" url:"git_url,key"` // git repo URL of app
3118 ID string `json:"id" url:"id,key"` // unique identifier of app
3119 Joined bool `json:"joined" url:"joined,key"` // is the current member a collaborator on this app.
3120 Locked bool `json:"locked" url:"locked,key"` // are other organization members forbidden from joining this app.
3121 Maintenance bool `json:"maintenance" url:"maintenance,key"` // maintenance status of app
3122 Name string `json:"name" url:"name,key"` // unique name of app
3123 Organization *struct {
3124 Name string `json:"name" url:"name,key"` // unique name of organization
3125 } `json:"organization" url:"organization,key"` // organization that owns this app
3126 Owner *struct {
3127 Email string `json:"email" url:"email,key"` // unique email address of account
3128 ID string `json:"id" url:"id,key"` // unique identifier of an account
3129 } `json:"owner" url:"owner,key"` // identity of app owner
3130 Region struct {
3131 ID string `json:"id" url:"id,key"` // unique identifier of region
3132 Name string `json:"name" url:"name,key"` // unique name of region
3133 } `json:"region" url:"region,key"` // identity of app region
3134 ReleasedAt *time.Time `json:"released_at" url:"released_at,key"` // when app was released
3135 RepoSize *int `json:"repo_size" url:"repo_size,key"` // git repo size in bytes of app
3136 SlugSize *int `json:"slug_size" url:"slug_size,key"` // slug size in bytes of app
3137 Space *struct {
3138 ID string `json:"id" url:"id,key"` // unique identifier of space
3139 Name string `json:"name" url:"name,key"` // unique name of space
3140 } `json:"space" url:"space,key"` // identity of space
3141 Stack struct {
3142 ID string `json:"id" url:"id,key"` // unique identifier of stack
3143 Name string `json:"name" url:"name,key"` // unique name of stack
3144 } `json:"stack" url:"stack,key"` // identity of app stack
3145 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app was updated
3146 WebURL string `json:"web_url" url:"web_url,key"` // web URL of app
3147 }
3148
3149 // List the apps of a member.
3150 func (s *Service) OrganizationMemberAppList(ctx context.Context, organizationIdentity string, organizationMemberIdentity string, lr *ListRange) (OrganizationMemberAppListResult, error) {
3151 var organizationMember OrganizationMemberAppListResult
3152 return organizationMember, s.Get(ctx, &organizationMember, fmt.Sprintf("/organizations/%v/members/%v/apps", organizationIdentity, organizationMemberIdentity), nil, lr)
3153 }
3154
3155 // Deprecated: Tracks an organization's preferences
3156 type OrganizationPreferences struct {
3157 DefaultPermission *string `json:"default-permission" url:"default-permission,key"` // The default permission used when adding new members to the
3158 // organization
3159 WhitelistingEnabled *bool `json:"whitelisting-enabled" url:"whitelisting-enabled,key"` // Whether whitelisting rules should be applied to add-on installations
3160 }
3161
3162 // Retrieve Organization Preferences
3163 func (s *Service) OrganizationPreferencesList(ctx context.Context, organizationPreferencesIdentity string) (*OrganizationPreferences, error) {
3164 var organizationPreferences OrganizationPreferences
3165 return &organizationPreferences, s.Get(ctx, &organizationPreferences, fmt.Sprintf("/organizations/%v/preferences", organizationPreferencesIdentity), nil, nil)
3166 }
3167
3168 type OrganizationPreferencesUpdateOpts struct {
3169 WhitelistingEnabled *bool `json:"whitelisting-enabled,omitempty" url:"whitelisting-enabled,omitempty,key"` // Whether whitelisting rules should be applied to add-on installations
3170 }
3171
3172 // Update Organization Preferences
3173 func (s *Service) OrganizationPreferencesUpdate(ctx context.Context, organizationPreferencesIdentity string, o OrganizationPreferencesUpdateOpts) (*OrganizationPreferences, error) {
3174 var organizationPreferences OrganizationPreferences
3175 return &organizationPreferences, s.Patch(ctx, &organizationPreferences, fmt.Sprintf("/organizations/%v/preferences", organizationPreferencesIdentity), o)
3176 }
3177
3178 // An outbound-ruleset is a collection of rules that specify what hosts
3179 // Dynos are allowed to communicate with.
3180 type OutboundRuleset struct {
3181 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when outbound-ruleset was created
3182 CreatedBy string `json:"created_by" url:"created_by,key"` // unique email address of account
3183 ID string `json:"id" url:"id,key"` // unique identifier of an outbound-ruleset
3184 Rules []struct {
3185 FromPort int `json:"from_port" url:"from_port,key"` // an endpoint of communication in an operating system.
3186 Protocol string `json:"protocol" url:"protocol,key"` // formal standards and policies comprised of rules, procedures and
3187 // formats that define communication between two or more devices over a
3188 // network
3189 Target string `json:"target" url:"target,key"` // is the target destination in CIDR notation
3190 ToPort int `json:"to_port" url:"to_port,key"` // an endpoint of communication in an operating system.
3191 } `json:"rules" url:"rules,key"`
3192 Space struct {
3193 ID string `json:"id" url:"id,key"` // unique identifier of space
3194 Name string `json:"name" url:"name,key"` // unique name of space
3195 } `json:"space" url:"space,key"` // identity of space
3196 }
3197
3198 // Current outbound ruleset for a space
3199 func (s *Service) OutboundRulesetCurrent(ctx context.Context, spaceIdentity string) (*OutboundRuleset, error) {
3200 var outboundRuleset OutboundRuleset
3201 return &outboundRuleset, s.Get(ctx, &outboundRuleset, fmt.Sprintf("/spaces/%v/outbound-ruleset", spaceIdentity), nil, nil)
3202 }
3203
3204 // Info on an existing Outbound Ruleset
3205 func (s *Service) OutboundRulesetInfo(ctx context.Context, spaceIdentity string, outboundRulesetIdentity string) (*OutboundRuleset, error) {
3206 var outboundRuleset OutboundRuleset
3207 return &outboundRuleset, s.Get(ctx, &outboundRuleset, fmt.Sprintf("/spaces/%v/outbound-rulesets/%v", spaceIdentity, outboundRulesetIdentity), nil, nil)
3208 }
3209
3210 type OutboundRulesetListResult []OutboundRuleset
3211
3212 // List all Outbound Rulesets for a space
3213 func (s *Service) OutboundRulesetList(ctx context.Context, spaceIdentity string, lr *ListRange) (OutboundRulesetListResult, error) {
3214 var outboundRuleset OutboundRulesetListResult
3215 return outboundRuleset, s.Get(ctx, &outboundRuleset, fmt.Sprintf("/spaces/%v/outbound-rulesets", spaceIdentity), nil, lr)
3216 }
3217
3218 type OutboundRulesetCreateOpts struct {
3219 Rules []*struct {
3220 FromPort int `json:"from_port" url:"from_port,key"` // an endpoint of communication in an operating system.
3221 Protocol string `json:"protocol" url:"protocol,key"` // formal standards and policies comprised of rules, procedures and
3222 // formats that define communication between two or more devices over a
3223 // network
3224 Target string `json:"target" url:"target,key"` // is the target destination in CIDR notation
3225 ToPort int `json:"to_port" url:"to_port,key"` // an endpoint of communication in an operating system.
3226 } `json:"rules,omitempty" url:"rules,omitempty,key"`
3227 }
3228
3229 // Create a new outbound ruleset
3230 func (s *Service) OutboundRulesetCreate(ctx context.Context, spaceIdentity string, o OutboundRulesetCreateOpts) (*OutboundRuleset, error) {
3231 var outboundRuleset OutboundRuleset
3232 return &outboundRuleset, s.Put(ctx, &outboundRuleset, fmt.Sprintf("/spaces/%v/outbound-ruleset", spaceIdentity), o)
3233 }
3234
3235 // A password reset represents a in-process password reset attempt.
3236 type PasswordReset struct {
3237 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when password reset was created
3238 User struct {
3239 Email string `json:"email" url:"email,key"` // unique email address of account
3240 ID string `json:"id" url:"id,key"` // unique identifier of an account
3241 } `json:"user" url:"user,key"`
3242 }
3243 type PasswordResetResetPasswordOpts struct {
3244 Email *string `json:"email,omitempty" url:"email,omitempty,key"` // unique email address of account
3245 }
3246
3247 // Reset account's password. This will send a reset password link to the
3248 // user's email address.
3249 func (s *Service) PasswordResetResetPassword(ctx context.Context, o PasswordResetResetPasswordOpts) (*PasswordReset, error) {
3250 var passwordReset PasswordReset
3251 return &passwordReset, s.Post(ctx, &passwordReset, fmt.Sprintf("/password-resets"), o)
3252 }
3253
3254 type PasswordResetCompleteResetPasswordOpts struct {
3255 Password *string `json:"password,omitempty" url:"password,omitempty,key"` // current password on the account
3256 PasswordConfirmation *string `json:"password_confirmation,omitempty" url:"password_confirmation,omitempty,key"` // confirmation of the new password
3257 }
3258
3259 // Complete password reset.
3260 func (s *Service) PasswordResetCompleteResetPassword(ctx context.Context, passwordResetResetPasswordToken string, o PasswordResetCompleteResetPasswordOpts) (*PasswordReset, error) {
3261 var passwordReset PasswordReset
3262 return &passwordReset, s.Post(ctx, &passwordReset, fmt.Sprintf("/password-resets/%v/actions/finalize", passwordResetResetPasswordToken), o)
3263 }
3264
3265 // [Peering](https://devcenter.heroku.com/articles/private-space-vpc-peer
3266 // ing) provides a way to peer your Private Space VPC to another AWS
3267 // VPC.
3268 type Peering struct {
3269 AwsAccountID string `json:"aws_account_id" url:"aws_account_id,key"` // The AWS account ID of your Private Space.
3270 AwsRegion string `json:"aws_region" url:"aws_region,key"` // The AWS region of the peer connection.
3271 AwsVpcID string `json:"aws_vpc_id" url:"aws_vpc_id,key"` // The AWS VPC ID of the peer.
3272 CIDRBlocks []string `json:"cidr_blocks" url:"cidr_blocks,key"` // The CIDR blocks of the peer.
3273 Expires time.Time `json:"expires" url:"expires,key"` // When a peering connection will expire.
3274 PcxID string `json:"pcx_id" url:"pcx_id,key"` // The AWS VPC Peering Connection ID of the peering.
3275 Status string `json:"status" url:"status,key"` // The status of the peering connection.
3276 Type string `json:"type" url:"type,key"` // The type of peering connection.
3277 }
3278 type PeeringListResult []Peering
3279
3280 // List peering connections of a private space.
3281 func (s *Service) PeeringList(ctx context.Context, spaceIdentity string, lr *ListRange) (PeeringListResult, error) {
3282 var peering PeeringListResult
3283 return peering, s.Get(ctx, &peering, fmt.Sprintf("/spaces/%v/peerings", spaceIdentity), nil, lr)
3284 }
3285
3286 // Accept a pending peering connection with a private space.
3287 func (s *Service) PeeringAccept(ctx context.Context, spaceIdentity string, peeringPcxID string) (*Peering, error) {
3288 var peering Peering
3289 return &peering, s.Post(ctx, &peering, fmt.Sprintf("/spaces/%v/peerings/%v/actions/accept", spaceIdentity, peeringPcxID), nil)
3290 }
3291
3292 // Destroy an active peering connection with a private space.
3293 func (s *Service) PeeringDestroy(ctx context.Context, spaceIdentity string, peeringPcxID string) (*Peering, error) {
3294 var peering Peering
3295 return &peering, s.Delete(ctx, &peering, fmt.Sprintf("/spaces/%v/peerings/%v", spaceIdentity, peeringPcxID))
3296 }
3297
3298 // Fetch information for existing peering connection
3299 func (s *Service) PeeringInfo(ctx context.Context, spaceIdentity string, peeringPcxID string) (*Peering, error) {
3300 var peering Peering
3301 return &peering, s.Get(ctx, &peering, fmt.Sprintf("/spaces/%v/peerings/%v", spaceIdentity, peeringPcxID), nil, nil)
3302 }
3303
3304 // [Peering
3305 // Info](https://devcenter.heroku.com/articles/private-space-vpc-peering)
3306 // gives you the information necessary to peer an AWS VPC to a Private
3307 // Space.
3308 type PeeringInfo struct {
3309 AwsAccountID string `json:"aws_account_id" url:"aws_account_id,key"` // The AWS account ID of your Private Space.
3310 AwsRegion string `json:"aws_region" url:"aws_region,key"` // region name used by provider
3311 DynoCIDRBlocks []string `json:"dyno_cidr_blocks" url:"dyno_cidr_blocks,key"` // The CIDR ranges that should be routed to the Private Space VPC.
3312 SpaceCIDRBlocks []string `json:"space_cidr_blocks" url:"space_cidr_blocks,key"` // The CIDR ranges that should be routed to the Private Space VPC.
3313 UnavailableCIDRBlocks []string `json:"unavailable_cidr_blocks" url:"unavailable_cidr_blocks,key"` // The CIDR ranges that you must not conflict with.
3314 VpcCIDR string `json:"vpc_cidr" url:"vpc_cidr,key"` // An IP address and the number of significant bits that make up the
3315 // routing or networking portion.
3316 VpcID string `json:"vpc_id" url:"vpc_id,key"` // The AWS VPC ID of the peer.
3317 }
3318
3319 // Provides the necessary information to establish an AWS VPC Peering
3320 // with your private space.
3321 func (s *Service) PeeringInfoInfo(ctx context.Context, spaceIdentity string) (*PeeringInfo, error) {
3322 var peeringInfo PeeringInfo
3323 return &peeringInfo, s.Get(ctx, &peeringInfo, fmt.Sprintf("/spaces/%v/peering-info", spaceIdentity), nil, nil)
3324 }
3325
3326 // A pipeline allows grouping of apps into different stages.
3327 type Pipeline struct {
3328 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when pipeline was created
3329 ID string `json:"id" url:"id,key"` // unique identifier of pipeline
3330 Name string `json:"name" url:"name,key"` // name of pipeline
3331 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when pipeline was updated
3332 }
3333 type PipelineCreateOpts struct {
3334 Name string `json:"name" url:"name,key"` // name of pipeline
3335 }
3336
3337 // Create a new pipeline.
3338 func (s *Service) PipelineCreate(ctx context.Context, o PipelineCreateOpts) (*Pipeline, error) {
3339 var pipeline Pipeline
3340 return &pipeline, s.Post(ctx, &pipeline, fmt.Sprintf("/pipelines"), o)
3341 }
3342
3343 // Info for existing pipeline.
3344 func (s *Service) PipelineInfo(ctx context.Context, pipelineIdentity string) (*Pipeline, error) {
3345 var pipeline Pipeline
3346 return &pipeline, s.Get(ctx, &pipeline, fmt.Sprintf("/pipelines/%v", pipelineIdentity), nil, nil)
3347 }
3348
3349 // Delete an existing pipeline.
3350 func (s *Service) PipelineDelete(ctx context.Context, pipelineID string) (*Pipeline, error) {
3351 var pipeline Pipeline
3352 return &pipeline, s.Delete(ctx, &pipeline, fmt.Sprintf("/pipelines/%v", pipelineID))
3353 }
3354
3355 type PipelineUpdateOpts struct {
3356 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // name of pipeline
3357 }
3358
3359 // Update an existing pipeline.
3360 func (s *Service) PipelineUpdate(ctx context.Context, pipelineID string, o PipelineUpdateOpts) (*Pipeline, error) {
3361 var pipeline Pipeline
3362 return &pipeline, s.Patch(ctx, &pipeline, fmt.Sprintf("/pipelines/%v", pipelineID), o)
3363 }
3364
3365 type PipelineListResult []Pipeline
3366
3367 // List existing pipelines.
3368 func (s *Service) PipelineList(ctx context.Context, lr *ListRange) (PipelineListResult, error) {
3369 var pipeline PipelineListResult
3370 return pipeline, s.Get(ctx, &pipeline, fmt.Sprintf("/pipelines"), nil, lr)
3371 }
3372
3373 // Information about an app's coupling to a pipeline
3374 type PipelineCoupling struct {
3375 App struct {
3376 ID string `json:"id" url:"id,key"` // unique identifier of app
3377 } `json:"app" url:"app,key"` // app involved in the pipeline coupling
3378 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when pipeline coupling was created
3379 ID string `json:"id" url:"id,key"` // unique identifier of pipeline coupling
3380 Pipeline struct {
3381 ID string `json:"id" url:"id,key"` // unique identifier of pipeline
3382 } `json:"pipeline" url:"pipeline,key"` // pipeline involved in the coupling
3383 Stage string `json:"stage" url:"stage,key"` // target pipeline stage
3384 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when pipeline coupling was updated
3385 }
3386 type PipelineCouplingListByPipelineResult []PipelineCoupling
3387
3388 // List couplings for a pipeline
3389 func (s *Service) PipelineCouplingListByPipeline(ctx context.Context, pipelineID string, lr *ListRange) (PipelineCouplingListByPipelineResult, error) {
3390 var pipelineCoupling PipelineCouplingListByPipelineResult
3391 return pipelineCoupling, s.Get(ctx, &pipelineCoupling, fmt.Sprintf("/pipelines/%v/pipeline-couplings", pipelineID), nil, lr)
3392 }
3393
3394 type PipelineCouplingListForCurrentUserResult []PipelineCoupling
3395
3396 // List pipeline couplings for the current user.
3397 func (s *Service) PipelineCouplingListForCurrentUser(ctx context.Context, lr *ListRange) (PipelineCouplingListForCurrentUserResult, error) {
3398 var pipelineCoupling PipelineCouplingListForCurrentUserResult
3399 return pipelineCoupling, s.Get(ctx, &pipelineCoupling, fmt.Sprintf("/users/~/pipeline-couplings"), nil, lr)
3400 }
3401
3402 type PipelineCouplingListResult []PipelineCoupling
3403
3404 // List pipeline couplings.
3405 func (s *Service) PipelineCouplingList(ctx context.Context, lr *ListRange) (PipelineCouplingListResult, error) {
3406 var pipelineCoupling PipelineCouplingListResult
3407 return pipelineCoupling, s.Get(ctx, &pipelineCoupling, fmt.Sprintf("/pipeline-couplings"), nil, lr)
3408 }
3409
3410 type PipelineCouplingCreateOpts struct {
3411 App string `json:"app" url:"app,key"` // unique identifier of app
3412 Pipeline string `json:"pipeline" url:"pipeline,key"` // unique identifier of pipeline
3413 Stage string `json:"stage" url:"stage,key"` // target pipeline stage
3414 }
3415
3416 // Create a new pipeline coupling.
3417 func (s *Service) PipelineCouplingCreate(ctx context.Context, o PipelineCouplingCreateOpts) (*PipelineCoupling, error) {
3418 var pipelineCoupling PipelineCoupling
3419 return &pipelineCoupling, s.Post(ctx, &pipelineCoupling, fmt.Sprintf("/pipeline-couplings"), o)
3420 }
3421
3422 // Info for an existing pipeline coupling.
3423 func (s *Service) PipelineCouplingInfo(ctx context.Context, pipelineCouplingIdentity string) (*PipelineCoupling, error) {
3424 var pipelineCoupling PipelineCoupling
3425 return &pipelineCoupling, s.Get(ctx, &pipelineCoupling, fmt.Sprintf("/pipeline-couplings/%v", pipelineCouplingIdentity), nil, nil)
3426 }
3427
3428 // Delete an existing pipeline coupling.
3429 func (s *Service) PipelineCouplingDelete(ctx context.Context, pipelineCouplingIdentity string) (*PipelineCoupling, error) {
3430 var pipelineCoupling PipelineCoupling
3431 return &pipelineCoupling, s.Delete(ctx, &pipelineCoupling, fmt.Sprintf("/pipeline-couplings/%v", pipelineCouplingIdentity))
3432 }
3433
3434 type PipelineCouplingUpdateOpts struct {
3435 Stage *string `json:"stage,omitempty" url:"stage,omitempty,key"` // target pipeline stage
3436 }
3437
3438 // Update an existing pipeline coupling.
3439 func (s *Service) PipelineCouplingUpdate(ctx context.Context, pipelineCouplingIdentity string, o PipelineCouplingUpdateOpts) (*PipelineCoupling, error) {
3440 var pipelineCoupling PipelineCoupling
3441 return &pipelineCoupling, s.Patch(ctx, &pipelineCoupling, fmt.Sprintf("/pipeline-couplings/%v", pipelineCouplingIdentity), o)
3442 }
3443
3444 // Info for an existing app pipeline coupling.
3445 func (s *Service) PipelineCouplingInfoByApp(ctx context.Context, appIdentity string) (*PipelineCoupling, error) {
3446 var pipelineCoupling PipelineCoupling
3447 return &pipelineCoupling, s.Get(ctx, &pipelineCoupling, fmt.Sprintf("/apps/%v/pipeline-couplings", appIdentity), nil, nil)
3448 }
3449
3450 // Promotions allow you to move code from an app in a pipeline to all
3451 // targets
3452 type PipelinePromotion struct {
3453 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when promotion was created
3454 ID string `json:"id" url:"id,key"` // unique identifier of promotion
3455 Pipeline struct {
3456 ID string `json:"id" url:"id,key"` // unique identifier of pipeline
3457 } `json:"pipeline" url:"pipeline,key"` // the pipeline which the promotion belongs to
3458 Source struct {
3459 App struct {
3460 ID string `json:"id" url:"id,key"` // unique identifier of app
3461 } `json:"app" url:"app,key"` // the app which was promoted from
3462 Release struct {
3463 ID string `json:"id" url:"id,key"` // unique identifier of release
3464 } `json:"release" url:"release,key"` // the release used to promoted from
3465 } `json:"source" url:"source,key"` // the app being promoted from
3466 Status string `json:"status" url:"status,key"` // status of promotion
3467 UpdatedAt *time.Time `json:"updated_at" url:"updated_at,key"` // when promotion was updated
3468 }
3469 type PipelinePromotionCreateOpts struct {
3470 Pipeline struct {
3471 ID string `json:"id" url:"id,key"` // unique identifier of pipeline
3472 } `json:"pipeline" url:"pipeline,key"` // pipeline involved in the promotion
3473 Source struct {
3474 App *struct {
3475 ID *string `json:"id,omitempty" url:"id,omitempty,key"` // unique identifier of app
3476 } `json:"app,omitempty" url:"app,omitempty,key"` // the app which was promoted from
3477 } `json:"source" url:"source,key"` // the app being promoted from
3478 Targets []struct {
3479 App *struct {
3480 ID *string `json:"id,omitempty" url:"id,omitempty,key"` // unique identifier of app
3481 } `json:"app,omitempty" url:"app,omitempty,key"` // the app is being promoted to
3482 } `json:"targets" url:"targets,key"`
3483 }
3484
3485 // Create a new promotion.
3486 func (s *Service) PipelinePromotionCreate(ctx context.Context, o PipelinePromotionCreateOpts) (*PipelinePromotion, error) {
3487 var pipelinePromotion PipelinePromotion
3488 return &pipelinePromotion, s.Post(ctx, &pipelinePromotion, fmt.Sprintf("/pipeline-promotions"), o)
3489 }
3490
3491 // Info for existing pipeline promotion.
3492 func (s *Service) PipelinePromotionInfo(ctx context.Context, pipelinePromotionIdentity string) (*PipelinePromotion, error) {
3493 var pipelinePromotion PipelinePromotion
3494 return &pipelinePromotion, s.Get(ctx, &pipelinePromotion, fmt.Sprintf("/pipeline-promotions/%v", pipelinePromotionIdentity), nil, nil)
3495 }
3496
3497 // Promotion targets represent an individual app being promoted to
3498 type PipelinePromotionTarget struct {
3499 App struct {
3500 ID string `json:"id" url:"id,key"` // unique identifier of app
3501 } `json:"app" url:"app,key"` // the app which was promoted to
3502 ErrorMessage *string `json:"error_message" url:"error_message,key"` // an error message for why the promotion failed
3503 ID string `json:"id" url:"id,key"` // unique identifier of promotion target
3504 PipelinePromotion struct {
3505 ID string `json:"id" url:"id,key"` // unique identifier of promotion
3506 } `json:"pipeline_promotion" url:"pipeline_promotion,key"` // the promotion which the target belongs to
3507 Release *struct {
3508 ID string `json:"id" url:"id,key"` // unique identifier of release
3509 } `json:"release" url:"release,key"` // the release which was created on the target app
3510 Status string `json:"status" url:"status,key"` // status of promotion
3511 }
3512 type PipelinePromotionTargetListResult []PipelinePromotionTarget
3513
3514 // List promotion targets belonging to an existing promotion.
3515 func (s *Service) PipelinePromotionTargetList(ctx context.Context, pipelinePromotionID string, lr *ListRange) (PipelinePromotionTargetListResult, error) {
3516 var pipelinePromotionTarget PipelinePromotionTargetListResult
3517 return pipelinePromotionTarget, s.Get(ctx, &pipelinePromotionTarget, fmt.Sprintf("/pipeline-promotions/%v/promotion-targets", pipelinePromotionID), nil, lr)
3518 }
3519
3520 // Plans represent different configurations of add-ons that may be added
3521 // to apps. Endpoints under add-on services can be accessed without
3522 // authentication.
3523 type Plan struct {
3524 AddonService struct {
3525 ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service
3526 Name string `json:"name" url:"name,key"` // unique name of this add-on-service
3527 } `json:"addon_service" url:"addon_service,key"` // identity of add-on service
3528 Compliance []string `json:"compliance" url:"compliance,key"` // the compliance regimes applied to an add-on plan
3529 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when plan was created
3530 Default bool `json:"default" url:"default,key"` // whether this plan is the default for its add-on service
3531 Description string `json:"description" url:"description,key"` // description of plan
3532 HumanName string `json:"human_name" url:"human_name,key"` // human readable name of the add-on plan
3533 ID string `json:"id" url:"id,key"` // unique identifier of this plan
3534 InstallableInsidePrivateNetwork bool `json:"installable_inside_private_network" url:"installable_inside_private_network,key"` // whether this plan is installable to a Private Spaces app
3535 InstallableOutsidePrivateNetwork bool `json:"installable_outside_private_network" url:"installable_outside_private_network,key"` // whether this plan is installable to a Common Runtime app
3536 Name string `json:"name" url:"name,key"` // unique name of this plan
3537 Price struct {
3538 Cents int `json:"cents" url:"cents,key"` // price in cents per unit of plan
3539 Contract bool `json:"contract" url:"contract,key"` // price is negotiated in a contract outside of monthly add-on billing
3540 Unit string `json:"unit" url:"unit,key"` // unit of price for plan
3541 } `json:"price" url:"price,key"` // price
3542 SpaceDefault bool `json:"space_default" url:"space_default,key"` // whether this plan is the default for apps in Private Spaces
3543 State string `json:"state" url:"state,key"` // release status for plan
3544 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when plan was updated
3545 Visible bool `json:"visible" url:"visible,key"` // whether this plan is publicly visible
3546 }
3547
3548 // Info for existing plan.
3549 func (s *Service) PlanInfo(ctx context.Context, planIdentity string) (*Plan, error) {
3550 var plan Plan
3551 return &plan, s.Get(ctx, &plan, fmt.Sprintf("/plans/%v", planIdentity), nil, nil)
3552 }
3553
3554 // Info for existing plan by Add-on.
3555 func (s *Service) PlanInfoByAddOn(ctx context.Context, addOnServiceIdentity string, planIdentity string) (*Plan, error) {
3556 var plan Plan
3557 return &plan, s.Get(ctx, &plan, fmt.Sprintf("/addon-services/%v/plans/%v", addOnServiceIdentity, planIdentity), nil, nil)
3558 }
3559
3560 type PlanListByAddOnResult []Plan
3561
3562 // List existing plans by Add-on.
3563 func (s *Service) PlanListByAddOn(ctx context.Context, addOnServiceIdentity string, lr *ListRange) (PlanListByAddOnResult, error) {
3564 var plan PlanListByAddOnResult
3565 return plan, s.Get(ctx, &plan, fmt.Sprintf("/addon-services/%v/plans", addOnServiceIdentity), nil, lr)
3566 }
3567
3568 // Rate Limit represents the number of request tokens each account
3569 // holds. Requests to this endpoint do not count towards the rate limit.
3570 type RateLimit struct {
3571 Remaining int `json:"remaining" url:"remaining,key"` // allowed requests remaining in current interval
3572 }
3573
3574 // Info for rate limits.
3575 func (s *Service) RateLimitInfo(ctx context.Context) (*RateLimit, error) {
3576 var rateLimit RateLimit
3577 return &rateLimit, s.Get(ctx, &rateLimit, fmt.Sprintf("/account/rate-limits"), nil, nil)
3578 }
3579
3580 // A region represents a geographic location in which your application
3581 // may run.
3582 type Region struct {
3583 Country string `json:"country" url:"country,key"` // country where the region exists
3584 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when region was created
3585 Description string `json:"description" url:"description,key"` // description of region
3586 ID string `json:"id" url:"id,key"` // unique identifier of region
3587 Locale string `json:"locale" url:"locale,key"` // area in the country where the region exists
3588 Name string `json:"name" url:"name,key"` // unique name of region
3589 PrivateCapable bool `json:"private_capable" url:"private_capable,key"` // whether or not region is available for creating a Private Space
3590 Provider struct {
3591 Name string `json:"name" url:"name,key"` // name of provider
3592 Region string `json:"region" url:"region,key"` // region name used by provider
3593 } `json:"provider" url:"provider,key"` // provider of underlying substrate
3594 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when region was updated
3595 }
3596
3597 // Info for existing region.
3598 func (s *Service) RegionInfo(ctx context.Context, regionIdentity string) (*Region, error) {
3599 var region Region
3600 return &region, s.Get(ctx, &region, fmt.Sprintf("/regions/%v", regionIdentity), nil, nil)
3601 }
3602
3603 type RegionListResult []Region
3604
3605 // List existing regions.
3606 func (s *Service) RegionList(ctx context.Context, lr *ListRange) (RegionListResult, error) {
3607 var region RegionListResult
3608 return region, s.Get(ctx, &region, fmt.Sprintf("/regions"), nil, lr)
3609 }
3610
3611 // A release represents a combination of code, config vars and add-ons
3612 // for an app on Heroku.
3613 type Release struct {
3614 AddonPlanNames []string `json:"addon_plan_names" url:"addon_plan_names,key"` // add-on plans installed on the app for this release
3615 App struct {
3616 ID string `json:"id" url:"id,key"` // unique identifier of app
3617 Name string `json:"name" url:"name,key"` // unique name of app
3618 } `json:"app" url:"app,key"` // app involved in the release
3619 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when release was created
3620 Current bool `json:"current" url:"current,key"` // indicates this release as being the current one for the app
3621 Description string `json:"description" url:"description,key"` // description of changes in this release
3622 ID string `json:"id" url:"id,key"` // unique identifier of release
3623 OutputStreamURL *string `json:"output_stream_url" url:"output_stream_url,key"` // Release command output will be available from this URL as a stream.
3624 // The stream is available as either `text/plain` or
3625 // `text/event-stream`. Clients should be prepared to handle disconnects
3626 // and can resume the stream by sending a `Range` header (for
3627 // `text/plain`) or a `Last-Event-Id` header (for `text/event-stream`).
3628 Slug *struct {
3629 ID string `json:"id" url:"id,key"` // unique identifier of slug
3630 } `json:"slug" url:"slug,key"` // slug running in this release
3631 Status string `json:"status" url:"status,key"` // current status of the release
3632 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when release was updated
3633 User struct {
3634 Email string `json:"email" url:"email,key"` // unique email address of account
3635 ID string `json:"id" url:"id,key"` // unique identifier of an account
3636 } `json:"user" url:"user,key"` // user that created the release
3637 Version int `json:"version" url:"version,key"` // unique version assigned to the release
3638 }
3639
3640 // Info for existing release.
3641 func (s *Service) ReleaseInfo(ctx context.Context, appIdentity string, releaseIdentity string) (*Release, error) {
3642 var release Release
3643 return &release, s.Get(ctx, &release, fmt.Sprintf("/apps/%v/releases/%v", appIdentity, releaseIdentity), nil, nil)
3644 }
3645
3646 type ReleaseListResult []Release
3647
3648 // List existing releases.
3649 func (s *Service) ReleaseList(ctx context.Context, appIdentity string, lr *ListRange) (ReleaseListResult, error) {
3650 var release ReleaseListResult
3651 return release, s.Get(ctx, &release, fmt.Sprintf("/apps/%v/releases", appIdentity), nil, lr)
3652 }
3653
3654 type ReleaseCreateOpts struct {
3655 Description *string `json:"description,omitempty" url:"description,omitempty,key"` // description of changes in this release
3656 Slug string `json:"slug" url:"slug,key"` // unique identifier of slug
3657 }
3658
3659 // Create new release.
3660 func (s *Service) ReleaseCreate(ctx context.Context, appIdentity string, o ReleaseCreateOpts) (*Release, error) {
3661 var release Release
3662 return &release, s.Post(ctx, &release, fmt.Sprintf("/apps/%v/releases", appIdentity), o)
3663 }
3664
3665 type ReleaseRollbackOpts struct {
3666 Release string `json:"release" url:"release,key"` // unique identifier of release
3667 }
3668
3669 // Rollback to an existing release.
3670 func (s *Service) ReleaseRollback(ctx context.Context, appIdentity string, o ReleaseRollbackOpts) (*Release, error) {
3671 var release Release
3672 return &release, s.Post(ctx, &release, fmt.Sprintf("/apps/%v/releases", appIdentity), o)
3673 }
3674
3675 // A slug is a snapshot of your application code that is ready to run on
3676 // the platform.
3677 type Slug struct {
3678 Blob struct {
3679 Method string `json:"method" url:"method,key"` // method to be used to interact with the slug blob
3680 URL string `json:"url" url:"url,key"` // URL to interact with the slug blob
3681 } `json:"blob" url:"blob,key"` // pointer to the url where clients can fetch or store the actual
3682 // release binary
3683 BuildpackProvidedDescription *string `json:"buildpack_provided_description" url:"buildpack_provided_description,key"` // description from buildpack of slug
3684 Checksum *string `json:"checksum" url:"checksum,key"` // an optional checksum of the slug for verifying its integrity
3685 Commit *string `json:"commit" url:"commit,key"` // identification of the code with your version control system (eg: SHA
3686 // of the git HEAD)
3687 CommitDescription *string `json:"commit_description" url:"commit_description,key"` // an optional description of the provided commit
3688 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when slug was created
3689 ID string `json:"id" url:"id,key"` // unique identifier of slug
3690 ProcessTypes map[string]string `json:"process_types" url:"process_types,key"` // hash mapping process type names to their respective command
3691 Size *int `json:"size" url:"size,key"` // size of slug, in bytes
3692 Stack struct {
3693 ID string `json:"id" url:"id,key"` // unique identifier of stack
3694 Name string `json:"name" url:"name,key"` // unique name of stack
3695 } `json:"stack" url:"stack,key"` // identity of slug stack
3696 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when slug was updated
3697 }
3698
3699 // Info for existing slug.
3700 func (s *Service) SlugInfo(ctx context.Context, appIdentity string, slugIdentity string) (*Slug, error) {
3701 var slug Slug
3702 return &slug, s.Get(ctx, &slug, fmt.Sprintf("/apps/%v/slugs/%v", appIdentity, slugIdentity), nil, nil)
3703 }
3704
3705 type SlugCreateOpts struct {
3706 BuildpackProvidedDescription *string `json:"buildpack_provided_description,omitempty" url:"buildpack_provided_description,omitempty,key"` // description from buildpack of slug
3707 Checksum *string `json:"checksum,omitempty" url:"checksum,omitempty,key"` // an optional checksum of the slug for verifying its integrity
3708 Commit *string `json:"commit,omitempty" url:"commit,omitempty,key"` // identification of the code with your version control system (eg: SHA
3709 // of the git HEAD)
3710 CommitDescription *string `json:"commit_description,omitempty" url:"commit_description,omitempty,key"` // an optional description of the provided commit
3711 ProcessTypes map[string]string `json:"process_types" url:"process_types,key"` // hash mapping process type names to their respective command
3712 Stack *string `json:"stack,omitempty" url:"stack,omitempty,key"` // unique name of stack
3713 }
3714
3715 // Create a new slug. For more information please refer to [Deploying
3716 // Slugs using the Platform
3717 // API](https://devcenter.heroku.com/articles/platform-api-deploying-slug
3718 // s).
3719 func (s *Service) SlugCreate(ctx context.Context, appIdentity string, o SlugCreateOpts) (*Slug, error) {
3720 var slug Slug
3721 return &slug, s.Post(ctx, &slug, fmt.Sprintf("/apps/%v/slugs", appIdentity), o)
3722 }
3723
3724 // SMS numbers are used for recovery on accounts with two-factor
3725 // authentication enabled.
3726 type SmsNumber struct {
3727 SmsNumber *string `json:"sms_number" url:"sms_number,key"` // SMS number of account
3728 }
3729
3730 // Recover an account using an SMS recovery code
3731 func (s *Service) SmsNumberSMSNumber(ctx context.Context, accountIdentity string) (*SmsNumber, error) {
3732 var smsNumber SmsNumber
3733 return &smsNumber, s.Get(ctx, &smsNumber, fmt.Sprintf("/users/%v/sms-number", accountIdentity), nil, nil)
3734 }
3735
3736 // Recover an account using an SMS recovery code
3737 func (s *Service) SmsNumberRecover(ctx context.Context, accountIdentity string) (*SmsNumber, error) {
3738 var smsNumber SmsNumber
3739 return &smsNumber, s.Post(ctx, &smsNumber, fmt.Sprintf("/users/%v/sms-number/actions/recover", accountIdentity), nil)
3740 }
3741
3742 // Confirm an SMS number change with a confirmation code
3743 func (s *Service) SmsNumberConfirm(ctx context.Context, accountIdentity string) (*SmsNumber, error) {
3744 var smsNumber SmsNumber
3745 return &smsNumber, s.Post(ctx, &smsNumber, fmt.Sprintf("/users/%v/sms-number/actions/confirm", accountIdentity), nil)
3746 }
3747
3748 // SNI Endpoint is a public address serving a custom SSL cert for HTTPS
3749 // traffic, using the SNI TLS extension, to a Heroku app.
3750 type SniEndpoint struct {
3751 CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file)
3752 CName string `json:"cname" url:"cname,key"` // deprecated; refer to GET /apps/:id/domains for valid CNAMEs for this
3753 // app
3754 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when endpoint was created
3755 ID string `json:"id" url:"id,key"` // unique identifier of this SNI endpoint
3756 Name string `json:"name" url:"name,key"` // unique name for SNI endpoint
3757 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when SNI endpoint was updated
3758 }
3759 type SniEndpointCreateOpts struct {
3760 CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file)
3761 PrivateKey string `json:"private_key" url:"private_key,key"` // contents of the private key (eg .key file)
3762 }
3763
3764 // Create a new SNI endpoint.
3765 func (s *Service) SniEndpointCreate(ctx context.Context, appIdentity string, o SniEndpointCreateOpts) (*SniEndpoint, error) {
3766 var sniEndpoint SniEndpoint
3767 return &sniEndpoint, s.Post(ctx, &sniEndpoint, fmt.Sprintf("/apps/%v/sni-endpoints", appIdentity), o)
3768 }
3769
3770 // Delete existing SNI endpoint.
3771 func (s *Service) SniEndpointDelete(ctx context.Context, appIdentity string, sniEndpointIdentity string) (*SniEndpoint, error) {
3772 var sniEndpoint SniEndpoint
3773 return &sniEndpoint, s.Delete(ctx, &sniEndpoint, fmt.Sprintf("/apps/%v/sni-endpoints/%v", appIdentity, sniEndpointIdentity))
3774 }
3775
3776 // Info for existing SNI endpoint.
3777 func (s *Service) SniEndpointInfo(ctx context.Context, appIdentity string, sniEndpointIdentity string) (*SniEndpoint, error) {
3778 var sniEndpoint SniEndpoint
3779 return &sniEndpoint, s.Get(ctx, &sniEndpoint, fmt.Sprintf("/apps/%v/sni-endpoints/%v", appIdentity, sniEndpointIdentity), nil, nil)
3780 }
3781
3782 type SniEndpointListResult []SniEndpoint
3783
3784 // List existing SNI endpoints.
3785 func (s *Service) SniEndpointList(ctx context.Context, appIdentity string, lr *ListRange) (SniEndpointListResult, error) {
3786 var sniEndpoint SniEndpointListResult
3787 return sniEndpoint, s.Get(ctx, &sniEndpoint, fmt.Sprintf("/apps/%v/sni-endpoints", appIdentity), nil, lr)
3788 }
3789
3790 type SniEndpointUpdateOpts struct {
3791 CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file)
3792 PrivateKey string `json:"private_key" url:"private_key,key"` // contents of the private key (eg .key file)
3793 }
3794
3795 // Update an existing SNI endpoint.
3796 func (s *Service) SniEndpointUpdate(ctx context.Context, appIdentity string, sniEndpointIdentity string, o SniEndpointUpdateOpts) (*SniEndpoint, error) {
3797 var sniEndpoint SniEndpoint
3798 return &sniEndpoint, s.Patch(ctx, &sniEndpoint, fmt.Sprintf("/apps/%v/sni-endpoints/%v", appIdentity, sniEndpointIdentity), o)
3799 }
3800
3801 // A source is a location for uploading and downloading an application's
3802 // source code.
3803 type Source struct {
3804 SourceBlob struct {
3805 GetURL string `json:"get_url" url:"get_url,key"` // URL to download the source
3806 PutURL string `json:"put_url" url:"put_url,key"` // URL to upload the source
3807 } `json:"source_blob" url:"source_blob,key"` // pointer to the URL where clients can fetch or store the source
3808 }
3809
3810 // Create URLs for uploading and downloading source.
3811 func (s *Service) SourceCreate(ctx context.Context) (*Source, error) {
3812 var source Source
3813 return &source, s.Post(ctx, &source, fmt.Sprintf("/sources"), nil)
3814 }
3815
3816 // Create URLs for uploading and downloading source. Deprecated in favor
3817 // of `POST /sources`
3818 func (s *Service) SourceCreateDeprecated(ctx context.Context, appIdentity string) (*Source, error) {
3819 var source Source
3820 return &source, s.Post(ctx, &source, fmt.Sprintf("/apps/%v/sources", appIdentity), nil)
3821 }
3822
3823 // A space is an isolated, highly available, secure app execution
3824 // environments, running in the modern VPC substrate.
3825 type Space struct {
3826 CIDR string `json:"cidr" url:"cidr,key"` // The RFC-1918 CIDR the Private Space will use. It must be a /16 in
3827 // 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16
3828 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when space was created
3829 DataCIDR string `json:"data_cidr" url:"data_cidr,key"` // The RFC-1918 CIDR that the Private Space will use for the
3830 // Heroku-managed peering connection that's automatically created when
3831 // using Heroku Data add-ons. It must be between a /16 and a /20
3832 ID string `json:"id" url:"id,key"` // unique identifier of space
3833 Name string `json:"name" url:"name,key"` // unique name of space
3834 Organization struct {
3835 Name string `json:"name" url:"name,key"` // unique name of organization
3836 } `json:"organization" url:"organization,key"` // organization that owns this space
3837 Region struct {
3838 ID string `json:"id" url:"id,key"` // unique identifier of region
3839 Name string `json:"name" url:"name,key"` // unique name of region
3840 } `json:"region" url:"region,key"` // identity of space region
3841 Shield bool `json:"shield" url:"shield,key"` // true if this space has shield enabled
3842 State string `json:"state" url:"state,key"` // availability of this space
3843 Team struct {
3844 ID string `json:"id" url:"id,key"` // unique identifier of team
3845 Name string `json:"name" url:"name,key"` // unique name of team
3846 } `json:"team" url:"team,key"` // team that owns this space
3847 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when space was updated
3848 }
3849 type SpaceListResult []Space
3850
3851 // List existing spaces.
3852 func (s *Service) SpaceList(ctx context.Context, lr *ListRange) (SpaceListResult, error) {
3853 var space SpaceListResult
3854 return space, s.Get(ctx, &space, fmt.Sprintf("/spaces"), nil, lr)
3855 }
3856
3857 // Info for existing space.
3858 func (s *Service) SpaceInfo(ctx context.Context, spaceIdentity string) (*Space, error) {
3859 var space Space
3860 return &space, s.Get(ctx, &space, fmt.Sprintf("/spaces/%v", spaceIdentity), nil, nil)
3861 }
3862
3863 type SpaceUpdateOpts struct {
3864 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of space
3865 }
3866
3867 // Update an existing space.
3868 func (s *Service) SpaceUpdate(ctx context.Context, spaceIdentity string, o SpaceUpdateOpts) (*Space, error) {
3869 var space Space
3870 return &space, s.Patch(ctx, &space, fmt.Sprintf("/spaces/%v", spaceIdentity), o)
3871 }
3872
3873 // Delete an existing space.
3874 func (s *Service) SpaceDelete(ctx context.Context, spaceIdentity string) (*Space, error) {
3875 var space Space
3876 return &space, s.Delete(ctx, &space, fmt.Sprintf("/spaces/%v", spaceIdentity))
3877 }
3878
3879 type SpaceCreateOpts struct {
3880 CIDR *string `json:"cidr,omitempty" url:"cidr,omitempty,key"` // The RFC-1918 CIDR the Private Space will use. It must be a /16 in
3881 // 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16
3882 DataCIDR *string `json:"data_cidr,omitempty" url:"data_cidr,omitempty,key"` // The RFC-1918 CIDR that the Private Space will use for the
3883 // Heroku-managed peering connection that's automatically created when
3884 // using Heroku Data add-ons. It must be between a /16 and a /20
3885 Name string `json:"name" url:"name,key"` // unique name of space
3886 Region *string `json:"region,omitempty" url:"region,omitempty,key"` // unique identifier of region
3887 Shield *bool `json:"shield,omitempty" url:"shield,omitempty,key"` // true if this space has shield enabled
3888 Team string `json:"team" url:"team,key"` // unique name of team
3889 }
3890
3891 // Create a new space.
3892 func (s *Service) SpaceCreate(ctx context.Context, o SpaceCreateOpts) (*Space, error) {
3893 var space Space
3894 return &space, s.Post(ctx, &space, fmt.Sprintf("/spaces"), o)
3895 }
3896
3897 // Space access represents the permissions a particular user has on a
3898 // particular space.
3899 type SpaceAppAccess struct {
3900 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when space was created
3901 ID string `json:"id" url:"id,key"` // unique identifier of space
3902 Permissions []struct {
3903 Description string `json:"description" url:"description,key"`
3904 Name string `json:"name" url:"name,key"`
3905 } `json:"permissions" url:"permissions,key"` // user space permissions
3906 Space struct {
3907 ID string `json:"id" url:"id,key"` // unique identifier of app
3908 Name string `json:"name" url:"name,key"` // unique name of app
3909 } `json:"space" url:"space,key"` // space user belongs to
3910 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when space was updated
3911 User struct {
3912 Email string `json:"email" url:"email,key"` // unique email address of account
3913 ID string `json:"id" url:"id,key"` // unique identifier of an account
3914 } `json:"user" url:"user,key"` // identity of user account
3915 }
3916
3917 // List permissions for a given user on a given space.
3918 func (s *Service) SpaceAppAccessInfo(ctx context.Context, spaceIdentity string, accountIdentity string) (*SpaceAppAccess, error) {
3919 var spaceAppAccess SpaceAppAccess
3920 return &spaceAppAccess, s.Get(ctx, &spaceAppAccess, fmt.Sprintf("/spaces/%v/members/%v", spaceIdentity, accountIdentity), nil, nil)
3921 }
3922
3923 type SpaceAppAccessUpdateOpts struct {
3924 Permissions []struct {
3925 Name *string `json:"name,omitempty" url:"name,omitempty,key"`
3926 } `json:"permissions" url:"permissions,key"`
3927 }
3928
3929 // Update an existing user's set of permissions on a space.
3930 func (s *Service) SpaceAppAccessUpdate(ctx context.Context, spaceIdentity string, accountIdentity string, o SpaceAppAccessUpdateOpts) (*SpaceAppAccess, error) {
3931 var spaceAppAccess SpaceAppAccess
3932 return &spaceAppAccess, s.Patch(ctx, &spaceAppAccess, fmt.Sprintf("/spaces/%v/members/%v", spaceIdentity, accountIdentity), o)
3933 }
3934
3935 type SpaceAppAccessListResult []SpaceAppAccess
3936
3937 // List all users and their permissions on a space.
3938 func (s *Service) SpaceAppAccessList(ctx context.Context, spaceIdentity string, lr *ListRange) (SpaceAppAccessListResult, error) {
3939 var spaceAppAccess SpaceAppAccessListResult
3940 return spaceAppAccess, s.Get(ctx, &spaceAppAccess, fmt.Sprintf("/spaces/%v/members", spaceIdentity), nil, lr)
3941 }
3942
3943 // Network address translation (NAT) for stable outbound IP addresses
3944 // from a space
3945 type SpaceNAT struct {
3946 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when network address translation for a space was created
3947 Sources []string `json:"sources" url:"sources,key"` // potential IPs from which outbound network traffic will originate
3948 State string `json:"state" url:"state,key"` // availability of network address translation for a space
3949 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when network address translation for a space was updated
3950 }
3951
3952 // Current state of network address translation for a space.
3953 func (s *Service) SpaceNATInfo(ctx context.Context, spaceIdentity string) (*SpaceNAT, error) {
3954 var spaceNAT SpaceNAT
3955 return &spaceNAT, s.Get(ctx, &spaceNAT, fmt.Sprintf("/spaces/%v/nat", spaceIdentity), nil, nil)
3956 }
3957
3958 // [SSL Endpoint](https://devcenter.heroku.com/articles/ssl-endpoint) is
3959 // a public address serving custom SSL cert for HTTPS traffic to a
3960 // Heroku app. Note that an app must have the `ssl:endpoint` add-on
3961 // installed before it can provision an SSL Endpoint using these APIs.
3962 type SSLEndpoint struct {
3963 App struct {
3964 ID string `json:"id" url:"id,key"` // unique identifier of app
3965 Name string `json:"name" url:"name,key"` // unique name of app
3966 } `json:"app" url:"app,key"` // application associated with this ssl-endpoint
3967 CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file)
3968 CName string `json:"cname" url:"cname,key"` // canonical name record, the address to point a domain at
3969 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when endpoint was created
3970 ID string `json:"id" url:"id,key"` // unique identifier of this SSL endpoint
3971 Name string `json:"name" url:"name,key"` // unique name for SSL endpoint
3972 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when endpoint was updated
3973 }
3974 type SSLEndpointCreateOpts struct {
3975 CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file)
3976 Preprocess *bool `json:"preprocess,omitempty" url:"preprocess,omitempty,key"` // allow Heroku to modify an uploaded public certificate chain if deemed
3977 // advantageous by adding missing intermediaries, stripping unnecessary
3978 // ones, etc.
3979 PrivateKey string `json:"private_key" url:"private_key,key"` // contents of the private key (eg .key file)
3980 }
3981
3982 // Create a new SSL endpoint.
3983 func (s *Service) SSLEndpointCreate(ctx context.Context, appIdentity string, o SSLEndpointCreateOpts) (*SSLEndpoint, error) {
3984 var sslEndpoint SSLEndpoint
3985 return &sslEndpoint, s.Post(ctx, &sslEndpoint, fmt.Sprintf("/apps/%v/ssl-endpoints", appIdentity), o)
3986 }
3987
3988 // Delete existing SSL endpoint.
3989 func (s *Service) SSLEndpointDelete(ctx context.Context, appIdentity string, sslEndpointIdentity string) (*SSLEndpoint, error) {
3990 var sslEndpoint SSLEndpoint
3991 return &sslEndpoint, s.Delete(ctx, &sslEndpoint, fmt.Sprintf("/apps/%v/ssl-endpoints/%v", appIdentity, sslEndpointIdentity))
3992 }
3993
3994 // Info for existing SSL endpoint.
3995 func (s *Service) SSLEndpointInfo(ctx context.Context, appIdentity string, sslEndpointIdentity string) (*SSLEndpoint, error) {
3996 var sslEndpoint SSLEndpoint
3997 return &sslEndpoint, s.Get(ctx, &sslEndpoint, fmt.Sprintf("/apps/%v/ssl-endpoints/%v", appIdentity, sslEndpointIdentity), nil, nil)
3998 }
3999
4000 type SSLEndpointListResult []SSLEndpoint
4001
4002 // List existing SSL endpoints.
4003 func (s *Service) SSLEndpointList(ctx context.Context, appIdentity string, lr *ListRange) (SSLEndpointListResult, error) {
4004 var sslEndpoint SSLEndpointListResult
4005 return sslEndpoint, s.Get(ctx, &sslEndpoint, fmt.Sprintf("/apps/%v/ssl-endpoints", appIdentity), nil, lr)
4006 }
4007
4008 type SSLEndpointUpdateOpts struct {
4009 CertificateChain *string `json:"certificate_chain,omitempty" url:"certificate_chain,omitempty,key"` // raw contents of the public certificate chain (eg: .crt or .pem file)
4010 Preprocess *bool `json:"preprocess,omitempty" url:"preprocess,omitempty,key"` // allow Heroku to modify an uploaded public certificate chain if deemed
4011 // advantageous by adding missing intermediaries, stripping unnecessary
4012 // ones, etc.
4013 PrivateKey *string `json:"private_key,omitempty" url:"private_key,omitempty,key"` // contents of the private key (eg .key file)
4014 Rollback *bool `json:"rollback,omitempty" url:"rollback,omitempty,key"` // indicates that a rollback should be performed
4015 }
4016
4017 // Update an existing SSL endpoint.
4018 func (s *Service) SSLEndpointUpdate(ctx context.Context, appIdentity string, sslEndpointIdentity string, o SSLEndpointUpdateOpts) (*SSLEndpoint, error) {
4019 var sslEndpoint SSLEndpoint
4020 return &sslEndpoint, s.Patch(ctx, &sslEndpoint, fmt.Sprintf("/apps/%v/ssl-endpoints/%v", appIdentity, sslEndpointIdentity), o)
4021 }
4022
4023 // Stacks are the different application execution environments available
4024 // in the Heroku platform.
4025 type Stack struct {
4026 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when stack was introduced
4027 Default bool `json:"default" url:"default,key"` // indicates this stack is the default for new apps
4028 ID string `json:"id" url:"id,key"` // unique identifier of stack
4029 Name string `json:"name" url:"name,key"` // unique name of stack
4030 State string `json:"state" url:"state,key"` // availability of this stack: beta, deprecated or public
4031 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when stack was last modified
4032 }
4033
4034 // Stack info.
4035 func (s *Service) StackInfo(ctx context.Context, stackIdentity string) (*Stack, error) {
4036 var stack Stack
4037 return &stack, s.Get(ctx, &stack, fmt.Sprintf("/stacks/%v", stackIdentity), nil, nil)
4038 }
4039
4040 type StackListResult []Stack
4041
4042 // List available stacks.
4043 func (s *Service) StackList(ctx context.Context, lr *ListRange) (StackListResult, error) {
4044 var stack StackListResult
4045 return stack, s.Get(ctx, &stack, fmt.Sprintf("/stacks"), nil, lr)
4046 }
4047
4048 // Teams allow you to manage access to a shared group of applications
4049 // and other resources.
4050 type Team struct {
4051 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the team was created
4052 CreditCardCollections bool `json:"credit_card_collections" url:"credit_card_collections,key"` // whether charges incurred by the team are paid by credit card.
4053 Default bool `json:"default" url:"default,key"` // whether to use this team when none is specified
4054 ID string `json:"id" url:"id,key"` // unique identifier of team
4055 MembershipLimit *float64 `json:"membership_limit" url:"membership_limit,key"` // upper limit of members allowed in a team.
4056 Name string `json:"name" url:"name,key"` // unique name of team
4057 ProvisionedLicenses bool `json:"provisioned_licenses" url:"provisioned_licenses,key"` // whether the team is provisioned licenses by salesforce.
4058 Role *string `json:"role" url:"role,key"` // role in the team
4059 Type string `json:"type" url:"type,key"` // type of team.
4060 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the team was updated
4061 }
4062 type TeamListResult []Team
4063
4064 // List teams in which you are a member.
4065 func (s *Service) TeamList(ctx context.Context, lr *ListRange) (TeamListResult, error) {
4066 var team TeamListResult
4067 return team, s.Get(ctx, &team, fmt.Sprintf("/teams"), nil, lr)
4068 }
4069
4070 // Info for a team.
4071 func (s *Service) TeamInfo(ctx context.Context, teamIdentity string) (*Team, error) {
4072 var team Team
4073 return &team, s.Get(ctx, &team, fmt.Sprintf("/teams/%v", teamIdentity), nil, nil)
4074 }
4075
4076 type TeamUpdateOpts struct {
4077 Default *bool `json:"default,omitempty" url:"default,omitempty,key"` // whether to use this team when none is specified
4078 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of team
4079 }
4080
4081 // Update team properties.
4082 func (s *Service) TeamUpdate(ctx context.Context, teamIdentity string, o TeamUpdateOpts) (*Team, error) {
4083 var team Team
4084 return &team, s.Patch(ctx, &team, fmt.Sprintf("/teams/%v", teamIdentity), o)
4085 }
4086
4087 type TeamCreateOpts struct {
4088 Address1 *string `json:"address_1,omitempty" url:"address_1,omitempty,key"` // street address line 1
4089 Address2 *string `json:"address_2,omitempty" url:"address_2,omitempty,key"` // street address line 2
4090 CardNumber *string `json:"card_number,omitempty" url:"card_number,omitempty,key"` // encrypted card number of payment method
4091 City *string `json:"city,omitempty" url:"city,omitempty,key"` // city
4092 Country *string `json:"country,omitempty" url:"country,omitempty,key"` // country
4093 Cvv *string `json:"cvv,omitempty" url:"cvv,omitempty,key"` // card verification value
4094 DeviceData *string `json:"device_data,omitempty" url:"device_data,omitempty,key"` // Device data string generated by the client
4095 ExpirationMonth *string `json:"expiration_month,omitempty" url:"expiration_month,omitempty,key"` // expiration month
4096 ExpirationYear *string `json:"expiration_year,omitempty" url:"expiration_year,omitempty,key"` // expiration year
4097 FirstName *string `json:"first_name,omitempty" url:"first_name,omitempty,key"` // the first name for payment method
4098 LastName *string `json:"last_name,omitempty" url:"last_name,omitempty,key"` // the last name for payment method
4099 Name string `json:"name" url:"name,key"` // unique name of team
4100 Nonce *string `json:"nonce,omitempty" url:"nonce,omitempty,key"` // Nonce generated by Braintree hosted fields form
4101 Other *string `json:"other,omitempty" url:"other,omitempty,key"` // metadata
4102 PostalCode *string `json:"postal_code,omitempty" url:"postal_code,omitempty,key"` // postal code
4103 State *string `json:"state,omitempty" url:"state,omitempty,key"` // state
4104 }
4105
4106 // Create a new team.
4107 func (s *Service) TeamCreate(ctx context.Context, o TeamCreateOpts) (*Team, error) {
4108 var team Team
4109 return &team, s.Post(ctx, &team, fmt.Sprintf("/teams"), o)
4110 }
4111
4112 // Delete an existing team.
4113 func (s *Service) TeamDelete(ctx context.Context, teamIdentity string) (*Team, error) {
4114 var team Team
4115 return &team, s.Delete(ctx, &team, fmt.Sprintf("/teams/%v", teamIdentity))
4116 }
4117
4118 // A team app encapsulates the team specific functionality of Heroku
4119 // apps.
4120 type TeamApp struct {
4121 ArchivedAt *time.Time `json:"archived_at" url:"archived_at,key"` // when app was archived
4122 BuildStack struct {
4123 ID string `json:"id" url:"id,key"` // unique identifier of stack
4124 Name string `json:"name" url:"name,key"` // unique name of stack
4125 } `json:"build_stack" url:"build_stack,key"` // identity of the stack that will be used for new builds
4126 BuildpackProvidedDescription *string `json:"buildpack_provided_description" url:"buildpack_provided_description,key"` // description from buildpack of app
4127 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app was created
4128 GitURL string `json:"git_url" url:"git_url,key"` // git repo URL of app
4129 ID string `json:"id" url:"id,key"` // unique identifier of app
4130 InternalRouting *bool `json:"internal_routing" url:"internal_routing,key"` // describes whether a Private Spaces app is externally routable or not
4131 Joined bool `json:"joined" url:"joined,key"` // is the current member a collaborator on this app.
4132 Locked bool `json:"locked" url:"locked,key"` // are other team members forbidden from joining this app.
4133 Maintenance bool `json:"maintenance" url:"maintenance,key"` // maintenance status of app
4134 Name string `json:"name" url:"name,key"` // unique name of app
4135 Owner *struct {
4136 Email string `json:"email" url:"email,key"` // unique email address of account
4137 ID string `json:"id" url:"id,key"` // unique identifier of an account
4138 } `json:"owner" url:"owner,key"` // identity of app owner
4139 Region struct {
4140 ID string `json:"id" url:"id,key"` // unique identifier of region
4141 Name string `json:"name" url:"name,key"` // unique name of region
4142 } `json:"region" url:"region,key"` // identity of app region
4143 ReleasedAt *time.Time `json:"released_at" url:"released_at,key"` // when app was released
4144 RepoSize *int `json:"repo_size" url:"repo_size,key"` // git repo size in bytes of app
4145 SlugSize *int `json:"slug_size" url:"slug_size,key"` // slug size in bytes of app
4146 Space *struct {
4147 ID string `json:"id" url:"id,key"` // unique identifier of space
4148 Name string `json:"name" url:"name,key"` // unique name of space
4149 } `json:"space" url:"space,key"` // identity of space
4150 Stack struct {
4151 ID string `json:"id" url:"id,key"` // unique identifier of stack
4152 Name string `json:"name" url:"name,key"` // unique name of stack
4153 } `json:"stack" url:"stack,key"` // identity of app stack
4154 Team *struct {
4155 Name string `json:"name" url:"name,key"` // unique name of team
4156 } `json:"team" url:"team,key"` // team that owns this app
4157 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app was updated
4158 WebURL string `json:"web_url" url:"web_url,key"` // web URL of app
4159 }
4160 type TeamAppCreateOpts struct {
4161 InternalRouting *bool `json:"internal_routing,omitempty" url:"internal_routing,omitempty,key"` // describes whether a Private Spaces app is externally routable or not
4162 Locked *bool `json:"locked,omitempty" url:"locked,omitempty,key"` // are other team members forbidden from joining this app.
4163 Name *string `json:"name,omitempty" url:"name,omitempty,key"` // unique name of app
4164 Personal *bool `json:"personal,omitempty" url:"personal,omitempty,key"` // force creation of the app in the user account even if a default team
4165 // is set.
4166 Region *string `json:"region,omitempty" url:"region,omitempty,key"` // unique name of region
4167 Space *string `json:"space,omitempty" url:"space,omitempty,key"` // unique name of space
4168 Stack *string `json:"stack,omitempty" url:"stack,omitempty,key"` // unique name of stack
4169 Team *string `json:"team,omitempty" url:"team,omitempty,key"` // unique name of team
4170 }
4171
4172 // Create a new app in the specified team, in the default team if
4173 // unspecified, or in personal account, if default team is not set.
4174 func (s *Service) TeamAppCreate(ctx context.Context, o TeamAppCreateOpts) (*TeamApp, error) {
4175 var teamApp TeamApp
4176 return &teamApp, s.Post(ctx, &teamApp, fmt.Sprintf("/teams/apps"), o)
4177 }
4178
4179 // Info for a team app.
4180 func (s *Service) TeamAppInfo(ctx context.Context, teamAppIdentity string) (*TeamApp, error) {
4181 var teamApp TeamApp
4182 return &teamApp, s.Get(ctx, &teamApp, fmt.Sprintf("/teams/apps/%v", teamAppIdentity), nil, nil)
4183 }
4184
4185 type TeamAppUpdateLockedOpts struct {
4186 Locked bool `json:"locked" url:"locked,key"` // are other team members forbidden from joining this app.
4187 }
4188
4189 // Lock or unlock a team app.
4190 func (s *Service) TeamAppUpdateLocked(ctx context.Context, teamAppIdentity string, o TeamAppUpdateLockedOpts) (*TeamApp, error) {
4191 var teamApp TeamApp
4192 return &teamApp, s.Patch(ctx, &teamApp, fmt.Sprintf("/teams/apps/%v", teamAppIdentity), o)
4193 }
4194
4195 type TeamAppTransferToAccountOpts struct {
4196 Owner string `json:"owner" url:"owner,key"` // unique email address of account
4197 }
4198
4199 // Transfer an existing team app to another Heroku account.
4200 func (s *Service) TeamAppTransferToAccount(ctx context.Context, teamAppIdentity string, o TeamAppTransferToAccountOpts) (*TeamApp, error) {
4201 var teamApp TeamApp
4202 return &teamApp, s.Patch(ctx, &teamApp, fmt.Sprintf("/teams/apps/%v", teamAppIdentity), o)
4203 }
4204
4205 type TeamAppTransferToTeamOpts struct {
4206 Owner string `json:"owner" url:"owner,key"` // unique name of team
4207 }
4208
4209 // Transfer an existing team app to another team.
4210 func (s *Service) TeamAppTransferToTeam(ctx context.Context, teamAppIdentity string, o TeamAppTransferToTeamOpts) (*TeamApp, error) {
4211 var teamApp TeamApp
4212 return &teamApp, s.Patch(ctx, &teamApp, fmt.Sprintf("/teams/apps/%v", teamAppIdentity), o)
4213 }
4214
4215 type TeamAppListByTeamResult []TeamApp
4216
4217 // List team apps.
4218 func (s *Service) TeamAppListByTeam(ctx context.Context, teamIdentity string, lr *ListRange) (TeamAppListByTeamResult, error) {
4219 var teamApp TeamAppListByTeamResult
4220 return teamApp, s.Get(ctx, &teamApp, fmt.Sprintf("/teams/%v/apps", teamIdentity), nil, lr)
4221 }
4222
4223 // A team collaborator represents an account that has been given access
4224 // to a team app on Heroku.
4225 type TeamAppCollaborator struct {
4226 App struct {
4227 ID string `json:"id" url:"id,key"` // unique identifier of app
4228 Name string `json:"name" url:"name,key"` // unique name of app
4229 } `json:"app" url:"app,key"` // app collaborator belongs to
4230 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when collaborator was created
4231 ID string `json:"id" url:"id,key"` // unique identifier of collaborator
4232 Permissions []struct {
4233 Description string `json:"description" url:"description,key"` // A description of what the app permission allows.
4234 Name string `json:"name" url:"name,key"` // The name of the app permission.
4235 } `json:"permissions" url:"permissions,key"` // array of permissions for the collaborator (only applicable if the app
4236 // is on a team)
4237 Role *string `json:"role" url:"role,key"` // role in the team
4238 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when collaborator was updated
4239 User struct {
4240 Email string `json:"email" url:"email,key"` // unique email address of account
4241 Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider
4242 ID string `json:"id" url:"id,key"` // unique identifier of an account
4243 } `json:"user" url:"user,key"` // identity of collaborated account
4244 }
4245 type TeamAppCollaboratorCreateOpts struct {
4246 Permissions []*string `json:"permissions,omitempty" url:"permissions,omitempty,key"` // An array of permissions to give to the collaborator.
4247 Silent *bool `json:"silent,omitempty" url:"silent,omitempty,key"` // whether to suppress email invitation when creating collaborator
4248 User string `json:"user" url:"user,key"` // unique email address of account
4249 }
4250
4251 // Create a new collaborator on a team app. Use this endpoint instead of
4252 // the `/apps/{app_id_or_name}/collaborator` endpoint when you want the
4253 // collaborator to be granted [permissions]
4254 // (https://devcenter.heroku.com/articles/org-users-access#roles-and-app-
4255 // permissions) according to their role in the team.
4256 func (s *Service) TeamAppCollaboratorCreate(ctx context.Context, appIdentity string, o TeamAppCollaboratorCreateOpts) (*TeamAppCollaborator, error) {
4257 var teamAppCollaborator TeamAppCollaborator
4258 return &teamAppCollaborator, s.Post(ctx, &teamAppCollaborator, fmt.Sprintf("/teams/apps/%v/collaborators", appIdentity), o)
4259 }
4260
4261 // Delete an existing collaborator from a team app.
4262 func (s *Service) TeamAppCollaboratorDelete(ctx context.Context, teamAppIdentity string, teamAppCollaboratorIdentity string) (*TeamAppCollaborator, error) {
4263 var teamAppCollaborator TeamAppCollaborator
4264 return &teamAppCollaborator, s.Delete(ctx, &teamAppCollaborator, fmt.Sprintf("/teams/apps/%v/collaborators/%v", teamAppIdentity, teamAppCollaboratorIdentity))
4265 }
4266
4267 // Info for a collaborator on a team app.
4268 func (s *Service) TeamAppCollaboratorInfo(ctx context.Context, teamAppIdentity string, teamAppCollaboratorIdentity string) (*TeamAppCollaborator, error) {
4269 var teamAppCollaborator TeamAppCollaborator
4270 return &teamAppCollaborator, s.Get(ctx, &teamAppCollaborator, fmt.Sprintf("/teams/apps/%v/collaborators/%v", teamAppIdentity, teamAppCollaboratorIdentity), nil, nil)
4271 }
4272
4273 type TeamAppCollaboratorUpdateOpts struct {
4274 Permissions []string `json:"permissions" url:"permissions,key"` // An array of permissions to give to the collaborator.
4275 }
4276
4277 // Update an existing collaborator from a team app.
4278 func (s *Service) TeamAppCollaboratorUpdate(ctx context.Context, teamAppIdentity string, teamAppCollaboratorIdentity string, o TeamAppCollaboratorUpdateOpts) (*TeamAppCollaborator, error) {
4279 var teamAppCollaborator TeamAppCollaborator
4280 return &teamAppCollaborator, s.Patch(ctx, &teamAppCollaborator, fmt.Sprintf("/teams/apps/%v/collaborators/%v", teamAppIdentity, teamAppCollaboratorIdentity), o)
4281 }
4282
4283 type TeamAppCollaboratorListResult []TeamAppCollaborator
4284
4285 // List collaborators on a team app.
4286 func (s *Service) TeamAppCollaboratorList(ctx context.Context, teamAppIdentity string, lr *ListRange) (TeamAppCollaboratorListResult, error) {
4287 var teamAppCollaborator TeamAppCollaboratorListResult
4288 return teamAppCollaborator, s.Get(ctx, &teamAppCollaborator, fmt.Sprintf("/teams/apps/%v/collaborators", teamAppIdentity), nil, lr)
4289 }
4290
4291 // A team app permission is a behavior that is assigned to a user in a
4292 // team app.
4293 type TeamAppPermission struct {
4294 Description string `json:"description" url:"description,key"` // A description of what the app permission allows.
4295 Name string `json:"name" url:"name,key"` // The name of the app permission.
4296 }
4297 type TeamAppPermissionListResult []TeamAppPermission
4298
4299 // Lists permissions available to teams.
4300 func (s *Service) TeamAppPermissionList(ctx context.Context, lr *ListRange) (TeamAppPermissionListResult, error) {
4301 var teamAppPermission TeamAppPermissionListResult
4302 return teamAppPermission, s.Get(ctx, &teamAppPermission, fmt.Sprintf("/teams/permissions"), nil, lr)
4303 }
4304
4305 // A team feature represents a feature enabled on a team account.
4306 type TeamFeature struct {
4307 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when team feature was created
4308 Description string `json:"description" url:"description,key"` // description of team feature
4309 DisplayName string `json:"display_name" url:"display_name,key"` // user readable feature name
4310 DocURL string `json:"doc_url" url:"doc_url,key"` // documentation URL of team feature
4311 Enabled bool `json:"enabled" url:"enabled,key"` // whether or not team feature has been enabled
4312 FeedbackEmail string `json:"feedback_email" url:"feedback_email,key"` // e-mail to send feedback about the feature
4313 ID string `json:"id" url:"id,key"` // unique identifier of team feature
4314 Name string `json:"name" url:"name,key"` // unique name of team feature
4315 State string `json:"state" url:"state,key"` // state of team feature
4316 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when team feature was updated
4317 }
4318
4319 // Info for an existing team feature.
4320 func (s *Service) TeamFeatureInfo(ctx context.Context, teamIdentity string, teamFeatureIdentity string) (*TeamFeature, error) {
4321 var teamFeature TeamFeature
4322 return &teamFeature, s.Get(ctx, &teamFeature, fmt.Sprintf("/teams/%v/features/%v", teamIdentity, teamFeatureIdentity), nil, nil)
4323 }
4324
4325 type TeamFeatureListResult []TeamFeature
4326
4327 // List existing team features.
4328 func (s *Service) TeamFeatureList(ctx context.Context, teamIdentity string, lr *ListRange) (TeamFeatureListResult, error) {
4329 var teamFeature TeamFeatureListResult
4330 return teamFeature, s.Get(ctx, &teamFeature, fmt.Sprintf("/teams/%v/features", teamIdentity), nil, lr)
4331 }
4332
4333 // A team invitation represents an invite to a team.
4334 type TeamInvitation struct {
4335 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when invitation was created
4336 ID string `json:"id" url:"id,key"` // unique identifier of an invitation
4337 InvitedBy struct {
4338 Email string `json:"email" url:"email,key"` // unique email address of account
4339 ID string `json:"id" url:"id,key"` // unique identifier of an account
4340 Name *string `json:"name" url:"name,key"` // full name of the account owner
4341 } `json:"invited_by" url:"invited_by,key"`
4342 Role *string `json:"role" url:"role,key"` // role in the team
4343 Team struct {
4344 ID string `json:"id" url:"id,key"` // unique identifier of team
4345 Name string `json:"name" url:"name,key"` // unique name of team
4346 } `json:"team" url:"team,key"`
4347 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when invitation was updated
4348 User struct {
4349 Email string `json:"email" url:"email,key"` // unique email address of account
4350 ID string `json:"id" url:"id,key"` // unique identifier of an account
4351 Name *string `json:"name" url:"name,key"` // full name of the account owner
4352 } `json:"user" url:"user,key"`
4353 }
4354 type TeamInvitationListResult []TeamInvitation
4355
4356 // Get a list of a team's Identity Providers
4357 func (s *Service) TeamInvitationList(ctx context.Context, teamName string, lr *ListRange) (TeamInvitationListResult, error) {
4358 var teamInvitation TeamInvitationListResult
4359 return teamInvitation, s.Get(ctx, &teamInvitation, fmt.Sprintf("/teams/%v/invitations", teamName), nil, lr)
4360 }
4361
4362 type TeamInvitationCreateOpts struct {
4363 Email string `json:"email" url:"email,key"` // unique email address of account
4364 Role *string `json:"role" url:"role,key"` // role in the team
4365 }
4366
4367 // Create Team Invitation
4368 func (s *Service) TeamInvitationCreate(ctx context.Context, teamIdentity string, o TeamInvitationCreateOpts) (*TeamInvitation, error) {
4369 var teamInvitation TeamInvitation
4370 return &teamInvitation, s.Put(ctx, &teamInvitation, fmt.Sprintf("/teams/%v/invitations", teamIdentity), o)
4371 }
4372
4373 // Revoke a team invitation.
4374 func (s *Service) TeamInvitationRevoke(ctx context.Context, teamIdentity string, teamInvitationIdentity string) (*TeamInvitation, error) {
4375 var teamInvitation TeamInvitation
4376 return &teamInvitation, s.Delete(ctx, &teamInvitation, fmt.Sprintf("/teams/%v/invitations/%v", teamIdentity, teamInvitationIdentity))
4377 }
4378
4379 // Get an invitation by its token
4380 func (s *Service) TeamInvitationGet(ctx context.Context, teamInvitationToken string, lr *ListRange) (*TeamInvitation, error) {
4381 var teamInvitation TeamInvitation
4382 return &teamInvitation, s.Get(ctx, &teamInvitation, fmt.Sprintf("/teams/invitations/%v", teamInvitationToken), nil, lr)
4383 }
4384
4385 type TeamInvitationAcceptResult struct {
4386 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the membership record was created
4387 Email string `json:"email" url:"email,key"` // email address of the team member
4388 Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider
4389 ID string `json:"id" url:"id,key"` // unique identifier of the team member
4390 Role *string `json:"role" url:"role,key"` // role in the team
4391 TwoFactorAuthentication bool `json:"two_factor_authentication" url:"two_factor_authentication,key"` // whether the Enterprise team member has two factor authentication
4392 // enabled
4393 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the membership record was updated
4394 User struct {
4395 Email string `json:"email" url:"email,key"` // unique email address of account
4396 ID string `json:"id" url:"id,key"` // unique identifier of an account
4397 Name *string `json:"name" url:"name,key"` // full name of the account owner
4398 } `json:"user" url:"user,key"` // user information for the membership
4399 }
4400
4401 // Accept Team Invitation
4402 func (s *Service) TeamInvitationAccept(ctx context.Context, teamInvitationToken string) (*TeamInvitationAcceptResult, error) {
4403 var teamInvitation TeamInvitationAcceptResult
4404 return &teamInvitation, s.Post(ctx, &teamInvitation, fmt.Sprintf("/teams/invitations/%v/accept", teamInvitationToken), nil)
4405 }
4406
4407 // A Team Invoice is an itemized bill of goods for a team which includes
4408 // pricing and charges.
4409 type TeamInvoice struct {
4410 AddonsTotal int `json:"addons_total" url:"addons_total,key"` // total add-ons charges in on this invoice
4411 ChargesTotal int `json:"charges_total" url:"charges_total,key"` // total charges on this invoice
4412 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when invoice was created
4413 CreditsTotal int `json:"credits_total" url:"credits_total,key"` // total credits on this invoice
4414 DatabaseTotal int `json:"database_total" url:"database_total,key"` // total database charges on this invoice
4415 DynoUnits float64 `json:"dyno_units" url:"dyno_units,key"` // total amount of dyno units consumed across dyno types.
4416 ID string `json:"id" url:"id,key"` // unique identifier of this invoice
4417 Number int `json:"number" url:"number,key"` // human readable invoice number
4418 PaymentStatus string `json:"payment_status" url:"payment_status,key"` // status of the invoice payment
4419 PeriodEnd string `json:"period_end" url:"period_end,key"` // the ending date that the invoice covers
4420 PeriodStart string `json:"period_start" url:"period_start,key"` // the starting date that this invoice covers
4421 PlatformTotal int `json:"platform_total" url:"platform_total,key"` // total platform charges on this invoice
4422 State int `json:"state" url:"state,key"` // payment status for this invoice (pending, successful, failed)
4423 Total int `json:"total" url:"total,key"` // combined total of charges and credits on this invoice
4424 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when invoice was updated
4425 WeightedDynoHours float64 `json:"weighted_dyno_hours" url:"weighted_dyno_hours,key"` // The total amount of hours consumed across dyno types.
4426 }
4427
4428 // Info for existing invoice.
4429 func (s *Service) TeamInvoiceInfo(ctx context.Context, teamIdentity string, teamInvoiceIdentity int) (*TeamInvoice, error) {
4430 var teamInvoice TeamInvoice
4431 return &teamInvoice, s.Get(ctx, &teamInvoice, fmt.Sprintf("/teams/%v/invoices/%v", teamIdentity, teamInvoiceIdentity), nil, nil)
4432 }
4433
4434 type TeamInvoiceListResult []TeamInvoice
4435
4436 // List existing invoices.
4437 func (s *Service) TeamInvoiceList(ctx context.Context, teamIdentity string, lr *ListRange) (TeamInvoiceListResult, error) {
4438 var teamInvoice TeamInvoiceListResult
4439 return teamInvoice, s.Get(ctx, &teamInvoice, fmt.Sprintf("/teams/%v/invoices", teamIdentity), nil, lr)
4440 }
4441
4442 // A team member is an individual with access to a team.
4443 type TeamMember struct {
4444 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when the membership record was created
4445 Email string `json:"email" url:"email,key"` // email address of the team member
4446 Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider
4447 ID string `json:"id" url:"id,key"` // unique identifier of the team member
4448 Role *string `json:"role" url:"role,key"` // role in the team
4449 TwoFactorAuthentication bool `json:"two_factor_authentication" url:"two_factor_authentication,key"` // whether the Enterprise team member has two factor authentication
4450 // enabled
4451 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when the membership record was updated
4452 User struct {
4453 Email string `json:"email" url:"email,key"` // unique email address of account
4454 ID string `json:"id" url:"id,key"` // unique identifier of an account
4455 Name *string `json:"name" url:"name,key"` // full name of the account owner
4456 } `json:"user" url:"user,key"` // user information for the membership
4457 }
4458 type TeamMemberCreateOrUpdateOpts struct {
4459 Email string `json:"email" url:"email,key"` // email address of the team member
4460 Federated *bool `json:"federated,omitempty" url:"federated,omitempty,key"` // whether the user is federated and belongs to an Identity Provider
4461 Role *string `json:"role" url:"role,key"` // role in the team
4462 }
4463
4464 // Create a new team member, or update their role.
4465 func (s *Service) TeamMemberCreateOrUpdate(ctx context.Context, teamIdentity string, o TeamMemberCreateOrUpdateOpts) (*TeamMember, error) {
4466 var teamMember TeamMember
4467 return &teamMember, s.Put(ctx, &teamMember, fmt.Sprintf("/teams/%v/members", teamIdentity), o)
4468 }
4469
4470 type TeamMemberCreateOpts struct {
4471 Email string `json:"email" url:"email,key"` // email address of the team member
4472 Federated *bool `json:"federated,omitempty" url:"federated,omitempty,key"` // whether the user is federated and belongs to an Identity Provider
4473 Role *string `json:"role" url:"role,key"` // role in the team
4474 }
4475
4476 // Create a new team member.
4477 func (s *Service) TeamMemberCreate(ctx context.Context, teamIdentity string, o TeamMemberCreateOpts) (*TeamMember, error) {
4478 var teamMember TeamMember
4479 return &teamMember, s.Post(ctx, &teamMember, fmt.Sprintf("/teams/%v/members", teamIdentity), o)
4480 }
4481
4482 type TeamMemberUpdateOpts struct {
4483 Email string `json:"email" url:"email,key"` // email address of the team member
4484 Federated *bool `json:"federated,omitempty" url:"federated,omitempty,key"` // whether the user is federated and belongs to an Identity Provider
4485 Role *string `json:"role" url:"role,key"` // role in the team
4486 }
4487
4488 // Update a team member.
4489 func (s *Service) TeamMemberUpdate(ctx context.Context, teamIdentity string, o TeamMemberUpdateOpts) (*TeamMember, error) {
4490 var teamMember TeamMember
4491 return &teamMember, s.Patch(ctx, &teamMember, fmt.Sprintf("/teams/%v/members", teamIdentity), o)
4492 }
4493
4494 // Remove a member from the team.
4495 func (s *Service) TeamMemberDelete(ctx context.Context, teamIdentity string, teamMemberIdentity string) (*TeamMember, error) {
4496 var teamMember TeamMember
4497 return &teamMember, s.Delete(ctx, &teamMember, fmt.Sprintf("/teams/%v/members/%v", teamIdentity, teamMemberIdentity))
4498 }
4499
4500 type TeamMemberListResult []TeamMember
4501
4502 // List members of the team.
4503 func (s *Service) TeamMemberList(ctx context.Context, teamIdentity string, lr *ListRange) (TeamMemberListResult, error) {
4504 var teamMember TeamMemberListResult
4505 return teamMember, s.Get(ctx, &teamMember, fmt.Sprintf("/teams/%v/members", teamIdentity), nil, lr)
4506 }
4507
4508 type TeamMemberListByMemberResult []struct {
4509 ArchivedAt *time.Time `json:"archived_at" url:"archived_at,key"` // when app was archived
4510 BuildStack struct {
4511 ID string `json:"id" url:"id,key"` // unique identifier of stack
4512 Name string `json:"name" url:"name,key"` // unique name of stack
4513 } `json:"build_stack" url:"build_stack,key"` // identity of the stack that will be used for new builds
4514 BuildpackProvidedDescription *string `json:"buildpack_provided_description" url:"buildpack_provided_description,key"` // description from buildpack of app
4515 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when app was created
4516 GitURL string `json:"git_url" url:"git_url,key"` // git repo URL of app
4517 ID string `json:"id" url:"id,key"` // unique identifier of app
4518 InternalRouting *bool `json:"internal_routing" url:"internal_routing,key"` // describes whether a Private Spaces app is externally routable or not
4519 Joined bool `json:"joined" url:"joined,key"` // is the current member a collaborator on this app.
4520 Locked bool `json:"locked" url:"locked,key"` // are other team members forbidden from joining this app.
4521 Maintenance bool `json:"maintenance" url:"maintenance,key"` // maintenance status of app
4522 Name string `json:"name" url:"name,key"` // unique name of app
4523 Owner *struct {
4524 Email string `json:"email" url:"email,key"` // unique email address of account
4525 ID string `json:"id" url:"id,key"` // unique identifier of an account
4526 } `json:"owner" url:"owner,key"` // identity of app owner
4527 Region struct {
4528 ID string `json:"id" url:"id,key"` // unique identifier of region
4529 Name string `json:"name" url:"name,key"` // unique name of region
4530 } `json:"region" url:"region,key"` // identity of app region
4531 ReleasedAt *time.Time `json:"released_at" url:"released_at,key"` // when app was released
4532 RepoSize *int `json:"repo_size" url:"repo_size,key"` // git repo size in bytes of app
4533 SlugSize *int `json:"slug_size" url:"slug_size,key"` // slug size in bytes of app
4534 Space *struct {
4535 ID string `json:"id" url:"id,key"` // unique identifier of space
4536 Name string `json:"name" url:"name,key"` // unique name of space
4537 } `json:"space" url:"space,key"` // identity of space
4538 Stack struct {
4539 ID string `json:"id" url:"id,key"` // unique identifier of stack
4540 Name string `json:"name" url:"name,key"` // unique name of stack
4541 } `json:"stack" url:"stack,key"` // identity of app stack
4542 Team *struct {
4543 Name string `json:"name" url:"name,key"` // unique name of team
4544 } `json:"team" url:"team,key"` // team that owns this app
4545 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when app was updated
4546 WebURL string `json:"web_url" url:"web_url,key"` // web URL of app
4547 }
4548
4549 // List the apps of a team member.
4550 func (s *Service) TeamMemberListByMember(ctx context.Context, teamIdentity string, teamMemberIdentity string, lr *ListRange) (TeamMemberListByMemberResult, error) {
4551 var teamMember TeamMemberListByMemberResult
4552 return teamMember, s.Get(ctx, &teamMember, fmt.Sprintf("/teams/%v/members/%v/apps", teamIdentity, teamMemberIdentity), nil, lr)
4553 }
4554
4555 // Tracks a Team's Preferences
4556 type TeamPreferences struct {
4557 DefaultPermission *string `json:"default-permission" url:"default-permission,key"` // The default permission used when adding new members to the team
4558 WhitelistingEnabled *bool `json:"whitelisting-enabled" url:"whitelisting-enabled,key"` // Whether whitelisting rules should be applied to add-on installations
4559 }
4560
4561 // Retrieve Team Preferences
4562 func (s *Service) TeamPreferencesList(ctx context.Context, teamPreferencesIdentity string) (*TeamPreferences, error) {
4563 var teamPreferences TeamPreferences
4564 return &teamPreferences, s.Get(ctx, &teamPreferences, fmt.Sprintf("/teams/%v/preferences", teamPreferencesIdentity), nil, nil)
4565 }
4566
4567 type TeamPreferencesUpdateOpts struct {
4568 WhitelistingEnabled *bool `json:"whitelisting-enabled,omitempty" url:"whitelisting-enabled,omitempty,key"` // Whether whitelisting rules should be applied to add-on installations
4569 }
4570
4571 // Update Team Preferences
4572 func (s *Service) TeamPreferencesUpdate(ctx context.Context, teamPreferencesIdentity string, o TeamPreferencesUpdateOpts) (*TeamPreferences, error) {
4573 var teamPreferences TeamPreferences
4574 return &teamPreferences, s.Patch(ctx, &teamPreferences, fmt.Sprintf("/teams/%v/preferences", teamPreferencesIdentity), o)
4575 }
4576
4577 // A single test case belonging to a test run
4578 type TestCase struct {
4579 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when test case was created
4580 Description string `json:"description" url:"description,key"` // description of the test case
4581 Diagnostic string `json:"diagnostic" url:"diagnostic,key"` // meta information about the test case
4582 Directive string `json:"directive" url:"directive,key"` // special note about the test case e.g. skipped, todo
4583 ID string `json:"id" url:"id,key"` // unique identifier of a test case
4584 Number int `json:"number" url:"number,key"` // the test number
4585 Passed bool `json:"passed" url:"passed,key"` // whether the test case was successful
4586 TestNode struct {
4587 ID string `json:"id" url:"id,key"` // unique identifier of a test node
4588 } `json:"test_node" url:"test_node,key"` // the test node which executed this test case
4589 TestRun struct {
4590 ID string `json:"id" url:"id,key"` // unique identifier of a test run
4591 } `json:"test_run" url:"test_run,key"` // the test run which owns this test case
4592 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when test case was updated
4593 }
4594 type TestCaseListResult []TestCase
4595
4596 // List test cases
4597 func (s *Service) TestCaseList(ctx context.Context, testRunID string, lr *ListRange) error {
4598 return s.Get(ctx, nil, fmt.Sprintf("/test-runs/%v/test-cases", testRunID), nil, lr)
4599 }
4600
4601 // A single test node belonging to a test run
4602 type TestNode struct {
4603 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when test node was created
4604 Dyno *struct {
4605 AttachURL *string `json:"attach_url" url:"attach_url,key"` // a URL to stream output from for debug runs or null for non-debug runs
4606 ID string `json:"id" url:"id,key"` // unique identifier of this dyno
4607 } `json:"dyno" url:"dyno,key"` // the dyno which belongs to this test node
4608 ErrorStatus *string `json:"error_status" url:"error_status,key"` // the status of the test run when the error occured
4609 ExitCode *int `json:"exit_code" url:"exit_code,key"` // the exit code of the test script
4610 ID string `json:"id" url:"id,key"` // unique identifier of a test node
4611 Index int `json:"index" url:"index,key"` // The index of the test node
4612 Message *string `json:"message" url:"message,key"` // human friendly message indicating reason for an error
4613 OutputStreamURL string `json:"output_stream_url" url:"output_stream_url,key"` // the streaming output for the test node
4614 Pipeline struct {
4615 ID string `json:"id" url:"id,key"` // unique identifier of pipeline
4616 } `json:"pipeline" url:"pipeline,key"` // the pipeline which owns this test node
4617 SetupStreamURL string `json:"setup_stream_url" url:"setup_stream_url,key"` // the streaming test setup output for the test node
4618 Status string `json:"status" url:"status,key"` // current state of the test run
4619 TestRun struct {
4620 ID string `json:"id" url:"id,key"` // unique identifier of a test run
4621 } `json:"test_run" url:"test_run,key"` // the test run which owns this test node
4622 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when test node was updated
4623 }
4624 type TestNodeListResult []TestNode
4625
4626 // List test nodes
4627 func (s *Service) TestNodeList(ctx context.Context, testRunIdentity string, lr *ListRange) error {
4628 return s.Get(ctx, nil, fmt.Sprintf("/test-runs/%v/test-nodes", testRunIdentity), nil, lr)
4629 }
4630
4631 // An execution or trial of one or more tests
4632 type TestRun struct {
4633 ActorEmail string `json:"actor_email" url:"actor_email,key"` // the email of the actor triggering the test run
4634 AppSetup *struct{} `json:"app_setup" url:"app_setup,key"` // the app setup for the test run
4635 ClearCache *bool `json:"clear_cache" url:"clear_cache,key"` // whether the test was run with an empty cache
4636 CommitBranch string `json:"commit_branch" url:"commit_branch,key"` // the branch of the repository that the test run concerns
4637 CommitMessage string `json:"commit_message" url:"commit_message,key"` // the message for the commit under test
4638 CommitSha string `json:"commit_sha" url:"commit_sha,key"` // the SHA hash of the commit under test
4639 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when test run was created
4640 Debug bool `json:"debug" url:"debug,key"` // whether the test run was started for interactive debugging
4641 Dyno *struct {
4642 Size string `json:"size" url:"size,key"` // dyno size (default: "standard-1X")
4643 } `json:"dyno" url:"dyno,key"` // the type of dynos used for this test-run
4644 ID string `json:"id" url:"id,key"` // unique identifier of a test run
4645 Message *string `json:"message" url:"message,key"` // human friendly message indicating reason for an error
4646 Number int `json:"number" url:"number,key"` // the auto incrementing test run number
4647 Organization *struct {
4648 Name string `json:"name" url:"name,key"` // unique name of organization
4649 } `json:"organization" url:"organization,key"` // the organization that owns this test-run
4650 Pipeline struct {
4651 ID string `json:"id" url:"id,key"` // unique identifier of pipeline
4652 } `json:"pipeline" url:"pipeline,key"` // the pipeline which owns this test-run
4653 SourceBlobURL string `json:"source_blob_url" url:"source_blob_url,key"` // The download location for the source code to be tested
4654 Status string `json:"status" url:"status,key"` // current state of the test run
4655 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when test-run was updated
4656 User struct {
4657 AllowTracking bool `json:"allow_tracking" url:"allow_tracking,key"` // whether to allow third party web activity tracking
4658 Beta bool `json:"beta" url:"beta,key"` // whether allowed to utilize beta Heroku features
4659 CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when account was created
4660 DefaultOrganization *struct {
4661 ID string `json:"id" url:"id,key"` // unique identifier of organization
4662 Name string `json:"name" url:"name,key"` // unique name of organization
4663 } `json:"default_organization" url:"default_organization,key"` // organization selected by default
4664 DelinquentAt *time.Time `json:"delinquent_at" url:"delinquent_at,key"` // when account became delinquent
4665 Email string `json:"email" url:"email,key"` // unique email address of account
4666 Federated bool `json:"federated" url:"federated,key"` // whether the user is federated and belongs to an Identity Provider
4667 ID string `json:"id" url:"id,key"` // unique identifier of an account
4668 IdentityProvider *struct {
4669 ID string `json:"id" url:"id,key"` // unique identifier of this identity provider
4670 Organization struct {
4671 Name string `json:"name" url:"name,key"` // unique name of organization
4672 } `json:"organization" url:"organization,key"`
4673 Owner struct {
4674 ID string `json:"id" url:"id,key"` // unique identifier of the owner
4675 Name string `json:"name" url:"name,key"` // name of the owner
4676 Type string `json:"type" url:"type,key"` // type of the owner
4677 } `json:"owner" url:"owner,key"` // entity that owns this identity provider
4678 } `json:"identity_provider" url:"identity_provider,key"` // Identity Provider details for federated users.
4679 LastLogin *time.Time `json:"last_login" url:"last_login,key"` // when account last authorized with Heroku
4680 Name *string `json:"name" url:"name,key"` // full name of the account owner
4681 SmsNumber *string `json:"sms_number" url:"sms_number,key"` // SMS number of account
4682 SuspendedAt *time.Time `json:"suspended_at" url:"suspended_at,key"` // when account was suspended
4683 TwoFactorAuthentication bool `json:"two_factor_authentication" url:"two_factor_authentication,key"` // whether two-factor auth is enabled on the account
4684 UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when account was updated
4685 Verified bool `json:"verified" url:"verified,key"` // whether account has been verified with billing information
4686 } `json:"user" url:"user,key"` // An account represents an individual signed up to use the Heroku
4687 // platform.
4688 WarningMessage *string `json:"warning_message" url:"warning_message,key"` // human friently warning emitted during the test run
4689 }
4690 type TestRunCreateOpts struct {
4691 CommitBranch string `json:"commit_branch" url:"commit_branch,key"` // the branch of the repository that the test run concerns
4692 CommitMessage string `json:"commit_message" url:"commit_message,key"` // the message for the commit under test
4693 CommitSha string `json:"commit_sha" url:"commit_sha,key"` // the SHA hash of the commit under test
4694 Debug *bool `json:"debug,omitempty" url:"debug,omitempty,key"` // whether the test run was started for interactive debugging
4695 Organization *string `json:"organization,omitempty" url:"organization,omitempty,key"` // unique name of organization
4696 Pipeline string `json:"pipeline" url:"pipeline,key"` // unique identifier of pipeline
4697 SourceBlobURL string `json:"source_blob_url" url:"source_blob_url,key"` // The download location for the source code to be tested
4698 }
4699
4700 // Create a new test-run.
4701 func (s *Service) TestRunCreate(ctx context.Context, o TestRunCreateOpts) (*TestRun, error) {
4702 var testRun TestRun
4703 return &testRun, s.Post(ctx, &testRun, fmt.Sprintf("/test-runs"), o)
4704 }
4705
4706 // Info for existing test-run.
4707 func (s *Service) TestRunInfo(ctx context.Context, testRunID string) (*TestRun, error) {
4708 var testRun TestRun
4709 return &testRun, s.Get(ctx, &testRun, fmt.Sprintf("/test-runs/%v", testRunID), nil, nil)
4710 }
4711
4712 type TestRunListResult []TestRun
4713
4714 // List existing test-runs for a pipeline.
4715 func (s *Service) TestRunList(ctx context.Context, pipelineID string, lr *ListRange) error {
4716 return s.Get(ctx, nil, fmt.Sprintf("/pipelines/%v/test-runs", pipelineID), nil, lr)
4717 }
4718
4719 // Info for existing test-run by Pipeline
4720 func (s *Service) TestRunInfoByPipeline(ctx context.Context, pipelineID string, testRunNumber int) (*TestRun, error) {
4721 var testRun TestRun
4722 return &testRun, s.Get(ctx, &testRun, fmt.Sprintf("/pipelines/%v/test-runs/%v", pipelineID, testRunNumber), nil, nil)
4723 }
4724
4725 type TestRunUpdateOpts struct {
4726 Message *string `json:"message" url:"message,key"` // human friendly message indicating reason for an error
4727 Status string `json:"status" url:"status,key"` // current state of the test run
4728 }
4729
4730 // Update a test-run's status.
4731 func (s *Service) TestRunUpdate(ctx context.Context, testRunNumber int, o TestRunUpdateOpts) (*TestRun, error) {
4732 var testRun TestRun
4733 return &testRun, s.Patch(ctx, &testRun, fmt.Sprintf("/test-runs/%v", testRunNumber), o)
4734 }
4735
4736 // Tracks a user's preferences and message dismissals
4737 type UserPreferences struct {
4738 DefaultOrganization *string `json:"default-organization" url:"default-organization,key"` // User's default organization
4739 DismissedGettingStarted *bool `json:"dismissed-getting-started" url:"dismissed-getting-started,key"` // Whether the user has dismissed the getting started banner
4740 DismissedGithubBanner *bool `json:"dismissed-github-banner" url:"dismissed-github-banner,key"` // Whether the user has dismissed the GitHub link banner
4741 DismissedOrgAccessControls *bool `json:"dismissed-org-access-controls" url:"dismissed-org-access-controls,key"` // Whether the user has dismissed the Organization Access Controls
4742 // banner
4743 DismissedOrgWizardNotification *bool `json:"dismissed-org-wizard-notification" url:"dismissed-org-wizard-notification,key"` // Whether the user has dismissed the Organization Wizard
4744 DismissedPipelinesBanner *bool `json:"dismissed-pipelines-banner" url:"dismissed-pipelines-banner,key"` // Whether the user has dismissed the Pipelines banner
4745 DismissedPipelinesGithubBanner *bool `json:"dismissed-pipelines-github-banner" url:"dismissed-pipelines-github-banner,key"` // Whether the user has dismissed the GitHub banner on a pipeline
4746 // overview
4747 DismissedPipelinesGithubBanners []string `json:"dismissed-pipelines-github-banners" url:"dismissed-pipelines-github-banners,key"` // Which pipeline uuids the user has dismissed the GitHub banner for
4748 DismissedSmsBanner *bool `json:"dismissed-sms-banner" url:"dismissed-sms-banner,key"` // Whether the user has dismissed the 2FA SMS banner
4749 Timezone *string `json:"timezone" url:"timezone,key"` // User's default timezone
4750 }
4751
4752 // Retrieve User Preferences
4753 func (s *Service) UserPreferencesList(ctx context.Context, userPreferencesIdentity string) (*UserPreferences, error) {
4754 var userPreferences UserPreferences
4755 return &userPreferences, s.Get(ctx, &userPreferences, fmt.Sprintf("/users/%v/preferences", userPreferencesIdentity), nil, nil)
4756 }
4757
4758 type UserPreferencesUpdateOpts struct {
4759 DefaultOrganization *string `json:"default-organization,omitempty" url:"default-organization,omitempty,key"` // User's default organization
4760 DismissedGettingStarted *bool `json:"dismissed-getting-started,omitempty" url:"dismissed-getting-started,omitempty,key"` // Whether the user has dismissed the getting started banner
4761 DismissedGithubBanner *bool `json:"dismissed-github-banner,omitempty" url:"dismissed-github-banner,omitempty,key"` // Whether the user has dismissed the GitHub link banner
4762 DismissedOrgAccessControls *bool `json:"dismissed-org-access-controls,omitempty" url:"dismissed-org-access-controls,omitempty,key"` // Whether the user has dismissed the Organization Access Controls
4763 // banner
4764 DismissedOrgWizardNotification *bool `json:"dismissed-org-wizard-notification,omitempty" url:"dismissed-org-wizard-notification,omitempty,key"` // Whether the user has dismissed the Organization Wizard
4765 DismissedPipelinesBanner *bool `json:"dismissed-pipelines-banner,omitempty" url:"dismissed-pipelines-banner,omitempty,key"` // Whether the user has dismissed the Pipelines banner
4766 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
4767 // overview
4768 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
4769 DismissedSmsBanner *bool `json:"dismissed-sms-banner,omitempty" url:"dismissed-sms-banner,omitempty,key"` // Whether the user has dismissed the 2FA SMS banner
4770 Timezone *string `json:"timezone,omitempty" url:"timezone,omitempty,key"` // User's default timezone
4771 }
4772
4773 // Update User Preferences
4774 func (s *Service) UserPreferencesUpdate(ctx context.Context, userPreferencesIdentity string, o UserPreferencesUpdateOpts) (*UserPreferences, error) {
4775 var userPreferences UserPreferences
4776 return &userPreferences, s.Patch(ctx, &userPreferences, fmt.Sprintf("/users/%v/preferences", userPreferencesIdentity), o)
4777 }
4778
4779 // [VPN](https://devcenter.heroku.com/articles/private-spaces-vpn?preview
4780 // =1) provides a way to connect your Private Spaces to your network via
4781 // VPN.
4782 type VPNConnection struct {
4783 ID string `json:"id" url:"id,key"` // VPN ID
4784 IKEVersion int `json:"ike_version" url:"ike_version,key"` // IKE Version
4785 Name string `json:"name" url:"name,key"` // VPN Name
4786 PublicIP string `json:"public_ip" url:"public_ip,key"` // Public IP of VPN customer gateway
4787 RoutableCidrs []string `json:"routable_cidrs" url:"routable_cidrs,key"` // Routable CIDRs of VPN
4788 SpaceCIDRBlock string `json:"space_cidr_block" url:"space_cidr_block,key"` // CIDR Block of the Private Space
4789 Status string `json:"status" url:"status,key"` // Status of the VPN
4790 StatusMessage string `json:"status_message" url:"status_message,key"` // Details of the status
4791 Tunnels []struct {
4792 CustomerIP string `json:"customer_ip" url:"customer_ip,key"` // Public IP address for the customer side of the tunnel
4793 IP string `json:"ip" url:"ip,key"` // Public IP address for the tunnel
4794 LastStatusChange string `json:"last_status_change" url:"last_status_change,key"` // Timestamp of last status changed
4795 PreSharedKey string `json:"pre_shared_key" url:"pre_shared_key,key"` // Pre-shared key
4796 Status string `json:"status" url:"status,key"` // Status of the tunnel
4797 StatusMessage string `json:"status_message" url:"status_message,key"` // Details of the status
4798 } `json:"tunnels" url:"tunnels,key"`
4799 }
4800 type VPNConnectionCreateOpts struct {
4801 Name string `json:"name" url:"name,key"` // VPN Name
4802 PublicIP string `json:"public_ip" url:"public_ip,key"` // Public IP of VPN customer gateway
4803 RoutableCidrs []string `json:"routable_cidrs" url:"routable_cidrs,key"` // Routable CIDRs of VPN
4804 }
4805
4806 // Create a new VPN connection in a private space.
4807 func (s *Service) VPNConnectionCreate(ctx context.Context, spaceIdentity string, o VPNConnectionCreateOpts) (*VPNConnection, error) {
4808 var vpnConnection VPNConnection
4809 return &vpnConnection, s.Post(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections", spaceIdentity), o)
4810 }
4811
4812 // Destroy existing VPN Connection
4813 func (s *Service) VPNConnectionDestroy(ctx context.Context, spaceIdentity string, vpnConnectionIdentity string) (*VPNConnection, error) {
4814 var vpnConnection VPNConnection
4815 return &vpnConnection, s.Delete(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections/%v", spaceIdentity, vpnConnectionIdentity))
4816 }
4817
4818 type VPNConnectionListResult []VPNConnection
4819
4820 // List VPN connections for a space.
4821 func (s *Service) VPNConnectionList(ctx context.Context, spaceIdentity string, lr *ListRange) (VPNConnectionListResult, error) {
4822 var vpnConnection VPNConnectionListResult
4823 return vpnConnection, s.Get(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections", spaceIdentity), nil, lr)
4824 }
4825
4826 // Info for an existing vpn-connection.
4827 func (s *Service) VPNConnectionInfo(ctx context.Context, spaceIdentity string, vpnConnectionIdentity string) (*VPNConnection, error) {
4828 var vpnConnection VPNConnection
4829 return &vpnConnection, s.Get(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections/%v", spaceIdentity, vpnConnectionIdentity), nil, nil)
4830 }
4831
4832 // Entities that have been whitelisted to be used by an Organization
4833 type WhitelistedAddOnService struct {
4834 AddedAt time.Time `json:"added_at" url:"added_at,key"` // when the add-on service was whitelisted
4835 AddedBy struct {
4836 Email string `json:"email" url:"email,key"` // unique email address of account
4837 ID string `json:"id" url:"id,key"` // unique identifier of an account
4838 } `json:"added_by" url:"added_by,key"` // the user which whitelisted the Add-on Service
4839 AddonService struct {
4840 HumanName string `json:"human_name" url:"human_name,key"` // human-readable name of the add-on service provider
4841 ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service
4842 Name string `json:"name" url:"name,key"` // unique name of this add-on-service
4843 } `json:"addon_service" url:"addon_service,key"` // the Add-on Service whitelisted for use
4844 ID string `json:"id" url:"id,key"` // unique identifier for this whitelisting entity
4845 }
4846 type WhitelistedAddOnServiceListByOrganizationResult []WhitelistedAddOnService
4847
4848 // List all whitelisted Add-on Services for an Organization
4849 func (s *Service) WhitelistedAddOnServiceListByOrganization(ctx context.Context, organizationIdentity string, lr *ListRange) (WhitelistedAddOnServiceListByOrganizationResult, error) {
4850 var whitelistedAddOnService WhitelistedAddOnServiceListByOrganizationResult
4851 return whitelistedAddOnService, s.Get(ctx, &whitelistedAddOnService, fmt.Sprintf("/organizations/%v/whitelisted-addon-services", organizationIdentity), nil, lr)
4852 }
4853
4854 type WhitelistedAddOnServiceCreateByOrganizationOpts struct {
4855 AddonService *string `json:"addon_service,omitempty" url:"addon_service,omitempty,key"` // name of the Add-on to whitelist
4856 }
4857 type WhitelistedAddOnServiceCreateByOrganizationResult []WhitelistedAddOnService
4858
4859 // Whitelist an Add-on Service
4860 func (s *Service) WhitelistedAddOnServiceCreateByOrganization(ctx context.Context, organizationIdentity string, o WhitelistedAddOnServiceCreateByOrganizationOpts) (WhitelistedAddOnServiceCreateByOrganizationResult, error) {
4861 var whitelistedAddOnService WhitelistedAddOnServiceCreateByOrganizationResult
4862 return whitelistedAddOnService, s.Post(ctx, &whitelistedAddOnService, fmt.Sprintf("/organizations/%v/whitelisted-addon-services", organizationIdentity), o)
4863 }
4864
4865 // Remove a whitelisted entity
4866 func (s *Service) WhitelistedAddOnServiceDeleteByOrganization(ctx context.Context, organizationIdentity string, whitelistedAddOnServiceIdentity string) (*WhitelistedAddOnService, error) {
4867 var whitelistedAddOnService WhitelistedAddOnService
4868 return &whitelistedAddOnService, s.Delete(ctx, &whitelistedAddOnService, fmt.Sprintf("/organizations/%v/whitelisted-addon-services/%v", organizationIdentity, whitelistedAddOnServiceIdentity))
4869 }
4870
4871 type WhitelistedAddOnServiceListByTeamResult []WhitelistedAddOnService
4872
4873 // List all whitelisted Add-on Services for a Team
4874 func (s *Service) WhitelistedAddOnServiceListByTeam(ctx context.Context, teamIdentity string, lr *ListRange) (WhitelistedAddOnServiceListByTeamResult, error) {
4875 var whitelistedAddOnService WhitelistedAddOnServiceListByTeamResult
4876 return whitelistedAddOnService, s.Get(ctx, &whitelistedAddOnService, fmt.Sprintf("/teams/%v/whitelisted-addon-services", teamIdentity), nil, lr)
4877 }
4878
4879 type WhitelistedAddOnServiceCreateByTeamOpts struct {
4880 AddonService *string `json:"addon_service,omitempty" url:"addon_service,omitempty,key"` // name of the Add-on to whitelist
4881 }
4882 type WhitelistedAddOnServiceCreateByTeamResult []WhitelistedAddOnService
4883
4884 // Whitelist an Add-on Service
4885 func (s *Service) WhitelistedAddOnServiceCreateByTeam(ctx context.Context, teamIdentity string, o WhitelistedAddOnServiceCreateByTeamOpts) (WhitelistedAddOnServiceCreateByTeamResult, error) {
4886 var whitelistedAddOnService WhitelistedAddOnServiceCreateByTeamResult
4887 return whitelistedAddOnService, s.Post(ctx, &whitelistedAddOnService, fmt.Sprintf("/teams/%v/whitelisted-addon-services", teamIdentity), o)
4888 }
4889
4890 // Remove a whitelisted entity
4891 func (s *Service) WhitelistedAddOnServiceDeleteByTeam(ctx context.Context, teamIdentity string, whitelistedAddOnServiceIdentity string) (*WhitelistedAddOnService, error) {
4892 var whitelistedAddOnService WhitelistedAddOnService
4893 return &whitelistedAddOnService, s.Delete(ctx, &whitelistedAddOnService, fmt.Sprintf("/teams/%v/whitelisted-addon-services/%v", teamIdentity, whitelistedAddOnServiceIdentity))
4894 }
0 package heroku
1
2 import (
3 "fmt"
4 "log"
5 "net/http"
6 "time"
7
8 "github.com/cenkalti/backoff"
9 )
10
11 // net/http RoundTripper interface, a.k.a. Transport
12 // https://godoc.org/net/http#RoundTripper
13 type RoundTripWithRetryBackoff struct {
14 // Configuration fields for backoff.ExponentialBackOff
15 InitialIntervalSeconds int64
16 RandomizationFactor float64
17 Multiplier float64
18 MaxIntervalSeconds int64
19 // After MaxElapsedTime the ExponentialBackOff stops.
20 // It never stops if MaxElapsedTime == 0.
21 MaxElapsedTimeSeconds int64
22 }
23
24 func (r RoundTripWithRetryBackoff) RoundTrip(req *http.Request) (*http.Response, error) {
25 var lastResponse *http.Response
26 var lastError error
27
28 retryableRoundTrip := func() error {
29 lastResponse = nil
30 lastError = nil
31
32 // Fresh copy of the body for each retry.
33 if req.Body != nil {
34 originalBody, _ := req.GetBody()
35 if originalBody != nil {
36 req.Body = originalBody
37 }
38 }
39
40 lastResponse, lastError = http.DefaultTransport.RoundTrip(req)
41 // Detect Heroku API rate limiting
42 // https://devcenter.heroku.com/articles/platform-api-reference#client-error-responses
43 if lastResponse != nil && lastResponse.StatusCode == 429 {
44 return fmt.Errorf("Heroku API rate limited: 429 Too Many Requests")
45 }
46 return nil
47 }
48
49 rateLimitRetryConfig := &backoff.ExponentialBackOff{
50 Clock: backoff.SystemClock,
51 InitialInterval: time.Duration(int64WithDefault(r.InitialIntervalSeconds, int64(30))) * time.Second,
52 RandomizationFactor: float64WithDefault(r.RandomizationFactor, float64(0.25)),
53 Multiplier: float64WithDefault(r.Multiplier, float64(2)),
54 MaxInterval: time.Duration(int64WithDefault(r.MaxIntervalSeconds, int64(900))) * time.Second,
55 MaxElapsedTime: time.Duration(int64WithDefault(r.MaxElapsedTimeSeconds, int64(0))) * time.Second,
56 }
57 rateLimitRetryConfig.Reset()
58
59 err := backoff.RetryNotify(retryableRoundTrip, rateLimitRetryConfig, notifyLog)
60 // Propagate the rate limit error when retries eventually fail.
61 if err != nil {
62 if lastResponse != nil {
63 lastResponse.Body.Close()
64 }
65 return nil, err
66 }
67 // Propagate all other response errors.
68 if lastError != nil {
69 if lastResponse != nil {
70 lastResponse.Body.Close()
71 }
72 return nil, lastError
73 }
74
75 return lastResponse, nil
76 }
77
78 func int64WithDefault(v int64, defaultV int64) int64 {
79 if v == int64(0) {
80 return defaultV
81 } else {
82 return v
83 }
84 }
85
86 func float64WithDefault(v float64, defaultV float64) float64 {
87 if v == float64(0) {
88 return defaultV
89 } else {
90 return v
91 }
92 }
93
94 func notifyLog(err error, waitDuration time.Duration) {
95 log.Printf("Will retry Heroku API request in %s, because %s", waitDuration, err)
96 }
0 {
1 "$schema": "http://interagent.github.io/interagent-hyper-schema",
2 "type": [
3 "object"
4 ],
5 "definitions": {
6 "account-feature": {
7 "description": "An account feature represents a Heroku labs capability that can be enabled or disabled for an account on Heroku.",
8 "$schema": "http://json-schema.org/draft-04/hyper-schema",
9 "stability": "production",
10 "strictProperties": true,
11 "title": "Heroku Platform API - Account Feature",
12 "type": [
13 "object"
14 ],
15 "definitions": {
16 "created_at": {
17 "description": "when account feature was created",
18 "example": "2012-01-01T12:00:00Z",
19 "format": "date-time",
20 "readOnly": true,
21 "type": [
22 "string"
23 ]
24 },
25 "description": {
26 "description": "description of account feature",
27 "example": "Causes account to example.",
28 "readOnly": true,
29 "type": [
30 "string"
31 ]
32 },
33 "doc_url": {
34 "description": "documentation URL of account feature",
35 "example": "http://devcenter.heroku.com/articles/example",
36 "readOnly": true,
37 "type": [
38 "string"
39 ]
40 },
41 "enabled": {
42 "description": "whether or not account feature has been enabled",
43 "example": true,
44 "readOnly": false,
45 "type": [
46 "boolean"
47 ]
48 },
49 "id": {
50 "description": "unique identifier of account feature",
51 "example": "01234567-89ab-cdef-0123-456789abcdef",
52 "format": "uuid",
53 "readOnly": true,
54 "type": [
55 "string"
56 ]
57 },
58 "identity": {
59 "anyOf": [
60 {
61 "$ref": "#/definitions/account-feature/definitions/id"
62 },
63 {
64 "$ref": "#/definitions/account-feature/definitions/name"
65 }
66 ]
67 },
68 "name": {
69 "description": "unique name of account feature",
70 "example": "name",
71 "readOnly": true,
72 "type": [
73 "string"
74 ]
75 },
76 "state": {
77 "description": "state of account feature",
78 "example": "public",
79 "readOnly": true,
80 "type": [
81 "string"
82 ]
83 },
84 "updated_at": {
85 "description": "when account feature was updated",
86 "example": "2012-01-01T12:00:00Z",
87 "format": "date-time",
88 "readOnly": true,
89 "type": [
90 "string"
91 ]
92 },
93 "display_name": {
94 "description": "user readable feature name",
95 "example": "My Feature",
96 "readOnly": true,
97 "type": [
98 "string"
99 ]
100 },
101 "feedback_email": {
102 "description": "e-mail to send feedback about the feature",
103 "example": "feedback@heroku.com",
104 "readOnly": true,
105 "type": [
106 "string"
107 ]
108 }
109 },
110 "links": [
111 {
112 "description": "Info for an existing account feature.",
113 "href": "/account/features/{(%23%2Fdefinitions%2Faccount-feature%2Fdefinitions%2Fidentity)}",
114 "method": "GET",
115 "rel": "self",
116 "targetSchema": {
117 "$ref": "#/definitions/account-feature"
118 },
119 "title": "Info"
120 },
121 {
122 "description": "List existing account features.",
123 "href": "/account/features",
124 "method": "GET",
125 "rel": "instances",
126 "targetSchema": {
127 "items": {
128 "$ref": "#/definitions/account-feature"
129 },
130 "type": [
131 "array"
132 ]
133 },
134 "title": "List"
135 },
136 {
137 "description": "Update an existing account feature.",
138 "href": "/account/features/{(%23%2Fdefinitions%2Faccount-feature%2Fdefinitions%2Fidentity)}",
139 "method": "PATCH",
140 "rel": "update",
141 "schema": {
142 "properties": {
143 "enabled": {
144 "$ref": "#/definitions/account-feature/definitions/enabled"
145 }
146 },
147 "required": [
148 "enabled"
149 ],
150 "type": [
151 "object"
152 ]
153 },
154 "targetSchema": {
155 "$ref": "#/definitions/account-feature"
156 },
157 "title": "Update"
158 }
159 ],
160 "properties": {
161 "created_at": {
162 "$ref": "#/definitions/account-feature/definitions/created_at"
163 },
164 "description": {
165 "$ref": "#/definitions/account-feature/definitions/description"
166 },
167 "doc_url": {
168 "$ref": "#/definitions/account-feature/definitions/doc_url"
169 },
170 "enabled": {
171 "$ref": "#/definitions/account-feature/definitions/enabled"
172 },
173 "id": {
174 "$ref": "#/definitions/account-feature/definitions/id"
175 },
176 "name": {
177 "$ref": "#/definitions/account-feature/definitions/name"
178 },
179 "state": {
180 "$ref": "#/definitions/account-feature/definitions/state"
181 },
182 "updated_at": {
183 "$ref": "#/definitions/account-feature/definitions/updated_at"
184 },
185 "display_name": {
186 "$ref": "#/definitions/account-feature/definitions/display_name"
187 },
188 "feedback_email": {
189 "$ref": "#/definitions/account-feature/definitions/feedback_email"
190 }
191 }
192 },
193 "account": {
194 "description": "An account represents an individual signed up to use the Heroku platform.",
195 "$schema": "http://json-schema.org/draft-04/hyper-schema",
196 "stability": "production",
197 "strictProperties": true,
198 "title": "Heroku Platform API - Account",
199 "type": [
200 "object"
201 ],
202 "definitions": {
203 "allow_tracking": {
204 "default": true,
205 "description": "whether to allow third party web activity tracking",
206 "example": true,
207 "readOnly": false,
208 "type": [
209 "boolean"
210 ]
211 },
212 "beta": {
213 "default": false,
214 "description": "whether allowed to utilize beta Heroku features",
215 "example": false,
216 "readOnly": false,
217 "type": [
218 "boolean"
219 ]
220 },
221 "created_at": {
222 "description": "when account was created",
223 "example": "2012-01-01T12:00:00Z",
224 "format": "date-time",
225 "readOnly": true,
226 "type": [
227 "string"
228 ]
229 },
230 "email": {
231 "description": "unique email address of account",
232 "example": "username@example.com",
233 "format": "email",
234 "readOnly": false,
235 "type": [
236 "string"
237 ]
238 },
239 "federated": {
240 "description": "whether the user is federated and belongs to an Identity Provider",
241 "example": false,
242 "readOnly": true,
243 "type": [
244 "boolean"
245 ]
246 },
247 "id": {
248 "description": "unique identifier of an account",
249 "example": "01234567-89ab-cdef-0123-456789abcdef",
250 "format": "uuid",
251 "readOnly": true,
252 "type": [
253 "string"
254 ]
255 },
256 "identity": {
257 "anyOf": [
258 {
259 "$ref": "#/definitions/account/definitions/email"
260 },
261 {
262 "$ref": "#/definitions/account/definitions/id"
263 },
264 {
265 "$ref": "#/definitions/account/definitions/self"
266 }
267 ]
268 },
269 "last_login": {
270 "description": "when account last authorized with Heroku",
271 "example": "2012-01-01T12:00:00Z",
272 "format": "date-time",
273 "readOnly": true,
274 "type": [
275 "string",
276 "null"
277 ]
278 },
279 "name": {
280 "description": "full name of the account owner",
281 "example": "Tina Edmonds",
282 "readOnly": false,
283 "type": [
284 "string",
285 "null"
286 ]
287 },
288 "password": {
289 "description": "current password on the account",
290 "example": "currentpassword",
291 "readOnly": true,
292 "type": [
293 "string"
294 ]
295 },
296 "self": {
297 "description": "Implicit reference to currently authorized user",
298 "enum": [
299 "~"
300 ],
301 "example": "~",
302 "readOnly": true,
303 "type": [
304 "string"
305 ]
306 },
307 "sms_number": {
308 "description": "SMS number of account",
309 "example": "+1 ***-***-1234",
310 "readOnly": true,
311 "type": [
312 "string",
313 "null"
314 ]
315 },
316 "suspended_at": {
317 "description": "when account was suspended",
318 "example": "2012-01-01T12:00:00Z",
319 "format": "date-time",
320 "readOnly": true,
321 "type": [
322 "string",
323 "null"
324 ]
325 },
326 "delinquent_at": {
327 "description": "when account became delinquent",
328 "example": "2012-01-01T12:00:00Z",
329 "format": "date-time",
330 "readOnly": true,
331 "type": [
332 "string",
333 "null"
334 ]
335 },
336 "two_factor_authentication": {
337 "description": "whether two-factor auth is enabled on the account",
338 "example": false,
339 "readOnly": true,
340 "type": [
341 "boolean"
342 ]
343 },
344 "updated_at": {
345 "description": "when account was updated",
346 "example": "2012-01-01T12:00:00Z",
347 "format": "date-time",
348 "readOnly": true,
349 "type": [
350 "string"
351 ]
352 },
353 "verified": {
354 "default": false,
355 "description": "whether account has been verified with billing information",
356 "example": false,
357 "readOnly": true,
358 "type": [
359 "boolean"
360 ]
361 }
362 },
363 "links": [
364 {
365 "description": "Info for account.",
366 "href": "/account",
367 "method": "GET",
368 "rel": "self",
369 "targetSchema": {
370 "$ref": "#/definitions/account"
371 },
372 "title": "Info"
373 },
374 {
375 "description": "Update account.",
376 "href": "/account",
377 "method": "PATCH",
378 "rel": "update",
379 "schema": {
380 "properties": {
381 "allow_tracking": {
382 "$ref": "#/definitions/account/definitions/allow_tracking"
383 },
384 "beta": {
385 "$ref": "#/definitions/account/definitions/beta"
386 },
387 "name": {
388 "$ref": "#/definitions/account/definitions/name"
389 }
390 },
391 "type": [
392 "object"
393 ]
394 },
395 "targetSchema": {
396 "$ref": "#/definitions/account"
397 },
398 "title": "Update"
399 },
400 {
401 "description": "Delete account. Note that this action cannot be undone.",
402 "href": "/account",
403 "method": "DELETE",
404 "rel": "destroy",
405 "targetSchema": {
406 "$ref": "#/definitions/account"
407 },
408 "title": "Delete"
409 },
410 {
411 "description": "Info for account.",
412 "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}",
413 "method": "GET",
414 "rel": "self",
415 "targetSchema": {
416 "$ref": "#/definitions/account"
417 },
418 "title": "Info By User"
419 },
420 {
421 "description": "Update account.",
422 "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}",
423 "method": "PATCH",
424 "rel": "update",
425 "schema": {
426 "properties": {
427 "allow_tracking": {
428 "$ref": "#/definitions/account/definitions/allow_tracking"
429 },
430 "beta": {
431 "$ref": "#/definitions/account/definitions/beta"
432 },
433 "name": {
434 "$ref": "#/definitions/account/definitions/name"
435 }
436 },
437 "type": [
438 "object"
439 ]
440 },
441 "targetSchema": {
442 "$ref": "#/definitions/account"
443 },
444 "title": "Update By User"
445 },
446 {
447 "description": "Delete account. Note that this action cannot be undone.",
448 "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}",
449 "method": "DELETE",
450 "rel": "destroy",
451 "targetSchema": {
452 "$ref": "#/definitions/account"
453 },
454 "title": "Delete By User"
455 }
456 ],
457 "properties": {
458 "allow_tracking": {
459 "$ref": "#/definitions/account/definitions/allow_tracking"
460 },
461 "beta": {
462 "$ref": "#/definitions/account/definitions/beta"
463 },
464 "created_at": {
465 "$ref": "#/definitions/account/definitions/created_at"
466 },
467 "email": {
468 "$ref": "#/definitions/account/definitions/email"
469 },
470 "federated": {
471 "$ref": "#/definitions/account/definitions/federated"
472 },
473 "id": {
474 "$ref": "#/definitions/account/definitions/id"
475 },
476 "identity_provider": {
477 "description": "Identity Provider details for federated users.",
478 "properties": {
479 "id": {
480 "$ref": "#/definitions/identity-provider/definitions/id"
481 },
482 "organization": {
483 "type": [
484 "object"
485 ],
486 "properties": {
487 "name": {
488 "$ref": "#/definitions/organization/definitions/name"
489 }
490 }
491 },
492 "owner": {
493 "description": "entity that owns this identity provider",
494 "properties": {
495 "id": {
496 "description": "unique identifier of the owner",
497 "example": "01234567-89ab-cdef-0123-456789abcdef",
498 "format": "uuid",
499 "readOnly": true,
500 "type": [
501 "string"
502 ]
503 },
504 "name": {
505 "description": "name of the owner",
506 "example": "acme",
507 "readOnly": true,
508 "type": [
509 "string"
510 ]
511 },
512 "type": {
513 "description": "type of the owner",
514 "enum": [
515 "team",
516 "enterprise-account"
517 ],
518 "example": "team",
519 "readOnly": true,
520 "type": [
521 "string"
522 ]
523 }
524 },
525 "readOnly": false,
526 "required": [
527 "id",
528 "type"
529 ],
530 "type": [
531 "object"
532 ]
533 }
534 },
535 "type": [
536 "object",
537 "null"
538 ]
539 },
540 "last_login": {
541 "$ref": "#/definitions/account/definitions/last_login"
542 },
543 "name": {
544 "$ref": "#/definitions/account/definitions/name"
545 },
546 "sms_number": {
547 "$ref": "#/definitions/account/definitions/sms_number"
548 },
549 "suspended_at": {
550 "$ref": "#/definitions/account/definitions/suspended_at"
551 },
552 "delinquent_at": {
553 "$ref": "#/definitions/account/definitions/delinquent_at"
554 },
555 "two_factor_authentication": {
556 "$ref": "#/definitions/account/definitions/two_factor_authentication"
557 },
558 "updated_at": {
559 "$ref": "#/definitions/account/definitions/updated_at"
560 },
561 "verified": {
562 "$ref": "#/definitions/account/definitions/verified"
563 },
564 "default_organization": {
565 "description": "organization selected by default",
566 "properties": {
567 "id": {
568 "$ref": "#/definitions/organization/definitions/id"
569 },
570 "name": {
571 "$ref": "#/definitions/organization/definitions/name"
572 }
573 },
574 "strictProperties": true,
575 "type": [
576 "object",
577 "null"
578 ]
579 }
580 }
581 },
582 "add-on-action": {
583 "description": "Add-on Actions are lifecycle operations for add-on provisioning and deprovisioning. They allow whitelisted add-on providers to (de)provision add-ons in the background and then report back when (de)provisioning is complete.",
584 "$schema": "http://json-schema.org/draft-04/hyper-schema",
585 "stability": "development",
586 "strictProperties": true,
587 "title": "Heroku Platform API - Add-on Action",
588 "type": [
589 "object"
590 ],
591 "definitions": {
592 },
593 "links": [
594 {
595 "description": "Mark an add-on as provisioned for use.",
596 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/actions/provision",
597 "method": "POST",
598 "rel": "create",
599 "targetSchema": {
600 "$ref": "#/definitions/add-on"
601 },
602 "title": "Provision"
603 },
604 {
605 "description": "Mark an add-on as deprovisioned.",
606 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/actions/deprovision",
607 "method": "POST",
608 "rel": "create",
609 "targetSchema": {
610 "$ref": "#/definitions/add-on"
611 },
612 "title": "Deprovision"
613 }
614 ],
615 "properties": {
616 }
617 },
618 "add-on-attachment": {
619 "description": "An add-on attachment represents a connection between an app and an add-on that it has been given access to.",
620 "$schema": "http://json-schema.org/draft-04/hyper-schema",
621 "stability": "prototype",
622 "strictProperties": true,
623 "title": "Heroku Platform API - Add-on Attachment",
624 "type": [
625 "object"
626 ],
627 "definitions": {
628 "confirm": {
629 "description": "name of owning app for confirmation",
630 "example": "example",
631 "type": [
632 "string"
633 ]
634 },
635 "created_at": {
636 "description": "when add-on attachment was created",
637 "example": "2012-01-01T12:00:00Z",
638 "format": "date-time",
639 "readOnly": true,
640 "type": [
641 "string"
642 ]
643 },
644 "id": {
645 "description": "unique identifier of this add-on attachment",
646 "example": "01234567-89ab-cdef-0123-456789abcdef",
647 "format": "uuid",
648 "readOnly": true,
649 "type": [
650 "string"
651 ]
652 },
653 "identity": {
654 "anyOf": [
655 {
656 "$ref": "#/definitions/add-on-attachment/definitions/id"
657 }
658 ]
659 },
660 "scopedIdentity": {
661 "anyOf": [
662 {
663 "$ref": "#/definitions/add-on-attachment/definitions/id"
664 },
665 {
666 "$ref": "#/definitions/add-on-attachment/definitions/name"
667 }
668 ]
669 },
670 "name": {
671 "description": "unique name for this add-on attachment to this app",
672 "example": "DATABASE",
673 "readOnly": true,
674 "type": [
675 "string"
676 ]
677 },
678 "namespace": {
679 "description": "attachment namespace",
680 "example": "role:analytics",
681 "readOnly": true,
682 "type": [
683 "null",
684 "string"
685 ]
686 },
687 "updated_at": {
688 "description": "when add-on attachment was updated",
689 "example": "2012-01-01T12:00:00Z",
690 "format": "date-time",
691 "readOnly": true,
692 "type": [
693 "string"
694 ]
695 },
696 "web_url": {
697 "description": "URL for logging into web interface of add-on in attached app context",
698 "example": "https://postgres.heroku.com/databases/01234567-89ab-cdef-0123-456789abcdef",
699 "format": "uri",
700 "readOnly": true,
701 "type": [
702 "null",
703 "string"
704 ]
705 },
706 "log_input_url": {
707 "description": "URL for add-on partners to write to an add-on's logs",
708 "example": "https://token:t.abcdef12-3456-7890-abcd-ef1234567890@1.us.logplex.io/logs",
709 "type": [
710 "null",
711 "string"
712 ],
713 "readOnly": true
714 }
715 },
716 "links": [
717 {
718 "description": "Create a new add-on attachment.",
719 "href": "/addon-attachments",
720 "method": "POST",
721 "rel": "create",
722 "schema": {
723 "properties": {
724 "addon": {
725 "$ref": "#/definitions/add-on/definitions/identity"
726 },
727 "app": {
728 "$ref": "#/definitions/app/definitions/identity"
729 },
730 "confirm": {
731 "$ref": "#/definitions/add-on-attachment/definitions/confirm"
732 },
733 "name": {
734 "$ref": "#/definitions/add-on-attachment/definitions/name"
735 },
736 "namespace": {
737 "$ref": "#/definitions/add-on-attachment/definitions/namespace"
738 }
739 },
740 "required": [
741 "addon",
742 "app"
743 ],
744 "type": [
745 "object"
746 ]
747 },
748 "targetSchema": {
749 "$ref": "#/definitions/add-on-attachment"
750 },
751 "title": "Create"
752 },
753 {
754 "description": "Delete an existing add-on attachment.",
755 "href": "/addon-attachments/{(%23%2Fdefinitions%2Fadd-on-attachment%2Fdefinitions%2Fidentity)}",
756 "method": "DELETE",
757 "rel": "destroy",
758 "targetSchema": {
759 "$ref": "#/definitions/add-on-attachment"
760 },
761 "title": "Delete"
762 },
763 {
764 "description": "Info for existing add-on attachment.",
765 "href": "/addon-attachments/{(%23%2Fdefinitions%2Fadd-on-attachment%2Fdefinitions%2Fidentity)}",
766 "method": "GET",
767 "rel": "self",
768 "targetSchema": {
769 "$ref": "#/definitions/add-on-attachment"
770 },
771 "title": "Info"
772 },
773 {
774 "description": "List existing add-on attachments.",
775 "href": "/addon-attachments",
776 "method": "GET",
777 "rel": "instances",
778 "targetSchema": {
779 "items": {
780 "$ref": "#/definitions/add-on-attachment"
781 },
782 "type": [
783 "array"
784 ]
785 },
786 "title": "List"
787 },
788 {
789 "description": "List existing add-on attachments for an add-on.",
790 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/addon-attachments",
791 "method": "GET",
792 "rel": "instances",
793 "targetSchema": {
794 "items": {
795 "$ref": "#/definitions/add-on-attachment"
796 },
797 "type": [
798 "array"
799 ]
800 },
801 "title": "List by Add-on"
802 },
803 {
804 "description": "List existing add-on attachments for an app.",
805 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addon-attachments",
806 "method": "GET",
807 "rel": "instances",
808 "targetSchema": {
809 "items": {
810 "$ref": "#/definitions/add-on-attachment"
811 },
812 "type": [
813 "array"
814 ]
815 },
816 "title": "List by App"
817 },
818 {
819 "description": "Info for existing add-on attachment for an app.",
820 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addon-attachments/{(%23%2Fdefinitions%2Fadd-on-attachment%2Fdefinitions%2FscopedIdentity)}",
821 "method": "GET",
822 "rel": "self",
823 "targetSchema": {
824 "$ref": "#/definitions/add-on-attachment"
825 },
826 "title": "Info by App"
827 },
828 {
829 "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.",
830 "href": "/actions/addon-attachments/resolve",
831 "method": "POST",
832 "rel": "resolve",
833 "schema": {
834 "properties": {
835 "addon_attachment": {
836 "$ref": "#/definitions/add-on-attachment/definitions/name"
837 },
838 "app": {
839 "$ref": "#/definitions/app/definitions/name"
840 },
841 "addon_service": {
842 "$ref": "#/definitions/add-on-service/definitions/name"
843 }
844 },
845 "required": [
846 "addon_attachment"
847 ],
848 "type": [
849 "object"
850 ]
851 },
852 "targetSchema": {
853 "items": {
854 "$ref": "#/definitions/add-on-attachment"
855 },
856 "type": [
857 "array"
858 ]
859 },
860 "title": "Resolution"
861 }
862 ],
863 "properties": {
864 "addon": {
865 "description": "identity of add-on",
866 "properties": {
867 "id": {
868 "$ref": "#/definitions/add-on/definitions/id"
869 },
870 "name": {
871 "$ref": "#/definitions/add-on/definitions/name"
872 },
873 "app": {
874 "description": "billing application associated with this add-on",
875 "type": [
876 "object"
877 ],
878 "properties": {
879 "id": {
880 "$ref": "#/definitions/app/definitions/id"
881 },
882 "name": {
883 "$ref": "#/definitions/app/definitions/name"
884 }
885 },
886 "strictProperties": true
887 }
888 },
889 "additionalProperties": false,
890 "required": [
891 "id",
892 "name",
893 "app"
894 ],
895 "type": [
896 "object"
897 ]
898 },
899 "app": {
900 "description": "application that is attached to add-on",
901 "properties": {
902 "id": {
903 "$ref": "#/definitions/app/definitions/id"
904 },
905 "name": {
906 "$ref": "#/definitions/app/definitions/name"
907 }
908 },
909 "strictProperties": true,
910 "type": [
911 "object"
912 ]
913 },
914 "created_at": {
915 "$ref": "#/definitions/add-on-attachment/definitions/created_at"
916 },
917 "id": {
918 "$ref": "#/definitions/add-on-attachment/definitions/id"
919 },
920 "name": {
921 "$ref": "#/definitions/add-on-attachment/definitions/name"
922 },
923 "namespace": {
924 "$ref": "#/definitions/add-on-attachment/definitions/namespace"
925 },
926 "updated_at": {
927 "$ref": "#/definitions/add-on-attachment/definitions/updated_at"
928 },
929 "web_url": {
930 "$ref": "#/definitions/add-on-attachment/definitions/web_url"
931 },
932 "log_input_url": {
933 "$ref": "#/definitions/add-on-attachment/definitions/log_input_url"
934 }
935 }
936 },
937 "add-on-config": {
938 "description": "Configuration of an Add-on",
939 "$schema": "http://json-schema.org/draft-04/hyper-schema",
940 "stability": "development",
941 "strictProperties": true,
942 "title": "Heroku Platform API - Add-on Config",
943 "type": [
944 "object"
945 ],
946 "definitions": {
947 "identity": {
948 "anyOf": [
949 {
950 "$ref": "#/definitions/add-on-config/definitions/name"
951 }
952 ]
953 },
954 "name": {
955 "description": "unique name of the config",
956 "example": "FOO",
957 "type": [
958 "string"
959 ]
960 },
961 "value": {
962 "description": "value of the config",
963 "example": "bar",
964 "type": [
965 "string",
966 "null"
967 ]
968 }
969 },
970 "links": [
971 {
972 "description": "Get an add-on's config. Accessible by customers with access and by the add-on partner providing this add-on.",
973 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/config",
974 "method": "GET",
975 "rel": "instances",
976 "targetSchema": {
977 "items": {
978 "$ref": "#/definitions/add-on-config"
979 },
980 "type": [
981 "array"
982 ]
983 },
984 "title": "List"
985 },
986 {
987 "description": "Update an add-on's config. Can only be accessed by the add-on partner providing this add-on.",
988 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/config",
989 "method": "PATCH",
990 "rel": "update",
991 "schema": {
992 "properties": {
993 "config": {
994 "items": {
995 "$ref": "#/definitions/add-on-config"
996 },
997 "type": [
998 "array"
999 ]
1000 }
1001 },
1002 "type": [
1003 "object"
1004 ]
1005 },
1006 "targetSchema": {
1007 "type": [
1008 "array"
1009 ],
1010 "items": {
1011 "$ref": "#/definitions/add-on-config"
1012 }
1013 },
1014 "title": "Update"
1015 }
1016 ],
1017 "properties": {
1018 "name": {
1019 "$ref": "#/definitions/add-on-config/definitions/name"
1020 },
1021 "value": {
1022 "$ref": "#/definitions/add-on-config/definitions/value"
1023 }
1024 }
1025 },
1026 "add-on-plan-action": {
1027 "description": "Add-on Plan Actions are Provider functionality for specific add-on installations",
1028 "$schema": "http://json-schema.org/draft-04/hyper-schema",
1029 "stability": "development",
1030 "strictProperties": true,
1031 "title": "Heroku Platform API - Add-on Plan Action",
1032 "type": [
1033 "object"
1034 ],
1035 "definitions": {
1036 "id": {
1037 "description": "a unique identifier",
1038 "example": "01234567-89ab-cdef-0123-456789abcdef",
1039 "format": "uuid",
1040 "readOnly": true,
1041 "type": [
1042 "string"
1043 ]
1044 },
1045 "identity": {
1046 "$ref": "#/definitions/add-on-plan-action/definitions/id"
1047 },
1048 "label": {
1049 "description": "the display text shown in Dashboard",
1050 "example": "Example",
1051 "readOnly": true,
1052 "type": [
1053 "string"
1054 ]
1055 },
1056 "action": {
1057 "description": "identifier of the action to take that is sent via SSO",
1058 "example": "example",
1059 "readOnly": true,
1060 "type": [
1061 "string"
1062 ]
1063 },
1064 "url": {
1065 "description": "absolute URL to use instead of an action",
1066 "example": "http://example.com?resource_id=:resource_id",
1067 "readOnly": true,
1068 "type": [
1069 "string"
1070 ]
1071 },
1072 "requires_owner": {
1073 "description": "if the action requires the user to own the app",
1074 "example": true,
1075 "readOnly": true,
1076 "type": [
1077 "boolean"
1078 ]
1079 }
1080 },
1081 "properties": {
1082 "id": {
1083 "$ref": "#/definitions/add-on-plan-action/definitions/id"
1084 },
1085 "label": {
1086 "$ref": "#/definitions/add-on-plan-action/definitions/label"
1087 },
1088 "action": {
1089 "$ref": "#/definitions/add-on-plan-action/definitions/action"
1090 },
1091 "url": {
1092 "$ref": "#/definitions/add-on-plan-action/definitions/url"
1093 },
1094 "requires_owner": {
1095 "$ref": "#/definitions/add-on-plan-action/definitions/requires_owner"
1096 }
1097 }
1098 },
1099 "add-on-region-capability": {
1100 "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.",
1101 "$schema": "http://json-schema.org/draft-04/hyper-schema",
1102 "stability": "production",
1103 "strictProperties": true,
1104 "title": "Heroku Platform API - Add-on Region Capability",
1105 "type": [
1106 "object"
1107 ],
1108 "definitions": {
1109 "id": {
1110 "description": "unique identifier of this add-on-region-capability",
1111 "example": "01234567-89ab-cdef-0123-456789abcdef",
1112 "format": "uuid",
1113 "readOnly": true,
1114 "type": [
1115 "string"
1116 ]
1117 },
1118 "supports_private_networking": {
1119 "description": "whether the add-on can be installed to a Space",
1120 "readOnly": true,
1121 "type": [
1122 "boolean"
1123 ]
1124 },
1125 "identity": {
1126 "$ref": "#/definitions/add-on-region-capability/definitions/id"
1127 }
1128 },
1129 "links": [
1130 {
1131 "description": "List all existing add-on region capabilities.",
1132 "href": "/addon-region-capabilities",
1133 "method": "GET",
1134 "rel": "instances",
1135 "targetSchema": {
1136 "items": {
1137 "$ref": "#/definitions/add-on-region-capability"
1138 },
1139 "type": [
1140 "array"
1141 ]
1142 },
1143 "title": "List"
1144 },
1145 {
1146 "description": "List existing add-on region capabilities for an add-on-service",
1147 "href": "/addon-services/{(%23%2Fdefinitions%2Fadd-on-service%2Fdefinitions%2Fidentity)}/region-capabilities",
1148 "method": "GET",
1149 "rel": "instances",
1150 "targetSchema": {
1151 "items": {
1152 "$ref": "#/definitions/add-on-region-capability"
1153 },
1154 "type": [
1155 "array"
1156 ]
1157 },
1158 "title": "List by Add-on Service"
1159 },
1160 {
1161 "description": "List existing add-on region capabilities for a region.",
1162 "href": "/regions/{(%23%2Fdefinitions%2Fregion%2Fdefinitions%2Fidentity)}/addon-region-capabilities",
1163 "method": "GET",
1164 "rel": "instances",
1165 "targetSchema": {
1166 "items": {
1167 "$ref": "#/definitions/add-on-region-capability"
1168 },
1169 "type": [
1170 "array"
1171 ]
1172 },
1173 "title": "List By Region"
1174 }
1175 ],
1176 "properties": {
1177 "id": {
1178 "$ref": "#/definitions/add-on-region-capability/definitions/id"
1179 },
1180 "supports_private_networking": {
1181 "$ref": "#/definitions/add-on-region-capability/definitions/supports_private_networking"
1182 },
1183 "addon_service": {
1184 "$ref": "#/definitions/add-on-service"
1185 },
1186 "region": {
1187 "$ref": "#/definitions/region"
1188 }
1189 }
1190 },
1191 "add-on-service": {
1192 "description": "Add-on services represent add-ons that may be provisioned for apps. Endpoints under add-on services can be accessed without authentication.",
1193 "$schema": "http://json-schema.org/draft-04/hyper-schema",
1194 "stability": "production",
1195 "strictProperties": true,
1196 "title": "Heroku Platform API - Add-on Service",
1197 "type": [
1198 "object"
1199 ],
1200 "definitions": {
1201 "cli_plugin_name": {
1202 "description": "npm package name of the add-on service's Heroku CLI plugin",
1203 "example": "heroku-papertrail",
1204 "readOnly": true,
1205 "type": [
1206 "string",
1207 "null"
1208 ]
1209 },
1210 "created_at": {
1211 "description": "when add-on-service was created",
1212 "example": "2012-01-01T12:00:00Z",
1213 "format": "date-time",
1214 "readOnly": true,
1215 "type": [
1216 "string"
1217 ]
1218 },
1219 "human_name": {
1220 "description": "human-readable name of the add-on service provider",
1221 "example": "Heroku Postgres",
1222 "readOnly": true,
1223 "type": [
1224 "string"
1225 ]
1226 },
1227 "id": {
1228 "description": "unique identifier of this add-on-service",
1229 "example": "01234567-89ab-cdef-0123-456789abcdef",
1230 "format": "uuid",
1231 "readOnly": true,
1232 "type": [
1233 "string"
1234 ]
1235 },
1236 "identity": {
1237 "anyOf": [
1238 {
1239 "$ref": "#/definitions/add-on-service/definitions/id"
1240 },
1241 {
1242 "$ref": "#/definitions/add-on-service/definitions/name"
1243 }
1244 ]
1245 },
1246 "name": {
1247 "description": "unique name of this add-on-service",
1248 "example": "heroku-postgresql",
1249 "readOnly": true,
1250 "type": [
1251 "string"
1252 ]
1253 },
1254 "state": {
1255 "description": "release status for add-on service",
1256 "enum": [
1257 "alpha",
1258 "beta",
1259 "ga",
1260 "shutdown"
1261 ],
1262 "example": "ga",
1263 "readOnly": true,
1264 "type": [
1265 "string"
1266 ]
1267 },
1268 "supports_multiple_installations": {
1269 "default": false,
1270 "description": "whether or not apps can have access to more than one instance of this add-on at the same time",
1271 "example": false,
1272 "readOnly": true,
1273 "type": [
1274 "boolean"
1275 ]
1276 },
1277 "supports_sharing": {
1278 "default": false,
1279 "description": "whether or not apps can have access to add-ons billed to a different app",
1280 "example": false,
1281 "readOnly": true,
1282 "type": [
1283 "boolean"
1284 ]
1285 },
1286 "updated_at": {
1287 "description": "when add-on-service was updated",
1288 "example": "2012-01-01T12:00:00Z",
1289 "format": "date-time",
1290 "readOnly": true,
1291 "type": [
1292 "string"
1293 ]
1294 }
1295 },
1296 "links": [
1297 {
1298 "description": "Info for existing add-on-service.",
1299 "href": "/addon-services/{(%23%2Fdefinitions%2Fadd-on-service%2Fdefinitions%2Fidentity)}",
1300 "method": "GET",
1301 "rel": "self",
1302 "targetSchema": {
1303 "$ref": "#/definitions/add-on-service"
1304 },
1305 "title": "Info"
1306 },
1307 {
1308 "description": "List existing add-on-services.",
1309 "href": "/addon-services",
1310 "method": "GET",
1311 "rel": "instances",
1312 "targetSchema": {
1313 "items": {
1314 "$ref": "#/definitions/add-on-service"
1315 },
1316 "type": [
1317 "array"
1318 ]
1319 },
1320 "title": "List"
1321 }
1322 ],
1323 "properties": {
1324 "cli_plugin_name": {
1325 "$ref": "#/definitions/add-on-service/definitions/cli_plugin_name"
1326 },
1327 "created_at": {
1328 "$ref": "#/definitions/add-on-service/definitions/created_at"
1329 },
1330 "human_name": {
1331 "$ref": "#/definitions/add-on-service/definitions/human_name"
1332 },
1333 "id": {
1334 "$ref": "#/definitions/add-on-service/definitions/id"
1335 },
1336 "name": {
1337 "$ref": "#/definitions/add-on-service/definitions/name"
1338 },
1339 "state": {
1340 "$ref": "#/definitions/add-on-service/definitions/state"
1341 },
1342 "supports_multiple_installations": {
1343 "$ref": "#/definitions/add-on-service/definitions/supports_multiple_installations"
1344 },
1345 "supports_sharing": {
1346 "$ref": "#/definitions/add-on-service/definitions/supports_sharing"
1347 },
1348 "updated_at": {
1349 "$ref": "#/definitions/add-on-service/definitions/updated_at"
1350 }
1351 }
1352 },
1353 "add-on-webhook-delivery": {
1354 "$schema": "http://json-schema.org/draft-04/hyper-schema",
1355 "title": "Heroku Platform API - Add-on Webhook Delivery",
1356 "description": "Represents the delivery of a webhook notification, including its current status.",
1357 "stability": "production",
1358 "strictProperties": true,
1359 "type": [
1360 "object"
1361 ],
1362 "links": [
1363 {
1364 "description": "Returns the info for an existing delivery. Can only be accessed by the add-on partner providing this add-on.",
1365 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhook-deliveries/{(%23%2Fdefinitions%2Fapp-webhook-delivery%2Fdefinitions%2Fidentity)}",
1366 "method": "GET",
1367 "rel": "self",
1368 "targetSchema": {
1369 "$ref": "#/definitions/app-webhook-delivery"
1370 },
1371 "title": "Info"
1372 },
1373 {
1374 "description": "Lists existing deliveries for an add-on. Can only be accessed by the add-on partner providing this add-on.",
1375 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhook-deliveries",
1376 "method": "GET",
1377 "rel": "instances",
1378 "targetSchema": {
1379 "items": {
1380 "$ref": "#/definitions/app-webhook-delivery"
1381 },
1382 "type": [
1383 "array"
1384 ]
1385 },
1386 "title": "List"
1387 }
1388 ]
1389 },
1390 "add-on-webhook-event": {
1391 "$schema": "http://json-schema.org/draft-04/hyper-schema",
1392 "title": "Heroku Platform API - Add-on Webhook Event",
1393 "description": "Represents a webhook event that occurred.",
1394 "stability": "production",
1395 "strictProperties": true,
1396 "type": [
1397 "object"
1398 ],
1399 "links": [
1400 {
1401 "description": "Returns the info for a specified webhook event. Can only be accessed by the add-on partner providing this add-on.",
1402 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhook-events/{(%23%2Fdefinitions%2Fapp-webhook-event%2Fdefinitions%2Fidentity)}",
1403 "method": "GET",
1404 "rel": "self",
1405 "targetSchema": {
1406 "$ref": "#/definitions/app-webhook-event"
1407 },
1408 "title": "Info"
1409 },
1410 {
1411 "description": "Lists existing webhook events for an add-on. Can only be accessed by the add-on partner providing this add-on.",
1412 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhook-events",
1413 "method": "GET",
1414 "rel": "instances",
1415 "targetSchema": {
1416 "items": {
1417 "$ref": "#/definitions/app-webhook-event"
1418 },
1419 "type": [
1420 "array"
1421 ]
1422 },
1423 "title": "List"
1424 }
1425 ]
1426 },
1427 "add-on-webhook": {
1428 "$schema": "http://json-schema.org/draft-04/hyper-schema",
1429 "title": "Heroku Platform API - Add-on Webhook",
1430 "description": "Represents the details of a webhook subscription",
1431 "stability": "production",
1432 "strictProperties": false,
1433 "additionalProperties": false,
1434 "required": [
1435 "created_at",
1436 "id",
1437 "include",
1438 "level",
1439 "updated_at",
1440 "url"
1441 ],
1442 "type": [
1443 "object"
1444 ],
1445 "definitions": {
1446 "addon_webhook": {
1447 "properties": {
1448 "addon": {
1449 "description": "identity of add-on. Only used for add-on partner webhooks.",
1450 "properties": {
1451 "id": {
1452 "$ref": "#/definitions/add-on/definitions/id"
1453 },
1454 "name": {
1455 "$ref": "#/definitions/add-on/definitions/name"
1456 }
1457 },
1458 "strictProperties": true,
1459 "type": [
1460 "object"
1461 ]
1462 },
1463 "created_at": {
1464 "$ref": "#/definitions/app-webhook/definitions/created_at"
1465 },
1466 "id": {
1467 "$ref": "#/definitions/app-webhook/definitions/id"
1468 },
1469 "include": {
1470 "$ref": "#/definitions/app-webhook/definitions/include"
1471 },
1472 "level": {
1473 "$ref": "#/definitions/app-webhook/definitions/level"
1474 },
1475 "updated_at": {
1476 "$ref": "#/definitions/app-webhook/definitions/updated_at"
1477 },
1478 "url": {
1479 "$ref": "#/definitions/app-webhook/definitions/url"
1480 }
1481 },
1482 "description": "add-on webhook",
1483 "type": [
1484 "object"
1485 ]
1486 }
1487 },
1488 "links": [
1489 {
1490 "description": "Create an add-on webhook subscription. Can only be accessed by the add-on partner providing this add-on.",
1491 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhooks",
1492 "method": "POST",
1493 "rel": "create",
1494 "schema": {
1495 "properties": {
1496 "authorization": {
1497 "$ref": "#/definitions/app-webhook/definitions/authorization"
1498 },
1499 "include": {
1500 "$ref": "#/definitions/app-webhook/definitions/include"
1501 },
1502 "level": {
1503 "$ref": "#/definitions/app-webhook/definitions/level"
1504 },
1505 "secret": {
1506 "$ref": "#/definitions/app-webhook/definitions/secret"
1507 },
1508 "url": {
1509 "$ref": "#/definitions/app-webhook/definitions/url"
1510 }
1511 },
1512 "additionalProperties": false,
1513 "required": [
1514 "include",
1515 "level",
1516 "url"
1517 ],
1518 "type": [
1519 "object"
1520 ]
1521 },
1522 "targetSchema": {
1523 "$ref": "#/definitions/add-on-webhook/definitions/addon_webhook"
1524 },
1525 "title": "Create"
1526 },
1527 {
1528 "description": "Removes an add-on webhook subscription. Can only be accessed by the add-on partner providing this add-on.",
1529 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhooks/{(%23%2Fdefinitions%2Fapp-webhook%2Fdefinitions%2Fidentity)}",
1530 "method": "DELETE",
1531 "rel": "destroy",
1532 "targetSchema": {
1533 "$ref": "#/definitions/add-on-webhook/definitions/addon_webhook"
1534 },
1535 "title": "Delete"
1536 },
1537 {
1538 "description": "Returns the info for an add-on webhook subscription. Can only be accessed by the add-on partner providing this add-on.",
1539 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhooks/{(%23%2Fdefinitions%2Fapp-webhook%2Fdefinitions%2Fidentity)}",
1540 "method": "GET",
1541 "rel": "self",
1542 "targetSchema": {
1543 "$ref": "#/definitions/add-on-webhook/definitions/addon_webhook"
1544 },
1545 "title": "Info"
1546 },
1547 {
1548 "description": "List all webhook subscriptions for a particular add-on. Can only be accessed by the add-on partner providing this add-on.",
1549 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhooks",
1550 "method": "GET",
1551 "rel": "instances",
1552 "targetSchema": {
1553 "items": {
1554 "$ref": "#/definitions/add-on-webhook/definitions/addon_webhook"
1555 },
1556 "type": [
1557 "array"
1558 ]
1559 },
1560 "title": "List"
1561 },
1562 {
1563 "description": "Updates the details of an add-on webhook subscription. Can only be accessed by the add-on partner providing this add-on.",
1564 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/webhooks/{(%23%2Fdefinitions%2Fapp-webhook%2Fdefinitions%2Fidentity)}",
1565 "method": "PATCH",
1566 "rel": "update",
1567 "schema": {
1568 "properties": {
1569 "authorization": {
1570 "$ref": "#/definitions/app-webhook/definitions/authorization"
1571 },
1572 "include": {
1573 "$ref": "#/definitions/app-webhook/definitions/include"
1574 },
1575 "level": {
1576 "$ref": "#/definitions/app-webhook/definitions/level"
1577 },
1578 "secret": {
1579 "$ref": "#/definitions/app-webhook/definitions/secret"
1580 },
1581 "url": {
1582 "$ref": "#/definitions/app-webhook/definitions/url"
1583 }
1584 },
1585 "strictProperties": false,
1586 "type": [
1587 "object"
1588 ]
1589 },
1590 "targetSchema": {
1591 "$ref": "#/definitions/add-on-webhook/definitions/addon_webhook"
1592 },
1593 "title": "Update"
1594 }
1595 ],
1596 "properties": {
1597 "created_at": {
1598 "$ref": "#/definitions/app-webhook/definitions/created_at"
1599 },
1600 "id": {
1601 "$ref": "#/definitions/app-webhook/definitions/id"
1602 },
1603 "include": {
1604 "$ref": "#/definitions/app-webhook/definitions/include"
1605 },
1606 "level": {
1607 "$ref": "#/definitions/app-webhook/definitions/level"
1608 },
1609 "updated_at": {
1610 "$ref": "#/definitions/app-webhook/definitions/updated_at"
1611 },
1612 "url": {
1613 "$ref": "#/definitions/app-webhook/definitions/url"
1614 }
1615 }
1616 },
1617 "add-on": {
1618 "description": "Add-ons represent add-ons that have been provisioned and attached to one or more apps.",
1619 "$schema": "http://json-schema.org/draft-04/hyper-schema",
1620 "stability": "production",
1621 "strictProperties": true,
1622 "title": "Heroku Platform API - Add-on",
1623 "type": [
1624 "object"
1625 ],
1626 "definitions": {
1627 "actions": {
1628 "description": "provider actions for this specific add-on",
1629 "type": [
1630 "array"
1631 ],
1632 "items": {
1633 "type": [
1634 "object"
1635 ]
1636 },
1637 "readOnly": true,
1638 "properties": {
1639 "id": {
1640 "$ref": "#/definitions/add-on-plan-action/definitions/id"
1641 },
1642 "label": {
1643 "$ref": "#/definitions/add-on-plan-action/definitions/label"
1644 },
1645 "action": {
1646 "$ref": "#/definitions/add-on-plan-action/definitions/action"
1647 },
1648 "url": {
1649 "$ref": "#/definitions/add-on-plan-action/definitions/url"
1650 },
1651 "requires_owner": {
1652 "$ref": "#/definitions/add-on-plan-action/definitions/requires_owner"
1653 }
1654 }
1655 },
1656 "cents": {
1657 "description": "price in cents per unit of add-on",
1658 "example": 0,
1659 "readOnly": true,
1660 "type": [
1661 "integer"
1662 ]
1663 },
1664 "config": {
1665 "additionalProperties": false,
1666 "description": "custom add-on provisioning options",
1667 "example": {
1668 "db-version": "1.2.3"
1669 },
1670 "patternProperties": {
1671 "^\\w+$": {
1672 "type": [
1673 "string"
1674 ]
1675 }
1676 },
1677 "type": [
1678 "object"
1679 ]
1680 },
1681 "config_vars": {
1682 "description": "config vars exposed to the owning app by this add-on",
1683 "example": [
1684 "FOO",
1685 "BAZ"
1686 ],
1687 "items": {
1688 "type": [
1689 "string"
1690 ]
1691 },
1692 "readOnly": true,
1693 "type": [
1694 "array"
1695 ]
1696 },
1697 "confirm": {
1698 "description": "name of billing entity for confirmation",
1699 "example": "example",
1700 "type": [
1701 "string"
1702 ]
1703 },
1704 "created_at": {
1705 "description": "when add-on was created",
1706 "example": "2012-01-01T12:00:00Z",
1707 "format": "date-time",
1708 "readOnly": true,
1709 "type": [
1710 "string"
1711 ]
1712 },
1713 "id": {
1714 "description": "unique identifier of add-on",
1715 "example": "01234567-89ab-cdef-0123-456789abcdef",
1716 "format": "uuid",
1717 "readOnly": true,
1718 "type": [
1719 "string"
1720 ]
1721 },
1722 "identity": {
1723 "anyOf": [
1724 {
1725 "$ref": "#/definitions/add-on/definitions/id"
1726 },
1727 {
1728 "$ref": "#/definitions/add-on/definitions/name"
1729 }
1730 ]
1731 },
1732 "name": {
1733 "description": "globally unique name of the add-on",
1734 "example": "acme-inc-primary-database",
1735 "pattern": "^[a-zA-Z][A-Za-z0-9_-]+$",
1736 "readOnly": true,
1737 "type": [
1738 "string"
1739 ]
1740 },
1741 "provider_id": {
1742 "description": "id of this add-on with its provider",
1743 "example": "abcd1234",
1744 "readOnly": true,
1745 "type": [
1746 "string"
1747 ]
1748 },
1749 "state": {
1750 "description": "state in the add-on's lifecycle",
1751 "enum": [
1752 "provisioning",
1753 "provisioned",
1754 "deprovisioned"
1755 ],
1756 "example": "provisioned",
1757 "readOnly": true,
1758 "type": [
1759 "string"
1760 ]
1761 },
1762 "unit": {
1763 "description": "unit of price for add-on",
1764 "example": "month",
1765 "readOnly": true,
1766 "type": [
1767 "string"
1768 ]
1769 },
1770 "updated_at": {
1771 "description": "when add-on was updated",
1772 "example": "2012-01-01T12:00:00Z",
1773 "format": "date-time",
1774 "readOnly": true,
1775 "type": [
1776 "string"
1777 ]
1778 },
1779 "web_url": {
1780 "description": "URL for logging into web interface of add-on (e.g. a dashboard)",
1781 "example": "https://postgres.heroku.com/databases/01234567-89ab-cdef-0123-456789abcdef",
1782 "format": "uri",
1783 "readOnly": true,
1784 "type": [
1785 "null",
1786 "string"
1787 ]
1788 }
1789 },
1790 "links": [
1791 {
1792 "description": "List all existing add-ons.",
1793 "href": "/addons",
1794 "method": "GET",
1795 "rel": "instances",
1796 "targetSchema": {
1797 "items": {
1798 "$ref": "#/definitions/add-on"
1799 },
1800 "type": [
1801 "array"
1802 ]
1803 },
1804 "title": "List"
1805 },
1806 {
1807 "description": "Info for an existing add-on.",
1808 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}",
1809 "method": "GET",
1810 "rel": "self",
1811 "targetSchema": {
1812 "$ref": "#/definitions/add-on"
1813 },
1814 "title": "Info"
1815 },
1816 {
1817 "description": "Create a new add-on.",
1818 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons",
1819 "method": "POST",
1820 "rel": "create",
1821 "schema": {
1822 "properties": {
1823 "attachment": {
1824 "description": "name for add-on's initial attachment",
1825 "example": {
1826 "name": "DATABASE_FOLLOWER"
1827 },
1828 "properties": {
1829 "name": {
1830 "$ref": "#/definitions/add-on-attachment/definitions/name"
1831 }
1832 },
1833 "type": [
1834 "object"
1835 ]
1836 },
1837 "config": {
1838 "$ref": "#/definitions/add-on/definitions/config"
1839 },
1840 "confirm": {
1841 "$ref": "#/definitions/add-on/definitions/confirm"
1842 },
1843 "plan": {
1844 "$ref": "#/definitions/plan/definitions/identity"
1845 },
1846 "name": {
1847 "$ref": "#/definitions/add-on/definitions/name"
1848 }
1849 },
1850 "required": [
1851 "plan"
1852 ],
1853 "type": [
1854 "object"
1855 ]
1856 },
1857 "targetSchema": {
1858 "$ref": "#/definitions/add-on"
1859 },
1860 "title": "Create"
1861 },
1862 {
1863 "description": "Delete an existing add-on.",
1864 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}",
1865 "method": "DELETE",
1866 "rel": "destroy",
1867 "targetSchema": {
1868 "$ref": "#/definitions/add-on"
1869 },
1870 "title": "Delete"
1871 },
1872 {
1873 "description": "Info for an existing add-on.",
1874 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}",
1875 "method": "GET",
1876 "rel": "self",
1877 "targetSchema": {
1878 "$ref": "#/definitions/add-on"
1879 },
1880 "title": "Info By App"
1881 },
1882 {
1883 "description": "List existing add-ons for an app.",
1884 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons",
1885 "method": "GET",
1886 "rel": "instances",
1887 "targetSchema": {
1888 "items": {
1889 "$ref": "#/definitions/add-on"
1890 },
1891 "type": [
1892 "array"
1893 ]
1894 },
1895 "title": "List By App"
1896 },
1897 {
1898 "description": "Change add-on plan. Some add-ons may not support changing plans. In that case, an error will be returned.",
1899 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}",
1900 "method": "PATCH",
1901 "rel": "update",
1902 "schema": {
1903 "properties": {
1904 "plan": {
1905 "$ref": "#/definitions/plan/definitions/identity"
1906 }
1907 },
1908 "required": [
1909 "plan"
1910 ],
1911 "type": [
1912 "object"
1913 ]
1914 },
1915 "title": "Update"
1916 },
1917 {
1918 "description": "List all existing add-ons a user has access to",
1919 "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/addons",
1920 "method": "GET",
1921 "rel": "instances",
1922 "targetSchema": {
1923 "items": {
1924 "$ref": "#/definitions/add-on"
1925 },
1926 "type": [
1927 "array"
1928 ]
1929 },
1930 "title": "List By User"
1931 },
1932 {
1933 "description": "List add-ons used across all Team apps",
1934 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/addons",
1935 "method": "GET",
1936 "rel": "instances",
1937 "targetSchema": {
1938 "items": {
1939 "$ref": "#/definitions/add-on"
1940 },
1941 "type": [
1942 "array"
1943 ]
1944 },
1945 "title": "List By Team"
1946 },
1947 {
1948 "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.",
1949 "href": "/actions/addons/resolve",
1950 "method": "POST",
1951 "rel": "resolve",
1952 "schema": {
1953 "properties": {
1954 "addon": {
1955 "$ref": "#/definitions/add-on/definitions/name"
1956 },
1957 "app": {
1958 "$ref": "#/definitions/app/definitions/name"
1959 },
1960 "addon_service": {
1961 "$ref": "#/definitions/add-on-service/definitions/name"
1962 }
1963 },
1964 "required": [
1965 "addon"
1966 ],
1967 "type": [
1968 "object"
1969 ]
1970 },
1971 "targetSchema": {
1972 "items": {
1973 "$ref": "#/definitions/add-on"
1974 },
1975 "type": [
1976 "array"
1977 ]
1978 },
1979 "title": "Resolution"
1980 }
1981 ],
1982 "properties": {
1983 "actions": {
1984 "$ref": "#/definitions/add-on/definitions/actions"
1985 },
1986 "addon_service": {
1987 "description": "identity of add-on service",
1988 "properties": {
1989 "id": {
1990 "$ref": "#/definitions/add-on-service/definitions/id"
1991 },
1992 "name": {
1993 "$ref": "#/definitions/add-on-service/definitions/name"
1994 }
1995 },
1996 "strictProperties": true,
1997 "type": [
1998 "object"
1999 ]
2000 },
2001 "billing_entity": {
2002 "description": "billing entity associated with this add-on",
2003 "type": [
2004 "object"
2005 ],
2006 "properties": {
2007 "id": {
2008 "description": "unique identifier of the billing entity",
2009 "example": "01234567-89ab-cdef-0123-456789abcdef",
2010 "format": "uuid",
2011 "readOnly": true,
2012 "type": [
2013 "string"
2014 ]
2015 },
2016 "name": {
2017 "description": "name of the billing entity",
2018 "example": "example",
2019 "readOnly": true,
2020 "type": [
2021 "string"
2022 ]
2023 },
2024 "type": {
2025 "description": "type of Object of the billing entity; new types allowed at any time.",
2026 "enum": [
2027 "app",
2028 "team"
2029 ],
2030 "example": "app",
2031 "readOnly": true,
2032 "type": [
2033 "string"
2034 ]
2035 }
2036 },
2037 "strictProperties": true
2038 },
2039 "app": {
2040 "description": "billing application associated with this add-on",
2041 "type": [
2042 "object"
2043 ],
2044 "properties": {
2045 "id": {
2046 "$ref": "#/definitions/app/definitions/id"
2047 },
2048 "name": {
2049 "$ref": "#/definitions/app/definitions/name"
2050 }
2051 },
2052 "strictProperties": true
2053 },
2054 "billed_price": {
2055 "description": "billed price",
2056 "properties": {
2057 "cents": {
2058 "$ref": "#/definitions/plan/definitions/cents"
2059 },
2060 "contract": {
2061 "$ref": "#/definitions/plan/definitions/contract"
2062 },
2063 "unit": {
2064 "$ref": "#/definitions/plan/definitions/unit"
2065 }
2066 },
2067 "strictProperties": true,
2068 "type": [
2069 "object",
2070 "null"
2071 ]
2072 },
2073 "config_vars": {
2074 "$ref": "#/definitions/add-on/definitions/config_vars"
2075 },
2076 "created_at": {
2077 "$ref": "#/definitions/add-on/definitions/created_at"
2078 },
2079 "id": {
2080 "$ref": "#/definitions/add-on/definitions/id"
2081 },
2082 "name": {
2083 "$ref": "#/definitions/add-on/definitions/name"
2084 },
2085 "plan": {
2086 "description": "identity of add-on plan",
2087 "properties": {
2088 "id": {
2089 "$ref": "#/definitions/plan/definitions/id"
2090 },
2091 "name": {
2092 "$ref": "#/definitions/plan/definitions/name"
2093 }
2094 },
2095 "strictProperties": true,
2096 "type": [
2097 "object"
2098 ]
2099 },
2100 "provider_id": {
2101 "$ref": "#/definitions/add-on/definitions/provider_id"
2102 },
2103 "state": {
2104 "$ref": "#/definitions/add-on/definitions/state"
2105 },
2106 "updated_at": {
2107 "$ref": "#/definitions/add-on/definitions/updated_at"
2108 },
2109 "web_url": {
2110 "$ref": "#/definitions/add-on/definitions/web_url"
2111 }
2112 }
2113 },
2114 "app-feature": {
2115 "description": "An app feature represents a Heroku labs capability that can be enabled or disabled for an app on Heroku.",
2116 "$schema": "http://json-schema.org/draft-04/hyper-schema",
2117 "stability": "production",
2118 "strictProperties": true,
2119 "title": "Heroku Platform API - App Feature",
2120 "type": [
2121 "object"
2122 ],
2123 "definitions": {
2124 "created_at": {
2125 "description": "when app feature was created",
2126 "example": "2012-01-01T12:00:00Z",
2127 "format": "date-time",
2128 "readOnly": true,
2129 "type": [
2130 "string"
2131 ]
2132 },
2133 "description": {
2134 "description": "description of app feature",
2135 "example": "Causes app to example.",
2136 "readOnly": true,
2137 "type": [
2138 "string"
2139 ]
2140 },
2141 "doc_url": {
2142 "description": "documentation URL of app feature",
2143 "example": "http://devcenter.heroku.com/articles/example",
2144 "readOnly": true,
2145 "type": [
2146 "string"
2147 ]
2148 },
2149 "enabled": {
2150 "description": "whether or not app feature has been enabled",
2151 "example": true,
2152 "readOnly": false,
2153 "type": [
2154 "boolean"
2155 ]
2156 },
2157 "id": {
2158 "description": "unique identifier of app feature",
2159 "example": "01234567-89ab-cdef-0123-456789abcdef",
2160 "format": "uuid",
2161 "readOnly": true,
2162 "type": [
2163 "string"
2164 ]
2165 },
2166 "identity": {
2167 "anyOf": [
2168 {
2169 "$ref": "#/definitions/app-feature/definitions/id"
2170 },
2171 {
2172 "$ref": "#/definitions/app-feature/definitions/name"
2173 }
2174 ]
2175 },
2176 "name": {
2177 "description": "unique name of app feature",
2178 "example": "name",
2179 "readOnly": true,
2180 "type": [
2181 "string"
2182 ]
2183 },
2184 "state": {
2185 "description": "state of app feature",
2186 "example": "public",
2187 "readOnly": true,
2188 "type": [
2189 "string"
2190 ]
2191 },
2192 "updated_at": {
2193 "description": "when app feature was updated",
2194 "example": "2012-01-01T12:00:00Z",
2195 "format": "date-time",
2196 "readOnly": true,
2197 "type": [
2198 "string"
2199 ]
2200 },
2201 "display_name": {
2202 "description": "user readable feature name",
2203 "example": "My Feature",
2204 "readOnly": true,
2205 "type": [
2206 "string"
2207 ]
2208 },
2209 "feedback_email": {
2210 "description": "e-mail to send feedback about the feature",
2211 "example": "feedback@heroku.com",
2212 "readOnly": true,
2213 "type": [
2214 "string"
2215 ]
2216 }
2217 },
2218 "links": [
2219 {
2220 "description": "Info for an existing app feature.",
2221 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/features/{(%23%2Fdefinitions%2Fapp-feature%2Fdefinitions%2Fidentity)}",
2222 "method": "GET",
2223 "rel": "self",
2224 "targetSchema": {
2225 "$ref": "#/definitions/app-feature"
2226 },
2227 "title": "Info"
2228 },
2229 {
2230 "description": "List existing app features.",
2231 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/features",
2232 "method": "GET",
2233 "rel": "instances",
2234 "targetSchema": {
2235 "items": {
2236 "$ref": "#/definitions/app-feature"
2237 },
2238 "type": [
2239 "array"
2240 ]
2241 },
2242 "title": "List"
2243 },
2244 {
2245 "description": "Update an existing app feature.",
2246 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/features/{(%23%2Fdefinitions%2Fapp-feature%2Fdefinitions%2Fidentity)}",
2247 "method": "PATCH",
2248 "rel": "update",
2249 "schema": {
2250 "properties": {
2251 "enabled": {
2252 "$ref": "#/definitions/app-feature/definitions/enabled"
2253 }
2254 },
2255 "required": [
2256 "enabled"
2257 ],
2258 "type": [
2259 "object"
2260 ]
2261 },
2262 "targetSchema": {
2263 "$ref": "#/definitions/app-feature"
2264 },
2265 "title": "Update"
2266 }
2267 ],
2268 "properties": {
2269 "created_at": {
2270 "$ref": "#/definitions/app-feature/definitions/created_at"
2271 },
2272 "description": {
2273 "$ref": "#/definitions/app-feature/definitions/description"
2274 },
2275 "doc_url": {
2276 "$ref": "#/definitions/app-feature/definitions/doc_url"
2277 },
2278 "enabled": {
2279 "$ref": "#/definitions/app-feature/definitions/enabled"
2280 },
2281 "id": {
2282 "$ref": "#/definitions/app-feature/definitions/id"
2283 },
2284 "name": {
2285 "$ref": "#/definitions/app-feature/definitions/name"
2286 },
2287 "state": {
2288 "$ref": "#/definitions/app-feature/definitions/state"
2289 },
2290 "updated_at": {
2291 "$ref": "#/definitions/app-feature/definitions/updated_at"
2292 },
2293 "display_name": {
2294 "$ref": "#/definitions/app-feature/definitions/display_name"
2295 },
2296 "feedback_email": {
2297 "$ref": "#/definitions/app-feature/definitions/feedback_email"
2298 }
2299 }
2300 },
2301 "app-formation-set": {
2302 "description": "App formation set describes the combination of process types with their quantities and sizes as well as application process tier",
2303 "$schema": "http://json-schema.org/draft-04/hyper-schema",
2304 "stability": "development",
2305 "strictProperties": true,
2306 "title": "Heroku Platform API - Application Formation Set",
2307 "type": [
2308 "object"
2309 ],
2310 "properties": {
2311 "description": {
2312 "description": "a string representation of the formation set",
2313 "example": "web@2:Standard-2X worker@3:Performance-M",
2314 "readOnly": true,
2315 "type": [
2316 "string"
2317 ]
2318 },
2319 "process_tier": {
2320 "description": "application process tier",
2321 "enum": [
2322 "production",
2323 "free",
2324 "hobby",
2325 "private"
2326 ],
2327 "example": "production",
2328 "readOnly": true,
2329 "type": [
2330 "string"
2331 ]
2332 },
2333 "app": {
2334 "description": "app being described by the formation-set",
2335 "properties": {
2336 "name": {
2337 "$ref": "#/definitions/app/definitions/name"
2338 },
2339 "id": {
2340 "$ref": "#/definitions/app/definitions/id"
2341 }
2342 },
2343 "type": [
2344 "object"
2345 ]
2346 },
2347 "updated_at": {
2348 "description": "last time fomation-set was updated",
2349 "example": "2012-01-01T12:00:00Z",
2350 "format": "date-time",
2351 "readOnly": true,
2352 "type": [
2353 "string"
2354 ]
2355 }
2356 }
2357 },
2358 "app-setup": {
2359 "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.",
2360 "$schema": "http://json-schema.org/draft-04/hyper-schema",
2361 "stability": "production",
2362 "strictProperties": true,
2363 "title": "Heroku Setup API - App Setup",
2364 "type": [
2365 "object"
2366 ],
2367 "definitions": {
2368 "id": {
2369 "description": "unique identifier of app setup",
2370 "example": "01234567-89ab-cdef-0123-456789abcdef",
2371 "readOnly": true,
2372 "type": [
2373 "string"
2374 ],
2375 "format": "uuid"
2376 },
2377 "identity": {
2378 "anyOf": [
2379 {
2380 "$ref": "#/definitions/app-setup/definitions/id"
2381 }
2382 ]
2383 },
2384 "buildpack_override": {
2385 "description": "a buildpack override",
2386 "properties": {
2387 "url": {
2388 "description": "location of the buildpack",
2389 "example": "https://example.com/buildpack.tgz",
2390 "type": [
2391 "string"
2392 ]
2393 }
2394 },
2395 "type": [
2396 "object"
2397 ]
2398 },
2399 "created_at": {
2400 "description": "when app setup was created",
2401 "example": "2012-01-01T12:00:00Z",
2402 "readOnly": true,
2403 "type": [
2404 "string"
2405 ],
2406 "format": "date-time"
2407 },
2408 "updated_at": {
2409 "description": "when app setup was updated",
2410 "example": "2012-01-01T12:00:00Z",
2411 "readOnly": true,
2412 "type": [
2413 "string"
2414 ],
2415 "format": "date-time"
2416 },
2417 "status": {
2418 "description": "the overall status of app setup",
2419 "example": "failed",
2420 "enum": [
2421 "failed",
2422 "pending",
2423 "succeeded"
2424 ],
2425 "readOnly": true,
2426 "type": [
2427 "string"
2428 ]
2429 },
2430 "resolved_success_url": {
2431 "description": "fully qualified success url",
2432 "example": "https://example.herokuapp.com/welcome",
2433 "readOnly": true,
2434 "type": [
2435 "string",
2436 "null"
2437 ]
2438 },
2439 "failure_message": {
2440 "description": "reason that app setup has failed",
2441 "example": "invalid app.json",
2442 "readOnly": true,
2443 "type": [
2444 "string",
2445 "null"
2446 ]
2447 },
2448 "manifest_errors": {
2449 "description": "errors associated with invalid app.json manifest file",
2450 "example": [
2451 "config var FOO is required"
2452 ],
2453 "readOnly": true,
2454 "items": {
2455 "type": [
2456 "string"
2457 ]
2458 },
2459 "type": [
2460 "array"
2461 ]
2462 },
2463 "overrides": {
2464 "description": "overrides of keys in the app.json manifest file",
2465 "example": {
2466 "buildpacks": [
2467 {
2468 "url": "https://example.com/buildpack.tgz"
2469 }
2470 ],
2471 "env": {
2472 "FOO": "bar",
2473 "BAZ": "qux"
2474 }
2475 },
2476 "properties": {
2477 "buildpacks": {
2478 "description": "overrides the buildpacks specified in the app.json manifest file",
2479 "example": [
2480 {
2481 "url": "https://example.com/buildpack.tgz"
2482 }
2483 ],
2484 "items": {
2485 "$ref": "#/definitions/app-setup/definitions/buildpack_override"
2486 },
2487 "type": [
2488 "array"
2489 ]
2490 },
2491 "env": {
2492 "description": "overrides of the env specified in the app.json manifest file",
2493 "example": {
2494 "FOO": "bar",
2495 "BAZ": "qux"
2496 },
2497 "readOnly": true,
2498 "additionalProperties": false,
2499 "patternProperties": {
2500 "^\\w+$": {
2501 "type": [
2502 "string"
2503 ]
2504 }
2505 },
2506 "type": [
2507 "object"
2508 ]
2509 }
2510 },
2511 "type": [
2512 "object"
2513 ]
2514 },
2515 "postdeploy": {
2516 "description": "result of postdeploy script",
2517 "type": [
2518 "object",
2519 "null"
2520 ],
2521 "properties": {
2522 "output": {
2523 "description": "output of the postdeploy script",
2524 "example": "assets precompiled",
2525 "readOnly": true,
2526 "type": [
2527 "string"
2528 ]
2529 },
2530 "exit_code": {
2531 "description": "The exit code of the postdeploy script",
2532 "example": 1,
2533 "readOnly": true,
2534 "type": [
2535 "integer"
2536 ]
2537 }
2538 },
2539 "readOnly": true
2540 }
2541 },
2542 "properties": {
2543 "id": {
2544 "$ref": "#/definitions/app-setup/definitions/id"
2545 },
2546 "created_at": {
2547 "$ref": "#/definitions/app-setup/definitions/created_at"
2548 },
2549 "updated_at": {
2550 "$ref": "#/definitions/app-setup/definitions/updated_at"
2551 },
2552 "status": {
2553 "$ref": "#/definitions/app-setup/definitions/status"
2554 },
2555 "failure_message": {
2556 "$ref": "#/definitions/app-setup/definitions/failure_message"
2557 },
2558 "app": {
2559 "description": "identity of app",
2560 "strictProperties": true,
2561 "type": [
2562 "object"
2563 ],
2564 "properties": {
2565 "id": {
2566 "$ref": "#/definitions/app/definitions/id"
2567 },
2568 "name": {
2569 "$ref": "#/definitions/app/definitions/name"
2570 }
2571 }
2572 },
2573 "build": {
2574 "description": "identity and status of build",
2575 "strictProperties": true,
2576 "type": [
2577 "null",
2578 "object"
2579 ],
2580 "properties": {
2581 "id": {
2582 "$ref": "#/definitions/build/definitions/id"
2583 },
2584 "status": {
2585 "$ref": "#/definitions/build/definitions/status"
2586 },
2587 "output_stream_url": {
2588 "$ref": "#/definitions/build/definitions/output_stream_url"
2589 }
2590 }
2591 },
2592 "manifest_errors": {
2593 "$ref": "#/definitions/app-setup/definitions/manifest_errors"
2594 },
2595 "postdeploy": {
2596 "$ref": "#/definitions/app-setup/definitions/postdeploy"
2597 },
2598 "resolved_success_url": {
2599 "$ref": "#/definitions/app-setup/definitions/resolved_success_url"
2600 }
2601 },
2602 "links": [
2603 {
2604 "description": "Create a new app setup from a gzipped tar archive containing an app.json manifest file.",
2605 "title": "Create",
2606 "rel": "create",
2607 "method": "POST",
2608 "href": "/app-setups",
2609 "schema": {
2610 "required": [
2611 "source_blob"
2612 ],
2613 "type": [
2614 "object"
2615 ],
2616 "properties": {
2617 "app": {
2618 "description": "optional parameters for created app",
2619 "properties": {
2620 "locked": {
2621 "$ref": "#/definitions/organization-app/definitions/locked"
2622 },
2623 "name": {
2624 "$ref": "#/definitions/app/definitions/name"
2625 },
2626 "organization": {
2627 "$ref": "#/definitions/organization/definitions/name"
2628 },
2629 "personal": {
2630 "$ref": "#/definitions/organization-app/definitions/personal"
2631 },
2632 "region": {
2633 "$ref": "#/definitions/region/definitions/name"
2634 },
2635 "space": {
2636 "$ref": "#/definitions/space/definitions/name"
2637 },
2638 "stack": {
2639 "$ref": "#/definitions/stack/definitions/name"
2640 }
2641 },
2642 "type": [
2643 "object"
2644 ]
2645 },
2646 "source_blob": {
2647 "description": "gzipped tarball of source code containing app.json manifest file",
2648 "properties": {
2649 "checksum": {
2650 "description": "an optional checksum of the gzipped tarball for verifying its integrity",
2651 "example": "SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
2652 "readOnly": true,
2653 "type": [
2654 "null",
2655 "string"
2656 ]
2657 },
2658 "url": {
2659 "description": "URL of gzipped tarball of source code containing app.json manifest file",
2660 "example": "https://example.com/source.tgz?token=xyz",
2661 "readOnly": true,
2662 "type": [
2663 "string"
2664 ]
2665 },
2666 "version": {
2667 "description": "Version of the gzipped tarball.",
2668 "example": "v1.3.0",
2669 "readOnly": true,
2670 "type": [
2671 "string",
2672 "null"
2673 ]
2674 }
2675 },
2676 "type": [
2677 "object"
2678 ]
2679 },
2680 "overrides": {
2681 "$ref": "#/definitions/app-setup/definitions/overrides"
2682 }
2683 }
2684 },
2685 "targetSchema": {
2686 "$ref": "#/definitions/app-setup"
2687 }
2688 },
2689 {
2690 "description": "Get the status of an app setup.",
2691 "title": "Info",
2692 "rel": "self",
2693 "method": "GET",
2694 "href": "/app-setups/{(%23%2Fdefinitions%2Fapp-setup%2Fdefinitions%2Fidentity)}",
2695 "targetSchema": {
2696 "$ref": "#/definitions/app-setup"
2697 }
2698 }
2699 ]
2700 },
2701 "app-transfer": {
2702 "description": "An app transfer represents a two party interaction for transferring ownership of an app.",
2703 "$schema": "http://json-schema.org/draft-04/hyper-schema",
2704 "stability": "production",
2705 "strictProperties": true,
2706 "title": "Heroku Platform API - App Transfer",
2707 "type": [
2708 "object"
2709 ],
2710 "definitions": {
2711 "created_at": {
2712 "description": "when app transfer was created",
2713 "example": "2012-01-01T12:00:00Z",
2714 "format": "date-time",
2715 "readOnly": true,
2716 "type": [
2717 "string"
2718 ]
2719 },
2720 "id": {
2721 "description": "unique identifier of app transfer",
2722 "example": "01234567-89ab-cdef-0123-456789abcdef",
2723 "format": "uuid",
2724 "readOnly": true,
2725 "type": [
2726 "string"
2727 ]
2728 },
2729 "identity": {
2730 "anyOf": [
2731 {
2732 "$ref": "#/definitions/app-transfer/definitions/id"
2733 },
2734 {
2735 "$ref": "#/definitions/app/definitions/name"
2736 }
2737 ]
2738 },
2739 "silent": {
2740 "default": false,
2741 "description": "whether to suppress email notification when transferring apps",
2742 "example": false,
2743 "readOnly": true,
2744 "type": [
2745 "boolean"
2746 ]
2747 },
2748 "state": {
2749 "description": "the current state of an app transfer",
2750 "enum": [
2751 "pending",
2752 "accepted",
2753 "declined"
2754 ],
2755 "example": "pending",
2756 "readOnly": true,
2757 "type": [
2758 "string"
2759 ]
2760 },
2761 "updated_at": {
2762 "description": "when app transfer was updated",
2763 "example": "2012-01-01T12:00:00Z",
2764 "format": "date-time",
2765 "readOnly": true,
2766 "type": [
2767 "string"
2768 ]
2769 }
2770 },
2771 "links": [
2772 {
2773 "description": "Create a new app transfer.",
2774 "href": "/account/app-transfers",
2775 "method": "POST",
2776 "rel": "create",
2777 "schema": {
2778 "properties": {
2779 "app": {
2780 "$ref": "#/definitions/app/definitions/identity"
2781 },
2782 "recipient": {
2783 "$ref": "#/definitions/account/definitions/identity"
2784 },
2785 "silent": {
2786 "$ref": "#/definitions/app-transfer/definitions/silent"
2787 }
2788 },
2789 "required": [
2790 "app",
2791 "recipient"
2792 ],
2793 "type": [
2794 "object"
2795 ]
2796 },
2797 "targetSchema": {
2798 "$ref": "#/definitions/app-transfer"
2799 },
2800 "title": "Create"
2801 },
2802 {
2803 "description": "Delete an existing app transfer",
2804 "href": "/account/app-transfers/{(%23%2Fdefinitions%2Fapp-transfer%2Fdefinitions%2Fidentity)}",
2805 "method": "DELETE",
2806 "rel": "destroy",
2807 "targetSchema": {
2808 "$ref": "#/definitions/app-transfer"
2809 },
2810 "title": "Delete"
2811 },
2812 {
2813 "description": "Info for existing app transfer.",
2814 "href": "/account/app-transfers/{(%23%2Fdefinitions%2Fapp-transfer%2Fdefinitions%2Fidentity)}",
2815 "method": "GET",
2816 "rel": "self",
2817 "targetSchema": {
2818 "$ref": "#/definitions/app-transfer"
2819 },
2820 "title": "Info"
2821 },
2822 {
2823 "description": "List existing apps transfers.",
2824 "href": "/account/app-transfers",
2825 "method": "GET",
2826 "rel": "instances",
2827 "targetSchema": {
2828 "items": {
2829 "$ref": "#/definitions/app-transfer"
2830 },
2831 "type": [
2832 "array"
2833 ]
2834 },
2835 "title": "List"
2836 },
2837 {
2838 "description": "Update an existing app transfer.",
2839 "href": "/account/app-transfers/{(%23%2Fdefinitions%2Fapp-transfer%2Fdefinitions%2Fidentity)}",
2840 "method": "PATCH",
2841 "rel": "update",
2842 "schema": {
2843 "properties": {
2844 "state": {
2845 "$ref": "#/definitions/app-transfer/definitions/state"
2846 }
2847 },
2848 "required": [
2849 "state"
2850 ],
2851 "type": [
2852 "object"
2853 ]
2854 },
2855 "targetSchema": {
2856 "$ref": "#/definitions/app-transfer"
2857 },
2858 "title": "Update"
2859 }
2860 ],
2861 "properties": {
2862 "app": {
2863 "description": "app involved in the transfer",
2864 "properties": {
2865 "name": {
2866 "$ref": "#/definitions/app/definitions/name"
2867 },
2868 "id": {
2869 "$ref": "#/definitions/app/definitions/id"
2870 }
2871 },
2872 "type": [
2873 "object"
2874 ]
2875 },
2876 "created_at": {
2877 "$ref": "#/definitions/app-transfer/definitions/created_at"
2878 },
2879 "id": {
2880 "$ref": "#/definitions/app-transfer/definitions/id"
2881 },
2882 "owner": {
2883 "description": "identity of the owner of the transfer",
2884 "properties": {
2885 "email": {
2886 "$ref": "#/definitions/account/definitions/email"
2887 },
2888 "id": {
2889 "$ref": "#/definitions/account/definitions/id"
2890 }
2891 },
2892 "strictProperties": true,
2893 "type": [
2894 "object"
2895 ]
2896 },
2897 "recipient": {
2898 "description": "identity of the recipient of the transfer",
2899 "properties": {
2900 "email": {
2901 "$ref": "#/definitions/account/definitions/email"
2902 },
2903 "id": {
2904 "$ref": "#/definitions/account/definitions/id"
2905 }
2906 },
2907 "strictProperties": true,
2908 "type": [
2909 "object"
2910 ]
2911 },
2912 "state": {
2913 "$ref": "#/definitions/app-transfer/definitions/state"
2914 },
2915 "updated_at": {
2916 "$ref": "#/definitions/app-transfer/definitions/updated_at"
2917 }
2918 }
2919 },
2920 "app-webhook-delivery": {
2921 "$schema": "http://json-schema.org/draft-04/hyper-schema",
2922 "title": "Heroku Platform API - App Webhook Delivery",
2923 "description": "Represents the delivery of a webhook notification, including its current status.",
2924 "stability": "production",
2925 "strictProperties": true,
2926 "type": [
2927 "object"
2928 ],
2929 "definitions": {
2930 "attempt_id": {
2931 "description": "unique identifier of attempt",
2932 "readOnly": true,
2933 "format": "uuid",
2934 "type": [
2935 "string"
2936 ]
2937 },
2938 "attempt_error_class": {
2939 "description": "error class encountered during attempt",
2940 "readOnly": true,
2941 "type": [
2942 "string",
2943 "null"
2944 ]
2945 },
2946 "attempt_code": {
2947 "description": "http response code received during attempt",
2948 "readOnly": true,
2949 "type": [
2950 "integer",
2951 "null"
2952 ]
2953 },
2954 "attempt_created_at": {
2955 "description": "when attempt was created",
2956 "format": "date-time",
2957 "type": [
2958 "string"
2959 ]
2960 },
2961 "attempt_updated_at": {
2962 "description": "when attempt was updated",
2963 "format": "date-time",
2964 "type": [
2965 "string"
2966 ]
2967 },
2968 "attempt_status": {
2969 "description": "status of an attempt",
2970 "enum": [
2971 "scheduled",
2972 "succeeded",
2973 "failed"
2974 ],
2975 "example": "scheduled",
2976 "type": [
2977 "string"
2978 ]
2979 },
2980 "created_at": {
2981 "description": "when the delivery was created",
2982 "format": "date-time",
2983 "type": [
2984 "string"
2985 ]
2986 },
2987 "id": {
2988 "description": "the delivery's unique identifier",
2989 "readOnly": true,
2990 "format": "uuid",
2991 "type": [
2992 "string"
2993 ]
2994 },
2995 "num_attempts": {
2996 "description": "number of times a delivery has been attempted",
2997 "readOnly": true,
2998 "type": [
2999 "integer"
3000 ]
3001 },
3002 "identity": {
3003 "anyOf": [
3004 {
3005 "$ref": "#/definitions/app-webhook-delivery/definitions/id"
3006 }
3007 ]
3008 },
3009 "next_attempt_at": {
3010 "description": "when delivery will be attempted again",
3011 "format": "date-time",
3012 "type": [
3013 "string",
3014 "null"
3015 ]
3016 },
3017 "status": {
3018 "description": "the delivery's status",
3019 "enum": [
3020 "pending",
3021 "scheduled",
3022 "retrying",
3023 "failed",
3024 "succeeded"
3025 ],
3026 "example": "pending",
3027 "type": [
3028 "string"
3029 ]
3030 },
3031 "updated_at": {
3032 "description": "when the delivery was last updated",
3033 "format": "date-time",
3034 "type": [
3035 "string"
3036 ]
3037 }
3038 },
3039 "links": [
3040 {
3041 "description": "Returns the info for an existing delivery.",
3042 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhook-deliveries/{(%23%2Fdefinitions%2Fapp-webhook-delivery%2Fdefinitions%2Fidentity)}",
3043 "method": "GET",
3044 "rel": "self",
3045 "targetSchema": {
3046 "$ref": "#/definitions/app-webhook-delivery"
3047 },
3048 "title": "Info"
3049 },
3050 {
3051 "description": "Lists existing deliveries for an app.",
3052 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhook-deliveries",
3053 "method": "GET",
3054 "rel": "instances",
3055 "targetSchema": {
3056 "items": {
3057 "$ref": "#/definitions/app-webhook-delivery"
3058 },
3059 "type": [
3060 "array"
3061 ]
3062 },
3063 "title": "List"
3064 }
3065 ],
3066 "properties": {
3067 "created_at": {
3068 "$ref": "#/definitions/app-webhook-delivery/definitions/created_at"
3069 },
3070 "event": {
3071 "description": "identity of event",
3072 "properties": {
3073 "id": {
3074 "$ref": "#/definitions/app-webhook-event/definitions/id"
3075 },
3076 "include": {
3077 "$ref": "#/definitions/app-webhook-event/definitions/include"
3078 }
3079 },
3080 "strictProperties": true,
3081 "type": [
3082 "object"
3083 ]
3084 },
3085 "id": {
3086 "$ref": "#/definitions/app-webhook-delivery/definitions/id"
3087 },
3088 "num_attempts": {
3089 "$ref": "#/definitions/app-webhook-delivery/definitions/num_attempts"
3090 },
3091 "next_attempt_at": {
3092 "$ref": "#/definitions/app-webhook-delivery/definitions/next_attempt_at"
3093 },
3094 "last_attempt": {
3095 "description": "last attempt of a delivery",
3096 "properties": {
3097 "id": {
3098 "$ref": "#/definitions/app-webhook-delivery/definitions/attempt_id"
3099 },
3100 "code": {
3101 "$ref": "#/definitions/app-webhook-delivery/definitions/attempt_code"
3102 },
3103 "error_class": {
3104 "$ref": "#/definitions/app-webhook-delivery/definitions/attempt_error_class"
3105 },
3106 "status": {
3107 "$ref": "#/definitions/app-webhook-delivery/definitions/attempt_status"
3108 },
3109 "created_at": {
3110 "$ref": "#/definitions/app-webhook-delivery/definitions/attempt_created_at"
3111 },
3112 "updated_at": {
3113 "$ref": "#/definitions/app-webhook-delivery/definitions/attempt_updated_at"
3114 }
3115 },
3116 "strictProperties": true,
3117 "type": [
3118 "object",
3119 "null"
3120 ]
3121 },
3122 "status": {
3123 "$ref": "#/definitions/app-webhook-delivery/definitions/status"
3124 },
3125 "updated_at": {
3126 "$ref": "#/definitions/app-webhook-delivery/definitions/updated_at"
3127 },
3128 "webhook": {
3129 "description": "identity of webhook",
3130 "properties": {
3131 "id": {
3132 "$ref": "#/definitions/app-webhook/definitions/id"
3133 },
3134 "level": {
3135 "$ref": "#/definitions/app-webhook/definitions/level"
3136 }
3137 },
3138 "strictProperties": true,
3139 "type": [
3140 "object"
3141 ]
3142 }
3143 }
3144 },
3145 "app-webhook-event": {
3146 "$schema": "http://json-schema.org/draft-04/hyper-schema",
3147 "title": "Heroku Platform API - App Webhook Event",
3148 "description": "Represents a webhook event that occurred.",
3149 "stability": "production",
3150 "strictProperties": true,
3151 "type": [
3152 "object"
3153 ],
3154 "definitions": {
3155 "action": {
3156 "description": "the type of event that occurred",
3157 "example": "create",
3158 "type": [
3159 "string"
3160 ]
3161 },
3162 "actor": {
3163 "description": "user that caused event",
3164 "properties": {
3165 "email": {
3166 "$ref": "#/definitions/account/definitions/email"
3167 },
3168 "id": {
3169 "$ref": "#/definitions/account/definitions/id"
3170 }
3171 },
3172 "strictProperties": true,
3173 "type": [
3174 "object"
3175 ]
3176 },
3177 "created_at": {
3178 "description": "when event was created",
3179 "format": "date-time",
3180 "type": [
3181 "string"
3182 ]
3183 },
3184 "data": {
3185 "description": "the current details of the event",
3186 "type": [
3187 "object"
3188 ]
3189 },
3190 "id": {
3191 "description": "the event's unique identifier",
3192 "readOnly": true,
3193 "format": "uuid",
3194 "type": [
3195 "string"
3196 ]
3197 },
3198 "identity": {
3199 "anyOf": [
3200 {
3201 "$ref": "#/definitions/app-webhook-event/definitions/id"
3202 }
3203 ]
3204 },
3205 "include": {
3206 "description": "the type of entity that the event is related to",
3207 "example": "api:release",
3208 "type": [
3209 "string"
3210 ]
3211 },
3212 "payload": {
3213 "description": "payload of event",
3214 "properties": {
3215 "action": {
3216 "$ref": "#/definitions/app-webhook-event/definitions/action"
3217 },
3218 "actor": {
3219 "$ref": "#/definitions/app-webhook-event/definitions/actor"
3220 },
3221 "data": {
3222 "$ref": "#/definitions/app-webhook-event/definitions/data"
3223 },
3224 "previous_data": {
3225 "$ref": "#/definitions/app-webhook-event/definitions/previous_data"
3226 },
3227 "resource": {
3228 "$ref": "#/definitions/app-webhook-event/definitions/resource"
3229 },
3230 "version": {
3231 "$ref": "#/definitions/app-webhook-event/definitions/version"
3232 }
3233 },
3234 "strictProperties": true,
3235 "type": [
3236 "object"
3237 ]
3238 },
3239 "previous_data": {
3240 "description": "previous details of the event (if any)",
3241 "type": [
3242 "object"
3243 ]
3244 },
3245 "resource": {
3246 "description": "the type of resource associated with the event",
3247 "example": "release",
3248 "type": [
3249 "string"
3250 ]
3251 },
3252 "updated_at": {
3253 "description": "when the event was last updated",
3254 "format": "date-time",
3255 "type": [
3256 "string"
3257 ]
3258 },
3259 "version": {
3260 "description": "the version of the details provided for the event",
3261 "example": "1",
3262 "type": [
3263 "string"
3264 ]
3265 }
3266 },
3267 "links": [
3268 {
3269 "description": "Returns the info for a specified webhook event.",
3270 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhook-events/{(%23%2Fdefinitions%2Fapp-webhook-event%2Fdefinitions%2Fidentity)}",
3271 "method": "GET",
3272 "rel": "self",
3273 "targetSchema": {
3274 "$ref": "#/definitions/app-webhook-event"
3275 },
3276 "title": "Info"
3277 },
3278 {
3279 "description": "Lists existing webhook events for an app.",
3280 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhook-events",
3281 "method": "GET",
3282 "rel": "instances",
3283 "targetSchema": {
3284 "items": {
3285 "$ref": "#/definitions/app-webhook-event"
3286 },
3287 "type": [
3288 "array"
3289 ]
3290 },
3291 "title": "List"
3292 }
3293 ],
3294 "properties": {
3295 "created_at": {
3296 "$ref": "#/definitions/app-webhook-event/definitions/created_at"
3297 },
3298 "id": {
3299 "$ref": "#/definitions/app-webhook-event/definitions/id"
3300 },
3301 "include": {
3302 "$ref": "#/definitions/app-webhook-event/definitions/include"
3303 },
3304 "payload": {
3305 "$ref": "#/definitions/app-webhook-event/definitions/payload"
3306 },
3307 "updated_at": {
3308 "$ref": "#/definitions/app-webhook-event/definitions/updated_at"
3309 }
3310 }
3311 },
3312 "app-webhook": {
3313 "$schema": "http://json-schema.org/draft-04/hyper-schema",
3314 "title": "Heroku Platform API - App Webhook",
3315 "description": "Represents the details of a webhook subscription",
3316 "stability": "production",
3317 "strictProperties": false,
3318 "additionalProperties": false,
3319 "required": [
3320 "created_at",
3321 "id",
3322 "include",
3323 "level",
3324 "updated_at",
3325 "url"
3326 ],
3327 "type": [
3328 "object"
3329 ],
3330 "definitions": {
3331 "authorization": {
3332 "description": "a custom `Authorization` header that Heroku will include with all webhook notifications",
3333 "example": "Bearer 9266671b2767f804c9d5809c2d384ed57d8f8ce1abd1043e1fb3fbbcb8c3",
3334 "type": [
3335 "null",
3336 "string"
3337 ]
3338 },
3339 "created_at": {
3340 "description": "when the webhook was created",
3341 "format": "date-time",
3342 "type": [
3343 "string"
3344 ]
3345 },
3346 "id": {
3347 "description": "the webhook's unique identifier",
3348 "readOnly": true,
3349 "format": "uuid",
3350 "type": [
3351 "string"
3352 ]
3353 },
3354 "include": {
3355 "description": "the entities that the subscription provides notifications for",
3356 "items": {
3357 "example": "api:release",
3358 "type": [
3359 "string"
3360 ]
3361 },
3362 "type": [
3363 "array"
3364 ]
3365 },
3366 "level": {
3367 "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",
3368 "enum": [
3369 "notify",
3370 "sync"
3371 ],
3372 "example": "notify",
3373 "type": [
3374 "string"
3375 ]
3376 },
3377 "identity": {
3378 "anyOf": [
3379 {
3380 "$ref": "#/definitions/app-webhook/definitions/id"
3381 }
3382 ]
3383 },
3384 "secret": {
3385 "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)",
3386 "example": "dcbff0c4430a2960a2552389d587bc58d30a37a8cf3f75f8fb77abe667ad",
3387 "type": [
3388 "null",
3389 "string"
3390 ]
3391 },
3392 "updated_at": {
3393 "description": "when the webhook was updated",
3394 "format": "date-time",
3395 "type": [
3396 "string"
3397 ]
3398 },
3399 "url": {
3400 "description": "the URL where the webhook's notification requests are sent",
3401 "format": "uri",
3402 "type": [
3403 "string"
3404 ]
3405 },
3406 "app_webhook": {
3407 "properties": {
3408 "app": {
3409 "description": "identity of app. Only used for customer webhooks.",
3410 "properties": {
3411 "id": {
3412 "$ref": "#/definitions/app/definitions/id"
3413 },
3414 "name": {
3415 "$ref": "#/definitions/app/definitions/name"
3416 }
3417 },
3418 "strictProperties": true,
3419 "type": [
3420 "object"
3421 ]
3422 },
3423 "created_at": {
3424 "$ref": "#/definitions/app-webhook/definitions/created_at"
3425 },
3426 "id": {
3427 "$ref": "#/definitions/app-webhook/definitions/id"
3428 },
3429 "include": {
3430 "$ref": "#/definitions/app-webhook/definitions/include"
3431 },
3432 "level": {
3433 "$ref": "#/definitions/app-webhook/definitions/level"
3434 },
3435 "updated_at": {
3436 "$ref": "#/definitions/app-webhook/definitions/updated_at"
3437 },
3438 "url": {
3439 "$ref": "#/definitions/app-webhook/definitions/url"
3440 }
3441 },
3442 "description": "app webhook",
3443 "type": [
3444 "object"
3445 ]
3446 }
3447 },
3448 "links": [
3449 {
3450 "description": "Create an app webhook subscription.",
3451 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhooks",
3452 "method": "POST",
3453 "rel": "create",
3454 "schema": {
3455 "properties": {
3456 "authorization": {
3457 "$ref": "#/definitions/app-webhook/definitions/authorization"
3458 },
3459 "include": {
3460 "$ref": "#/definitions/app-webhook/definitions/include"
3461 },
3462 "level": {
3463 "$ref": "#/definitions/app-webhook/definitions/level"
3464 },
3465 "secret": {
3466 "$ref": "#/definitions/app-webhook/definitions/secret"
3467 },
3468 "url": {
3469 "$ref": "#/definitions/app-webhook/definitions/url"
3470 }
3471 },
3472 "additionalProperties": false,
3473 "required": [
3474 "include",
3475 "level",
3476 "url"
3477 ],
3478 "type": [
3479 "object"
3480 ]
3481 },
3482 "targetSchema": {
3483 "$ref": "#/definitions/app-webhook/definitions/app_webhook"
3484 },
3485 "title": "Create"
3486 },
3487 {
3488 "description": "Removes an app webhook subscription.",
3489 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhooks/{(%23%2Fdefinitions%2Fapp-webhook%2Fdefinitions%2Fidentity)}",
3490 "method": "DELETE",
3491 "rel": "destroy",
3492 "targetSchema": {
3493 "$ref": "#/definitions/app-webhook/definitions/app_webhook"
3494 },
3495 "title": "Delete"
3496 },
3497 {
3498 "description": "Returns the info for an app webhook subscription.",
3499 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhooks/{(%23%2Fdefinitions%2Fapp-webhook%2Fdefinitions%2Fidentity)}",
3500 "method": "GET",
3501 "rel": "self",
3502 "targetSchema": {
3503 "$ref": "#/definitions/app-webhook/definitions/app_webhook"
3504 },
3505 "title": "Info"
3506 },
3507 {
3508 "description": "List all webhook subscriptions for a particular app.",
3509 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhooks",
3510 "method": "GET",
3511 "rel": "instances",
3512 "targetSchema": {
3513 "items": {
3514 "$ref": "#/definitions/app-webhook/definitions/app_webhook"
3515 },
3516 "type": [
3517 "array"
3518 ]
3519 },
3520 "title": "List"
3521 },
3522 {
3523 "description": "Updates the details of an app webhook subscription.",
3524 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/webhooks/{(%23%2Fdefinitions%2Fapp-webhook%2Fdefinitions%2Fidentity)}",
3525 "method": "PATCH",
3526 "rel": "update",
3527 "schema": {
3528 "properties": {
3529 "authorization": {
3530 "$ref": "#/definitions/app-webhook/definitions/authorization"
3531 },
3532 "include": {
3533 "$ref": "#/definitions/app-webhook/definitions/include"
3534 },
3535 "level": {
3536 "$ref": "#/definitions/app-webhook/definitions/level"
3537 },
3538 "secret": {
3539 "$ref": "#/definitions/app-webhook/definitions/secret"
3540 },
3541 "url": {
3542 "$ref": "#/definitions/app-webhook/definitions/url"
3543 }
3544 },
3545 "strictProperties": false,
3546 "type": [
3547 "object"
3548 ]
3549 },
3550 "targetSchema": {
3551 "$ref": "#/definitions/app-webhook/definitions/app_webhook"
3552 },
3553 "title": "Update"
3554 }
3555 ]
3556 },
3557 "app": {
3558 "description": "An app represents the program that you would like to deploy and run on Heroku.",
3559 "$schema": "http://json-schema.org/draft-04/hyper-schema",
3560 "stability": "production",
3561 "strictProperties": true,
3562 "title": "Heroku Platform API - App",
3563 "type": [
3564 "object"
3565 ],
3566 "definitions": {
3567 "archived_at": {
3568 "description": "when app was archived",
3569 "example": "2012-01-01T12:00:00Z",
3570 "format": "date-time",
3571 "readOnly": true,
3572 "type": [
3573 "null",
3574 "string"
3575 ]
3576 },
3577 "buildpack_provided_description": {
3578 "description": "description from buildpack of app",
3579 "example": "Ruby/Rack",
3580 "readOnly": true,
3581 "type": [
3582 "null",
3583 "string"
3584 ]
3585 },
3586 "created_at": {
3587 "description": "when app was created",
3588 "example": "2012-01-01T12:00:00Z",
3589 "format": "date-time",
3590 "readOnly": true,
3591 "type": [
3592 "string"
3593 ]
3594 },
3595 "git_url": {
3596 "description": "git repo URL of app",
3597 "example": "https://git.heroku.com/example.git",
3598 "pattern": "^https://git\\.heroku\\.com/[a-z][a-z0-9-]{2,29}\\.git$",
3599 "readOnly": true,
3600 "type": [
3601 "string"
3602 ]
3603 },
3604 "id": {
3605 "description": "unique identifier of app",
3606 "example": "01234567-89ab-cdef-0123-456789abcdef",
3607 "format": "uuid",
3608 "readOnly": true,
3609 "type": [
3610 "string"
3611 ]
3612 },
3613 "identity": {
3614 "anyOf": [
3615 {
3616 "$ref": "#/definitions/app/definitions/id"
3617 },
3618 {
3619 "$ref": "#/definitions/app/definitions/name"
3620 }
3621 ]
3622 },
3623 "maintenance": {
3624 "default": false,
3625 "description": "maintenance status of app",
3626 "example": false,
3627 "readOnly": false,
3628 "type": [
3629 "boolean"
3630 ]
3631 },
3632 "name": {
3633 "description": "unique name of app",
3634 "example": "example",
3635 "pattern": "^[a-z][a-z0-9-]{1,28}[a-z0-9]$",
3636 "readOnly": false,
3637 "type": [
3638 "string"
3639 ]
3640 },
3641 "released_at": {
3642 "default": null,
3643 "description": "when app was released",
3644 "example": "2012-01-01T12:00:00Z",
3645 "format": "date-time",
3646 "readOnly": true,
3647 "type": [
3648 "null",
3649 "string"
3650 ]
3651 },
3652 "repo_size": {
3653 "default": null,
3654 "description": "git repo size in bytes of app",
3655 "example": 0,
3656 "readOnly": true,
3657 "type": [
3658 "integer",
3659 "null"
3660 ]
3661 },
3662 "slug_size": {
3663 "default": null,
3664 "description": "slug size in bytes of app",
3665 "example": 0,
3666 "readOnly": true,
3667 "type": [
3668 "integer",
3669 "null"
3670 ]
3671 },
3672 "updated_at": {
3673 "description": "when app was updated",
3674 "example": "2012-01-01T12:00:00Z",
3675 "format": "date-time",
3676 "readOnly": true,
3677 "type": [
3678 "string"
3679 ]
3680 },
3681 "web_url": {
3682 "description": "web URL of app",
3683 "example": "https://example.herokuapp.com/",
3684 "format": "uri",
3685 "pattern": "^https?://[a-z][a-z0-9-]{3,30}\\.herokuapp\\.com/$",
3686 "readOnly": true,
3687 "type": [
3688 "string"
3689 ]
3690 },
3691 "acm": {
3692 "description": "ACM status of this app",
3693 "default": false,
3694 "example": false,
3695 "readOnly": true,
3696 "type": [
3697 "boolean"
3698 ]
3699 }
3700 },
3701 "links": [
3702 {
3703 "description": "Create a new app.",
3704 "href": "/apps",
3705 "method": "POST",
3706 "rel": "create",
3707 "schema": {
3708 "properties": {
3709 "name": {
3710 "$ref": "#/definitions/app/definitions/name"
3711 },
3712 "region": {
3713 "$ref": "#/definitions/region/definitions/identity"
3714 },
3715 "stack": {
3716 "$ref": "#/definitions/stack/definitions/identity"
3717 }
3718 },
3719 "type": [
3720 "object"
3721 ]
3722 },
3723 "targetSchema": {
3724 "$ref": "#/definitions/app"
3725 },
3726 "title": "Create"
3727 },
3728 {
3729 "description": "Delete an existing app.",
3730 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}",
3731 "method": "DELETE",
3732 "rel": "destroy",
3733 "targetSchema": {
3734 "$ref": "#/definitions/app"
3735 },
3736 "title": "Delete"
3737 },
3738 {
3739 "description": "Info for existing app.",
3740 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}",
3741 "method": "GET",
3742 "rel": "self",
3743 "targetSchema": {
3744 "$ref": "#/definitions/app"
3745 },
3746 "title": "Info"
3747 },
3748 {
3749 "description": "List existing apps.",
3750 "href": "/apps",
3751 "method": "GET",
3752 "ranges": [
3753 "id",
3754 "name",
3755 "updated_at"
3756 ],
3757 "rel": "instances",
3758 "targetSchema": {
3759 "items": {
3760 "$ref": "#/definitions/app"
3761 },
3762 "type": [
3763 "array"
3764 ]
3765 },
3766 "title": "List"
3767 },
3768 {
3769 "description": "List owned and collaborated apps (excludes team apps).",
3770 "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/apps",
3771 "method": "GET",
3772 "ranges": [
3773 "id",
3774 "name",
3775 "updated_at"
3776 ],
3777 "rel": "instances",
3778 "targetSchema": {
3779 "items": {
3780 "$ref": "#/definitions/app"
3781 },
3782 "type": [
3783 "array"
3784 ]
3785 },
3786 "title": "List Owned and Collaborated"
3787 },
3788 {
3789 "description": "Update an existing app.",
3790 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}",
3791 "method": "PATCH",
3792 "rel": "update",
3793 "schema": {
3794 "properties": {
3795 "build_stack": {
3796 "$ref": "#/definitions/stack/definitions/identity"
3797 },
3798 "maintenance": {
3799 "$ref": "#/definitions/app/definitions/maintenance"
3800 },
3801 "name": {
3802 "$ref": "#/definitions/app/definitions/name"
3803 }
3804 },
3805 "type": [
3806 "object"
3807 ]
3808 },
3809 "targetSchema": {
3810 "$ref": "#/definitions/app"
3811 },
3812 "title": "Update"
3813 },
3814 {
3815 "description": "Enable ACM flag for an app",
3816 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/acm",
3817 "method": "POST",
3818 "rel": "update",
3819 "targetSchema": {
3820 "$ref": "#/definitions/app"
3821 },
3822 "title": "Enable ACM"
3823 },
3824 {
3825 "description": "Disable ACM flag for an app",
3826 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/acm",
3827 "method": "DELETE",
3828 "rel": "delete",
3829 "targetSchema": {
3830 "$ref": "#/definitions/app"
3831 },
3832 "title": "Disable ACM"
3833 },
3834 {
3835 "description": "Refresh ACM for an app",
3836 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/acm",
3837 "method": "PATCH",
3838 "rel": "update",
3839 "targetSchema": {
3840 "$ref": "#/definitions/app"
3841 },
3842 "title": "Refresh ACM"
3843 }
3844 ],
3845 "properties": {
3846 "acm": {
3847 "$ref": "#/definitions/app/definitions/acm"
3848 },
3849 "archived_at": {
3850 "$ref": "#/definitions/app/definitions/archived_at"
3851 },
3852 "buildpack_provided_description": {
3853 "$ref": "#/definitions/app/definitions/buildpack_provided_description"
3854 },
3855 "build_stack": {
3856 "description": "identity of the stack that will be used for new builds",
3857 "properties": {
3858 "id": {
3859 "$ref": "#/definitions/stack/definitions/id"
3860 },
3861 "name": {
3862 "$ref": "#/definitions/stack/definitions/name"
3863 }
3864 },
3865 "strictProperties": true,
3866 "type": [
3867 "object"
3868 ]
3869 },
3870 "created_at": {
3871 "$ref": "#/definitions/app/definitions/created_at"
3872 },
3873 "git_url": {
3874 "$ref": "#/definitions/app/definitions/git_url"
3875 },
3876 "id": {
3877 "$ref": "#/definitions/app/definitions/id"
3878 },
3879 "internal_routing": {
3880 "$ref": "#/definitions/team-app/definitions/internal_routing"
3881 },
3882 "maintenance": {
3883 "$ref": "#/definitions/app/definitions/maintenance"
3884 },
3885 "name": {
3886 "$ref": "#/definitions/app/definitions/name"
3887 },
3888 "owner": {
3889 "description": "identity of app owner",
3890 "properties": {
3891 "email": {
3892 "$ref": "#/definitions/account/definitions/email"
3893 },
3894 "id": {
3895 "$ref": "#/definitions/account/definitions/id"
3896 }
3897 },
3898 "strictProperties": true,
3899 "type": [
3900 "object"
3901 ]
3902 },
3903 "organization": {
3904 "description": "identity of organization",
3905 "properties": {
3906 "id": {
3907 "$ref": "#/definitions/organization/definitions/id"
3908 },
3909 "name": {
3910 "$ref": "#/definitions/organization/definitions/name"
3911 }
3912 },
3913 "type": [
3914 "null",
3915 "object"
3916 ]
3917 },
3918 "team": {
3919 "description": "identity of team",
3920 "properties": {
3921 "id": {
3922 "$ref": "#/definitions/team/definitions/id"
3923 },
3924 "name": {
3925 "$ref": "#/definitions/team/definitions/name"
3926 }
3927 },
3928 "type": [
3929 "null",
3930 "object"
3931 ]
3932 },
3933 "region": {
3934 "description": "identity of app region",
3935 "properties": {
3936 "id": {
3937 "$ref": "#/definitions/region/definitions/id"
3938 },
3939 "name": {
3940 "$ref": "#/definitions/region/definitions/name"
3941 }
3942 },
3943 "strictProperties": true,
3944 "type": [
3945 "object"
3946 ]
3947 },
3948 "released_at": {
3949 "$ref": "#/definitions/app/definitions/released_at"
3950 },
3951 "repo_size": {
3952 "$ref": "#/definitions/app/definitions/repo_size"
3953 },
3954 "slug_size": {
3955 "$ref": "#/definitions/app/definitions/slug_size"
3956 },
3957 "space": {
3958 "description": "identity of space",
3959 "properties": {
3960 "id": {
3961 "$ref": "#/definitions/space/definitions/id"
3962 },
3963 "name": {
3964 "$ref": "#/definitions/space/definitions/name"
3965 },
3966 "shield": {
3967 "$ref": "#/definitions/space/definitions/shield"
3968 }
3969 },
3970 "type": [
3971 "null",
3972 "object"
3973 ]
3974 },
3975 "stack": {
3976 "description": "identity of app stack",
3977 "properties": {
3978 "id": {
3979 "$ref": "#/definitions/stack/definitions/id"
3980 },
3981 "name": {
3982 "$ref": "#/definitions/stack/definitions/name"
3983 }
3984 },
3985 "strictProperties": true,
3986 "type": [
3987 "object"
3988 ]
3989 },
3990 "updated_at": {
3991 "$ref": "#/definitions/app/definitions/updated_at"
3992 },
3993 "web_url": {
3994 "$ref": "#/definitions/app/definitions/web_url"
3995 }
3996 }
3997 },
3998 "build-result": {
3999 "$schema": "http://json-schema.org/draft-04/hyper-schema",
4000 "deactivate_on": "2016-10-01",
4001 "description": "A build result contains the output from a build.",
4002 "title": "Heroku Build API - Build Result",
4003 "stability": "deprecation",
4004 "strictProperties": true,
4005 "type": [
4006 "object"
4007 ],
4008 "definitions": {
4009 "identity": {
4010 },
4011 "exit_code": {
4012 "description": "status from the build",
4013 "example": 0,
4014 "readOnly": true,
4015 "type": [
4016 "number"
4017 ]
4018 },
4019 "line": {
4020 "description": "a single line of output to STDOUT or STDERR from the build.",
4021 "strictProperties": true,
4022 "type": [
4023 "object"
4024 ],
4025 "example": {
4026 "stream": "STDOUT",
4027 "line": "-----> Ruby app detected\n"
4028 },
4029 "readOnly": true,
4030 "definitions": {
4031 "stream": {
4032 "type": [
4033 "string"
4034 ],
4035 "enum": [
4036 "STDOUT",
4037 "STDERR"
4038 ],
4039 "description": "The output stream where the line was sent.",
4040 "example": "STDOUT",
4041 "readOnly": true
4042 },
4043 "line": {
4044 "type": [
4045 "string"
4046 ],
4047 "example": "-----> Ruby app detected\n",
4048 "readOnly": true,
4049 "description": "A line of output from the build."
4050 }
4051 },
4052 "properties": {
4053 "stream": {
4054 "$ref": "#/definitions/build-result/definitions/line/definitions/stream"
4055 },
4056 "line": {
4057 "$ref": "#/definitions/build-result/definitions/line/definitions/line"
4058 }
4059 }
4060 }
4061 },
4062 "links": [
4063 {
4064 "description": "Info for existing result.",
4065 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/builds/{(%23%2Fdefinitions%2Fbuild%2Fdefinitions%2Fidentity)}/result",
4066 "method": "GET",
4067 "rel": "self",
4068 "targetSchema": {
4069 "$ref": "#/definitions/build-result"
4070 },
4071 "title": "Info"
4072 }
4073 ],
4074 "properties": {
4075 "build": {
4076 "description": "identity of build",
4077 "properties": {
4078 "id": {
4079 "$ref": "#/definitions/build/definitions/id"
4080 },
4081 "status": {
4082 "$ref": "#/definitions/build/definitions/status"
4083 },
4084 "output_stream_url": {
4085 "$ref": "#/definitions/build/definitions/output_stream_url"
4086 }
4087 },
4088 "type": [
4089 "object"
4090 ]
4091 },
4092 "exit_code": {
4093 "$ref": "#/definitions/build-result/definitions/exit_code"
4094 },
4095 "lines": {
4096 "type": [
4097 "array"
4098 ],
4099 "items": {
4100 "$ref": "#/definitions/build-result/definitions/line"
4101 },
4102 "description": "A list of all the lines of a build's output. This has been replaced by the `output_stream_url` attribute on the build resource.",
4103 "example": [
4104 {
4105 "line": "-----> Ruby app detected\n",
4106 "stream": "STDOUT"
4107 }
4108 ]
4109 }
4110 }
4111 },
4112 "build": {
4113 "$schema": "http://json-schema.org/draft-04/hyper-schema",
4114 "description": "A build represents the process of transforming a code tarball into a slug",
4115 "title": "Heroku Build API - Build",
4116 "stability": "production",
4117 "strictProperties": true,
4118 "type": [
4119 "object"
4120 ],
4121 "definitions": {
4122 "buildpacks": {
4123 "description": "buildpacks executed for this build, in order",
4124 "type": [
4125 "array",
4126 "null"
4127 ],
4128 "items": {
4129 "description": "Buildpack to execute in a build",
4130 "type": [
4131 "object"
4132 ],
4133 "properties": {
4134 "url": {
4135 "description": "the URL of the buildpack for the app",
4136 "example": "https://github.com/heroku/heroku-buildpack-ruby",
4137 "readOnly": false,
4138 "type": [
4139 "string"
4140 ]
4141 },
4142 "name": {
4143 "description": "Buildpack Registry name of the buildpack for the app",
4144 "example": "heroku/ruby",
4145 "readOnly": false,
4146 "type": [
4147 "string"
4148 ]
4149 }
4150 }
4151 }
4152 },
4153 "created_at": {
4154 "description": "when build was created",
4155 "example": "2012-01-01T12:00:00Z",
4156 "format": "date-time",
4157 "readOnly": true,
4158 "type": [
4159 "string"
4160 ]
4161 },
4162 "id": {
4163 "description": "unique identifier of build",
4164 "example": "01234567-89ab-cdef-0123-456789abcdef",
4165 "format": "uuid",
4166 "readOnly": true,
4167 "type": [
4168 "string"
4169 ]
4170 },
4171 "identity": {
4172 "anyOf": [
4173 {
4174 "$ref": "#/definitions/build/definitions/id"
4175 }
4176 ]
4177 },
4178 "output_stream_url": {
4179 "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`).",
4180 "example": "https://build-output.heroku.com/streams/01234567-89ab-cdef-0123-456789abcdef",
4181 "readOnly": true,
4182 "type": [
4183 "string"
4184 ]
4185 },
4186 "release": {
4187 "description": "release resulting from the build",
4188 "strictProperties": true,
4189 "properties": {
4190 "id": {
4191 "$ref": "#/definitions/release/definitions/id"
4192 }
4193 },
4194 "example": {
4195 "id": "01234567-89ab-cdef-0123-456789abcdef"
4196 },
4197 "readOnly": true,
4198 "type": [
4199 "null",
4200 "object"
4201 ],
4202 "definitions": {
4203 "id": {
4204 "description": "unique identifier of release",
4205 "example": "01234567-89ab-cdef-0123-456789abcdef",
4206 "type": [
4207 "string"
4208 ]
4209 }
4210 }
4211 },
4212 "source_blob": {
4213 "description": "location of gzipped tarball of source code used to create build",
4214 "properties": {
4215 "checksum": {
4216 "description": "an optional checksum of the gzipped tarball for verifying its integrity",
4217 "example": "SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
4218 "readOnly": true,
4219 "type": [
4220 "null",
4221 "string"
4222 ]
4223 },
4224 "url": {
4225 "description": "URL where gzipped tar archive of source code for build was downloaded.",
4226 "example": "https://example.com/source.tgz?token=xyz",
4227 "readOnly": true,
4228 "type": [
4229 "string"
4230 ]
4231 },
4232 "version": {
4233 "description": "Version of the gzipped tarball.",
4234 "example": "v1.3.0",
4235 "readOnly": true,
4236 "type": [
4237 "string",
4238 "null"
4239 ]
4240 }
4241 },
4242 "strictProperties": true,
4243 "type": [
4244 "object"
4245 ]
4246 },
4247 "stack": {
4248 "description": "stack of build",
4249 "example": "heroku-16",
4250 "readOnly": true,
4251 "type": [
4252 "string"
4253 ]
4254 },
4255 "status": {
4256 "description": "status of build",
4257 "enum": [
4258 "failed",
4259 "pending",
4260 "succeeded"
4261 ],
4262 "example": "succeeded",
4263 "readOnly": true,
4264 "type": [
4265 "string"
4266 ]
4267 },
4268 "updated_at": {
4269 "description": "when build was updated",
4270 "example": "2012-01-01T12:00:00Z",
4271 "format": "date-time",
4272 "readOnly": true,
4273 "type": [
4274 "string"
4275 ]
4276 }
4277 },
4278 "links": [
4279 {
4280 "description": "Create a new build.",
4281 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/builds",
4282 "method": "POST",
4283 "rel": "create",
4284 "schema": {
4285 "type": [
4286 "object"
4287 ],
4288 "properties": {
4289 "buildpacks": {
4290 "$ref": "#/definitions/build/definitions/buildpacks"
4291 },
4292 "source_blob": {
4293 "$ref": "#/definitions/build/definitions/source_blob"
4294 }
4295 },
4296 "required": [
4297 "source_blob"
4298 ]
4299 },
4300 "targetSchema": {
4301 "$ref": "#/definitions/build"
4302 },
4303 "title": "Create"
4304 },
4305 {
4306 "description": "Info for existing build.",
4307 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/builds/{(%23%2Fdefinitions%2Fbuild%2Fdefinitions%2Fidentity)}",
4308 "method": "GET",
4309 "rel": "self",
4310 "targetSchema": {
4311 "$ref": "#/definitions/build"
4312 },
4313 "title": "Info"
4314 },
4315 {
4316 "description": "List existing build.",
4317 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/builds",
4318 "method": "GET",
4319 "ranges": [
4320 "id",
4321 "started_at"
4322 ],
4323 "rel": "instances",
4324 "targetSchema": {
4325 "items": {
4326 "$ref": "#/definitions/build"
4327 },
4328 "type": [
4329 "array"
4330 ]
4331 },
4332 "title": "List"
4333 },
4334 {
4335 "description": "Destroy a build cache.",
4336 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/build-cache",
4337 "method": "DELETE",
4338 "rel": "empty",
4339 "title": "Delete cache"
4340 }
4341 ],
4342 "properties": {
4343 "app": {
4344 "description": "app that the build belongs to",
4345 "properties": {
4346 "id": {
4347 "$ref": "#/definitions/app/definitions/id"
4348 }
4349 },
4350 "strictProperties": true,
4351 "type": [
4352 "object"
4353 ]
4354 },
4355 "buildpacks": {
4356 "$ref": "#/definitions/build/definitions/buildpacks"
4357 },
4358 "created_at": {
4359 "$ref": "#/definitions/build/definitions/created_at"
4360 },
4361 "id": {
4362 "$ref": "#/definitions/build/definitions/id"
4363 },
4364 "output_stream_url": {
4365 "$ref": "#/definitions/build/definitions/output_stream_url"
4366 },
4367 "source_blob": {
4368 "$ref": "#/definitions/build/definitions/source_blob"
4369 },
4370 "release": {
4371 "$ref": "#/definitions/build/definitions/release"
4372 },
4373 "slug": {
4374 "description": "slug created by this build",
4375 "properties": {
4376 "id": {
4377 "$ref": "#/definitions/slug/definitions/id"
4378 }
4379 },
4380 "strictProperties": true,
4381 "type": [
4382 "object",
4383 "null"
4384 ]
4385 },
4386 "stack": {
4387 "$ref": "#/definitions/build/definitions/stack"
4388 },
4389 "status": {
4390 "$ref": "#/definitions/build/definitions/status"
4391 },
4392 "updated_at": {
4393 "$ref": "#/definitions/build/definitions/updated_at"
4394 },
4395 "user": {
4396 "description": "user that started the build",
4397 "properties": {
4398 "id": {
4399 "$ref": "#/definitions/account/definitions/id"
4400 },
4401 "email": {
4402 "$ref": "#/definitions/account/definitions/email"
4403 }
4404 },
4405 "strictProperties": true,
4406 "type": [
4407 "object"
4408 ]
4409 }
4410 }
4411 },
4412 "buildpack-installation": {
4413 "description": "A buildpack installation represents a buildpack that will be run against an app.",
4414 "$schema": "http://json-schema.org/draft-04/hyper-schema",
4415 "stability": "production",
4416 "strictProperties": true,
4417 "title": "Heroku Platform API - Buildpack Installations",
4418 "type": [
4419 "object"
4420 ],
4421 "definitions": {
4422 "ordinal": {
4423 "description": "determines the order in which the buildpacks will execute",
4424 "example": 0,
4425 "readOnly": true,
4426 "type": [
4427 "integer"
4428 ]
4429 },
4430 "update": {
4431 "additionalProperties": false,
4432 "description": "Properties to update a buildpack installation",
4433 "properties": {
4434 "buildpack": {
4435 "$ref": "#/definitions/buildpack-installation/definitions/url"
4436 }
4437 },
4438 "readOnly": false,
4439 "required": [
4440 "buildpack"
4441 ],
4442 "type": [
4443 "object"
4444 ]
4445 },
4446 "url": {
4447 "description": "location of the buildpack for the app. Either a url (unofficial buildpacks) or an internal urn (heroku official buildpacks).",
4448 "example": "https://github.com/heroku/heroku-buildpack-ruby",
4449 "readOnly": false,
4450 "type": [
4451 "string"
4452 ]
4453 },
4454 "name": {
4455 "description": "either the Buildpack Registry name or a URL of the buildpack for the app",
4456 "example": "heroku/ruby",
4457 "readOnly": false,
4458 "type": [
4459 "string"
4460 ]
4461 }
4462 },
4463 "links": [
4464 {
4465 "description": "Update an app's buildpack installations.",
4466 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/buildpack-installations",
4467 "method": "PUT",
4468 "rel": "update",
4469 "schema": {
4470 "properties": {
4471 "updates": {
4472 "description": "The buildpack attribute can accept a name, a url, or a urn.",
4473 "items": {
4474 "$ref": "#/definitions/buildpack-installation/definitions/update"
4475 },
4476 "type": [
4477 "array"
4478 ]
4479 }
4480 },
4481 "required": [
4482 "updates"
4483 ],
4484 "type": [
4485 "object"
4486 ]
4487 },
4488 "targetSchema": {
4489 "items": {
4490 "$ref": "#/definitions/buildpack-installation"
4491 },
4492 "type": [
4493 "array"
4494 ]
4495 },
4496 "title": "Update"
4497 },
4498 {
4499 "description": "List an app's existing buildpack installations.",
4500 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/buildpack-installations",
4501 "method": "GET",
4502 "rel": "instances",
4503 "targetSchema": {
4504 "items": {
4505 "$ref": "#/definitions/buildpack-installation"
4506 },
4507 "type": [
4508 "array"
4509 ]
4510 },
4511 "title": "List"
4512 }
4513 ],
4514 "properties": {
4515 "ordinal": {
4516 "$ref": "#/definitions/buildpack-installation/definitions/ordinal"
4517 },
4518 "buildpack": {
4519 "description": "buildpack",
4520 "properties": {
4521 "url": {
4522 "$ref": "#/definitions/buildpack-installation/definitions/url"
4523 },
4524 "name": {
4525 "$ref": "#/definitions/buildpack-installation/definitions/name"
4526 }
4527 },
4528 "type": [
4529 "object"
4530 ]
4531 }
4532 }
4533 },
4534 "collaborator": {
4535 "description": "A collaborator represents an account that has been given access to an app on Heroku.",
4536 "$schema": "http://json-schema.org/draft-04/hyper-schema",
4537 "additionalProperties": false,
4538 "required": [
4539 "app",
4540 "created_at",
4541 "id",
4542 "updated_at",
4543 "user"
4544 ],
4545 "stability": "production",
4546 "title": "Heroku Platform API - Collaborator",
4547 "type": [
4548 "object"
4549 ],
4550 "definitions": {
4551 "created_at": {
4552 "description": "when collaborator was created",
4553 "example": "2012-01-01T12:00:00Z",
4554 "format": "date-time",
4555 "readOnly": true,
4556 "type": [
4557 "string"
4558 ]
4559 },
4560 "email": {
4561 "description": "invited email address of collaborator",
4562 "example": "collaborator@example.com",
4563 "format": "email",
4564 "readOnly": false,
4565 "type": [
4566 "string"
4567 ]
4568 },
4569 "id": {
4570 "description": "unique identifier of collaborator",
4571 "example": "01234567-89ab-cdef-0123-456789abcdef",
4572 "format": "uuid",
4573 "readOnly": true,
4574 "type": [
4575 "string"
4576 ]
4577 },
4578 "identity": {
4579 "anyOf": [
4580 {
4581 "$ref": "#/definitions/collaborator/definitions/email"
4582 },
4583 {
4584 "$ref": "#/definitions/collaborator/definitions/id"
4585 }
4586 ]
4587 },
4588 "silent": {
4589 "default": false,
4590 "description": "whether to suppress email invitation when creating collaborator",
4591 "example": false,
4592 "readOnly": false,
4593 "type": [
4594 "boolean"
4595 ]
4596 },
4597 "updated_at": {
4598 "description": "when collaborator was updated",
4599 "example": "2012-01-01T12:00:00Z",
4600 "format": "date-time",
4601 "readOnly": true,
4602 "type": [
4603 "string"
4604 ]
4605 }
4606 },
4607 "links": [
4608 {
4609 "description": "Create a new collaborator.",
4610 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators",
4611 "method": "POST",
4612 "rel": "create",
4613 "schema": {
4614 "properties": {
4615 "silent": {
4616 "$ref": "#/definitions/collaborator/definitions/silent"
4617 },
4618 "user": {
4619 "$ref": "#/definitions/account/definitions/identity"
4620 }
4621 },
4622 "required": [
4623 "user"
4624 ],
4625 "type": [
4626 "object"
4627 ]
4628 },
4629 "targetSchema": {
4630 "$ref": "#/definitions/collaborator"
4631 },
4632 "title": "Create"
4633 },
4634 {
4635 "description": "Delete an existing collaborator.",
4636 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Fcollaborator%2Fdefinitions%2Fidentity)}",
4637 "method": "DELETE",
4638 "rel": "destroy",
4639 "targetSchema": {
4640 "$ref": "#/definitions/collaborator"
4641 },
4642 "title": "Delete"
4643 },
4644 {
4645 "description": "Info for existing collaborator.",
4646 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Fcollaborator%2Fdefinitions%2Fidentity)}",
4647 "method": "GET",
4648 "rel": "self",
4649 "targetSchema": {
4650 "$ref": "#/definitions/collaborator"
4651 },
4652 "title": "Info"
4653 },
4654 {
4655 "description": "List existing collaborators.",
4656 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators",
4657 "method": "GET",
4658 "rel": "instances",
4659 "targetSchema": {
4660 "items": {
4661 "$ref": "#/definitions/collaborator"
4662 },
4663 "type": [
4664 "array"
4665 ]
4666 },
4667 "title": "List"
4668 }
4669 ],
4670 "properties": {
4671 "app": {
4672 "description": "app collaborator belongs to",
4673 "properties": {
4674 "name": {
4675 "$ref": "#/definitions/app/definitions/name"
4676 },
4677 "id": {
4678 "$ref": "#/definitions/app/definitions/id"
4679 }
4680 },
4681 "strictProperties": true,
4682 "type": [
4683 "object"
4684 ]
4685 },
4686 "created_at": {
4687 "$ref": "#/definitions/collaborator/definitions/created_at"
4688 },
4689 "id": {
4690 "$ref": "#/definitions/collaborator/definitions/id"
4691 },
4692 "permissions": {
4693 "type": [
4694 "array"
4695 ],
4696 "items": {
4697 "$ref": "#/definitions/team-app-permission"
4698 }
4699 },
4700 "role": {
4701 "$ref": "#/definitions/team/definitions/role"
4702 },
4703 "updated_at": {
4704 "$ref": "#/definitions/collaborator/definitions/updated_at"
4705 },
4706 "user": {
4707 "description": "identity of collaborated account",
4708 "properties": {
4709 "email": {
4710 "$ref": "#/definitions/account/definitions/email"
4711 },
4712 "federated": {
4713 "$ref": "#/definitions/account/definitions/federated"
4714 },
4715 "id": {
4716 "$ref": "#/definitions/account/definitions/id"
4717 }
4718 },
4719 "strictProperties": true,
4720 "type": [
4721 "object"
4722 ]
4723 }
4724 }
4725 },
4726 "config-var": {
4727 "description": "Config Vars allow you to manage the configuration information provided to an app on Heroku.",
4728 "$schema": "http://json-schema.org/draft-04/hyper-schema",
4729 "stability": "production",
4730 "strictProperties": true,
4731 "title": "Heroku Platform API - Config Vars",
4732 "type": [
4733 "object"
4734 ],
4735 "definitions": {
4736 "config_vars": {
4737 "additionalProperties": false,
4738 "description": "hash of config vars",
4739 "example": {
4740 "FOO": "bar",
4741 "BAZ": "qux"
4742 },
4743 "patternProperties": {
4744 "^\\w+$": {
4745 "type": [
4746 "string",
4747 "null"
4748 ]
4749 }
4750 },
4751 "type": [
4752 "object"
4753 ]
4754 }
4755 },
4756 "links": [
4757 {
4758 "description": "Get config-vars for app.",
4759 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/config-vars",
4760 "method": "GET",
4761 "rel": "self",
4762 "targetSchema": {
4763 "$ref": "#/definitions/config-var/definitions/config_vars"
4764 },
4765 "title": "Info for App"
4766 },
4767 {
4768 "description": "Get config-vars for a release.",
4769 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases/{(%23%2Fdefinitions%2Frelease%2Fdefinitions%2Fidentity)}/config-vars",
4770 "method": "GET",
4771 "rel": "self",
4772 "targetSchema": {
4773 "$ref": "#/definitions/config-var/definitions/config_vars"
4774 },
4775 "title": "Info for App Release"
4776 },
4777 {
4778 "description": "Update config-vars for app. You can update existing config-vars by setting them again, and remove by setting it to `null`.",
4779 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/config-vars",
4780 "method": "PATCH",
4781 "rel": "update",
4782 "schema": {
4783 "additionalProperties": false,
4784 "description": "hash of config changes – update values or delete by seting it to `null`",
4785 "example": {
4786 "FOO": "bar",
4787 "BAZ": "qux"
4788 },
4789 "patternProperties": {
4790 "^\\w+$": {
4791 "type": [
4792 "string",
4793 "null"
4794 ]
4795 }
4796 },
4797 "type": [
4798 "object"
4799 ]
4800 },
4801 "targetSchema": {
4802 "$ref": "#/definitions/config-var/definitions/config_vars"
4803 },
4804 "title": "Update"
4805 }
4806 ],
4807 "example": {
4808 "FOO": "bar",
4809 "BAZ": "qux"
4810 },
4811 "patternProperties": {
4812 "^\\w+$": {
4813 "type": [
4814 "string"
4815 ]
4816 }
4817 }
4818 },
4819 "credit": {
4820 "$schema": "http://json-schema.org/draft-04/hyper-schema",
4821 "description": "A credit represents value that will be used up before further charges are assigned to an account.",
4822 "stability": "development",
4823 "strictProperties": true,
4824 "title": "Heroku Platform API - Credit",
4825 "type": [
4826 "object"
4827 ],
4828 "definitions": {
4829 "amount": {
4830 "description": "total value of credit in cents",
4831 "example": 10000,
4832 "type": [
4833 "number"
4834 ]
4835 },
4836 "balance": {
4837 "description": "remaining value of credit in cents",
4838 "example": 5000,
4839 "type": [
4840 "number"
4841 ]
4842 },
4843 "created_at": {
4844 "description": "when credit was created",
4845 "example": "2012-01-01T12:00:00Z",
4846 "format": "date-time",
4847 "type": [
4848 "string"
4849 ]
4850 },
4851 "expires_at": {
4852 "description": "when credit will expire",
4853 "example": "2012-01-01T12:00:00Z",
4854 "format": "date-time",
4855 "type": [
4856 "string"
4857 ]
4858 },
4859 "id": {
4860 "description": "unique identifier of credit",
4861 "example": "01234567-89ab-cdef-0123-456789abcdef",
4862 "format": "uuid",
4863 "type": [
4864 "string"
4865 ]
4866 },
4867 "identity": {
4868 "anyOf": [
4869 {
4870 "$ref": "#/definitions/credit/definitions/id"
4871 }
4872 ]
4873 },
4874 "title": {
4875 "description": "a name for credit",
4876 "example": "gift card",
4877 "type": [
4878 "string"
4879 ]
4880 },
4881 "updated_at": {
4882 "description": "when credit was updated",
4883 "example": "2012-01-01T12:00:00Z",
4884 "format": "date-time",
4885 "type": [
4886 "string"
4887 ]
4888 }
4889 },
4890 "links": [
4891 {
4892 "description": "Create a new credit.",
4893 "href": "/account/credits",
4894 "method": "POST",
4895 "rel": "create",
4896 "schema": {
4897 "properties": {
4898 "code1": {
4899 "description": "first code from a discount card",
4900 "example": "012abc",
4901 "type": [
4902 "string"
4903 ]
4904 },
4905 "code2": {
4906 "description": "second code from a discount card",
4907 "example": "012abc",
4908 "type": [
4909 "string"
4910 ]
4911 }
4912 },
4913 "type": [
4914 "object"
4915 ]
4916 },
4917 "targetSchema": {
4918 "$ref": "#/definitions/credit"
4919 },
4920 "title": "Create"
4921 },
4922 {
4923 "description": "Info for existing credit.",
4924 "href": "/account/credits/{(%23%2Fdefinitions%2Fcredit%2Fdefinitions%2Fidentity)}",
4925 "method": "GET",
4926 "rel": "self",
4927 "targetSchema": {
4928 "$ref": "#/definitions/credit"
4929 },
4930 "title": "Info"
4931 },
4932 {
4933 "description": "List existing credits.",
4934 "href": "/account/credits",
4935 "method": "GET",
4936 "rel": "instances",
4937 "targetSchema": {
4938 "items": {
4939 "$ref": "#/definitions/credit"
4940 },
4941 "type": [
4942 "array"
4943 ]
4944 },
4945 "title": "List"
4946 }
4947 ],
4948 "properties": {
4949 "amount": {
4950 "$ref": "#/definitions/credit/definitions/amount"
4951 },
4952 "balance": {
4953 "$ref": "#/definitions/credit/definitions/balance"
4954 },
4955 "created_at": {
4956 "$ref": "#/definitions/credit/definitions/created_at"
4957 },
4958 "expires_at": {
4959 "$ref": "#/definitions/credit/definitions/expires_at"
4960 },
4961 "id": {
4962 "$ref": "#/definitions/credit/definitions/id"
4963 },
4964 "title": {
4965 "$ref": "#/definitions/credit/definitions/title"
4966 },
4967 "updated_at": {
4968 "$ref": "#/definitions/credit/definitions/updated_at"
4969 }
4970 }
4971 },
4972 "domain": {
4973 "description": "Domains define what web routes should be routed to an app on Heroku.",
4974 "$schema": "http://json-schema.org/draft-04/hyper-schema",
4975 "stability": "production",
4976 "strictProperties": true,
4977 "title": "Heroku Platform API - Domain",
4978 "type": [
4979 "object"
4980 ],
4981 "definitions": {
4982 "acm_status": {
4983 "description": "status of this record's ACM",
4984 "example": "pending",
4985 "readOnly": true,
4986 "type": [
4987 "null",
4988 "string"
4989 ]
4990 },
4991 "acm_status_reason": {
4992 "description": "reason for the status of this record's ACM",
4993 "example": "Failing CCA check",
4994 "readOnly": true,
4995 "type": [
4996 "null",
4997 "string"
4998 ]
4999 },
5000 "created_at": {
5001 "description": "when domain was created",
5002 "example": "2012-01-01T12:00:00Z",
5003 "format": "date-time",
5004 "readOnly": true,
5005 "type": [
5006 "string"
5007 ]
5008 },
5009 "cname": {
5010 "description": "canonical name record, the address to point a domain at",
5011 "example": "example.herokudns.com",
5012 "readOnly": true,
5013 "type": [
5014 "null",
5015 "string"
5016 ]
5017 },
5018 "status": {
5019 "description": "status of this record's cname",
5020 "example": "pending",
5021 "readOnly": true,
5022 "type": [
5023 "string"
5024 ]
5025 },
5026 "hostname": {
5027 "description": "full hostname",
5028 "example": "subdomain.example.com",
5029 "format": "uri",
5030 "readOnly": true,
5031 "type": [
5032 "string"
5033 ]
5034 },
5035 "id": {
5036 "description": "unique identifier of this domain",
5037 "example": "01234567-89ab-cdef-0123-456789abcdef",
5038 "format": "uuid",
5039 "readOnly": true,
5040 "type": [
5041 "string"
5042 ]
5043 },
5044 "identity": {
5045 "anyOf": [
5046 {
5047 "$ref": "#/definitions/domain/definitions/id"
5048 },
5049 {
5050 "$ref": "#/definitions/domain/definitions/hostname"
5051 }
5052 ]
5053 },
5054 "kind": {
5055 "description": "type of domain name",
5056 "enum": [
5057 "heroku",
5058 "custom"
5059 ],
5060 "example": "custom",
5061 "readOnly": true,
5062 "type": [
5063 "string"
5064 ]
5065 },
5066 "updated_at": {
5067 "description": "when domain was updated",
5068 "example": "2012-01-01T12:00:00Z",
5069 "format": "date-time",
5070 "readOnly": true,
5071 "type": [
5072 "string"
5073 ]
5074 }
5075 },
5076 "links": [
5077 {
5078 "description": "Create a new domain.",
5079 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains",
5080 "method": "POST",
5081 "rel": "create",
5082 "schema": {
5083 "properties": {
5084 "hostname": {
5085 "$ref": "#/definitions/domain/definitions/hostname"
5086 }
5087 },
5088 "required": [
5089 "hostname"
5090 ],
5091 "type": [
5092 "object"
5093 ]
5094 },
5095 "targetSchema": {
5096 "$ref": "#/definitions/domain"
5097 },
5098 "title": "Create"
5099 },
5100 {
5101 "description": "Delete an existing domain",
5102 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains/{(%23%2Fdefinitions%2Fdomain%2Fdefinitions%2Fidentity)}",
5103 "method": "DELETE",
5104 "rel": "destroy",
5105 "targetSchema": {
5106 "$ref": "#/definitions/domain"
5107 },
5108 "title": "Delete"
5109 },
5110 {
5111 "description": "Info for existing domain.",
5112 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains/{(%23%2Fdefinitions%2Fdomain%2Fdefinitions%2Fidentity)}",
5113 "method": "GET",
5114 "rel": "self",
5115 "targetSchema": {
5116 "$ref": "#/definitions/domain"
5117 },
5118 "title": "Info"
5119 },
5120 {
5121 "description": "List existing domains.",
5122 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains",
5123 "method": "GET",
5124 "rel": "instances",
5125 "targetSchema": {
5126 "items": {
5127 "$ref": "#/definitions/domain"
5128 },
5129 "type": [
5130 "array"
5131 ]
5132 },
5133 "title": "List"
5134 }
5135 ],
5136 "properties": {
5137 "acm_status": {
5138 "$ref": "#/definitions/domain/definitions/acm_status"
5139 },
5140 "acm_status_reason": {
5141 "$ref": "#/definitions/domain/definitions/acm_status_reason"
5142 },
5143 "app": {
5144 "description": "app that owns the domain",
5145 "properties": {
5146 "name": {
5147 "$ref": "#/definitions/app/definitions/name"
5148 },
5149 "id": {
5150 "$ref": "#/definitions/app/definitions/id"
5151 }
5152 },
5153 "type": [
5154 "object"
5155 ]
5156 },
5157 "cname": {
5158 "$ref": "#/definitions/domain/definitions/cname"
5159 },
5160 "created_at": {
5161 "$ref": "#/definitions/domain/definitions/created_at"
5162 },
5163 "hostname": {
5164 "$ref": "#/definitions/domain/definitions/hostname"
5165 },
5166 "id": {
5167 "$ref": "#/definitions/domain/definitions/id"
5168 },
5169 "kind": {
5170 "$ref": "#/definitions/domain/definitions/kind"
5171 },
5172 "updated_at": {
5173 "$ref": "#/definitions/domain/definitions/updated_at"
5174 },
5175 "status": {
5176 "$ref": "#/definitions/domain/definitions/status"
5177 }
5178 }
5179 },
5180 "dyno-size": {
5181 "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).",
5182 "$schema": "http://json-schema.org/draft-04/hyper-schema",
5183 "stability": "prototype",
5184 "strictProperties": true,
5185 "title": "Heroku Platform API - Dyno Size",
5186 "type": [
5187 "object"
5188 ],
5189 "definitions": {
5190 "compute": {
5191 "description": "minimum vCPUs, non-dedicated may get more depending on load",
5192 "example": 1,
5193 "readOnly": true,
5194 "type": [
5195 "integer"
5196 ]
5197 },
5198 "dedicated": {
5199 "description": "whether this dyno will be dedicated to one user",
5200 "example": false,
5201 "readOnly": true,
5202 "type": [
5203 "boolean"
5204 ]
5205 },
5206 "id": {
5207 "description": "unique identifier of this dyno size",
5208 "example": "01234567-89ab-cdef-0123-456789abcdef",
5209 "format": "uuid",
5210 "readOnly": true,
5211 "type": [
5212 "string"
5213 ]
5214 },
5215 "identity": {
5216 "anyOf": [
5217 {
5218 "$ref": "#/definitions/dyno-size/definitions/id"
5219 },
5220 {
5221 "$ref": "#/definitions/dyno-size/definitions/name"
5222 }
5223 ]
5224 },
5225 "memory": {
5226 "description": "amount of RAM in GB",
5227 "example": 0.5,
5228 "readOnly": true,
5229 "type": [
5230 "number"
5231 ]
5232 },
5233 "name": {
5234 "description": "the name of this dyno-size",
5235 "example": "free",
5236 "readOnly": true,
5237 "type": [
5238 "string"
5239 ]
5240 },
5241 "cost": {
5242 "description": "price information for this dyno size",
5243 "readOnly": true,
5244 "type": [
5245 "null",
5246 "object"
5247 ],
5248 "definitions": {
5249 "cents": {
5250 "description": "price in cents per unit time",
5251 "example": 0,
5252 "readOnly": true,
5253 "type": [
5254 "integer"
5255 ]
5256 },
5257 "unit": {
5258 "description": "unit of price for dyno",
5259 "readOnly": true,
5260 "example": "month",
5261 "type": [
5262 "string"
5263 ]
5264 }
5265 }
5266 },
5267 "dyno_units": {
5268 "description": "unit of consumption for Heroku Enterprise customers",
5269 "example": 0,
5270 "readOnly": true,
5271 "type": [
5272 "integer"
5273 ]
5274 },
5275 "private_space_only": {
5276 "description": "whether this dyno can only be provisioned in a private space",
5277 "example": false,
5278 "readOnly": true,
5279 "type": [
5280 "boolean"
5281 ]
5282 }
5283 },
5284 "links": [
5285 {
5286 "description": "Info for existing dyno size.",
5287 "href": "/dyno-sizes/{(%23%2Fdefinitions%2Fdyno-size%2Fdefinitions%2Fidentity)}",
5288 "method": "GET",
5289 "rel": "self",
5290 "targetSchema": {
5291 "$ref": "#/definitions/dyno-size"
5292 },
5293 "title": "Info"
5294 },
5295 {
5296 "description": "List existing dyno sizes.",
5297 "href": "/dyno-sizes",
5298 "method": "GET",
5299 "rel": "instances",
5300 "targetSchema": {
5301 "items": {
5302 "$ref": "#/definitions/dyno-size"
5303 },
5304 "type": [
5305 "array"
5306 ]
5307 },
5308 "title": "List"
5309 }
5310 ],
5311 "properties": {
5312 "compute": {
5313 "$ref": "#/definitions/dyno-size/definitions/compute"
5314 },
5315 "cost": {
5316 "$ref": "#/definitions/dyno-size/definitions/cost"
5317 },
5318 "dedicated": {
5319 "$ref": "#/definitions/dyno-size/definitions/dedicated"
5320 },
5321 "dyno_units": {
5322 "$ref": "#/definitions/dyno-size/definitions/dyno_units"
5323 },
5324 "id": {
5325 "$ref": "#/definitions/dyno-size/definitions/id"
5326 },
5327 "memory": {
5328 "$ref": "#/definitions/dyno-size/definitions/memory"
5329 },
5330 "name": {
5331 "$ref": "#/definitions/dyno-size/definitions/name"
5332 },
5333 "private_space_only": {
5334 "$ref": "#/definitions/dyno-size/definitions/private_space_only"
5335 }
5336 }
5337 },
5338 "dyno": {
5339 "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).",
5340 "$schema": "http://json-schema.org/draft-04/hyper-schema",
5341 "stability": "production",
5342 "strictProperties": true,
5343 "title": "Heroku Platform API - Dyno",
5344 "type": [
5345 "object"
5346 ],
5347 "definitions": {
5348 "attach": {
5349 "description": "whether to stream output or not",
5350 "example": true,
5351 "readOnly": false,
5352 "type": [
5353 "boolean"
5354 ]
5355 },
5356 "attach_url": {
5357 "description": "a URL to stream output from for attached processes or null for non-attached processes",
5358 "example": "rendezvous://rendezvous.runtime.heroku.com:5000/{rendezvous-id}",
5359 "readOnly": true,
5360 "type": [
5361 "string",
5362 "null"
5363 ]
5364 },
5365 "command": {
5366 "description": "command used to start this process",
5367 "example": "bash",
5368 "readOnly": false,
5369 "type": [
5370 "string"
5371 ]
5372 },
5373 "created_at": {
5374 "description": "when dyno was created",
5375 "example": "2012-01-01T12:00:00Z",
5376 "format": "date-time",
5377 "readOnly": true,
5378 "type": [
5379 "string"
5380 ]
5381 },
5382 "env": {
5383 "additionalProperties": false,
5384 "description": "custom environment to add to the dyno config vars",
5385 "example": {
5386 "COLUMNS": "80",
5387 "LINES": "24"
5388 },
5389 "patternProperties": {
5390 "^\\w+$": {
5391 "type": [
5392 "string"
5393 ]
5394 }
5395 },
5396 "readOnly": false,
5397 "strictProperties": true,
5398 "type": [
5399 "object"
5400 ]
5401 },
5402 "id": {
5403 "description": "unique identifier of this dyno",
5404 "example": "01234567-89ab-cdef-0123-456789abcdef",
5405 "format": "uuid",
5406 "readOnly": true,
5407 "type": [
5408 "string"
5409 ]
5410 },
5411 "identity": {
5412 "anyOf": [
5413 {
5414 "$ref": "#/definitions/dyno/definitions/id"
5415 },
5416 {
5417 "$ref": "#/definitions/dyno/definitions/name"
5418 }
5419 ]
5420 },
5421 "name": {
5422 "description": "the name of this process on this dyno",
5423 "example": "run.1",
5424 "readOnly": true,
5425 "type": [
5426 "string"
5427 ]
5428 },
5429 "force_no_tty": {
5430 "description": "force an attached one-off dyno to not run in a tty",
5431 "example": null,
5432 "readOnly": false,
5433 "type": [
5434 "boolean",
5435 "null"
5436 ]
5437 },
5438 "size": {
5439 "description": "dyno size (default: \"standard-1X\")",
5440 "example": "standard-1X",
5441 "readOnly": false,
5442 "type": [
5443 "string"
5444 ]
5445 },
5446 "state": {
5447 "description": "current status of process (either: crashed, down, idle, starting, or up)",
5448 "example": "up",
5449 "readOnly": true,
5450 "type": [
5451 "string"
5452 ]
5453 },
5454 "type": {
5455 "description": "type of process",
5456 "example": "run",
5457 "readOnly": false,
5458 "type": [
5459 "string"
5460 ]
5461 },
5462 "time_to_live": {
5463 "description": "seconds until dyno expires, after which it will soon be killed",
5464 "example": 1800,
5465 "readOnly": false,
5466 "type": [
5467 "integer"
5468 ]
5469 },
5470 "updated_at": {
5471 "description": "when process last changed state",
5472 "example": "2012-01-01T12:00:00Z",
5473 "format": "date-time",
5474 "readOnly": true,
5475 "type": [
5476 "string"
5477 ]
5478 }
5479 },
5480 "links": [
5481 {
5482 "description": "Create a new dyno.",
5483 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos",
5484 "method": "POST",
5485 "rel": "create",
5486 "schema": {
5487 "properties": {
5488 "attach": {
5489 "$ref": "#/definitions/dyno/definitions/attach"
5490 },
5491 "command": {
5492 "$ref": "#/definitions/dyno/definitions/command"
5493 },
5494 "env": {
5495 "$ref": "#/definitions/dyno/definitions/env"
5496 },
5497 "force_no_tty": {
5498 "$ref": "#/definitions/dyno/definitions/force_no_tty"
5499 },
5500 "size": {
5501 "$ref": "#/definitions/dyno/definitions/size"
5502 },
5503 "type": {
5504 "$ref": "#/definitions/dyno/definitions/type"
5505 },
5506 "time_to_live": {
5507 "$ref": "#/definitions/dyno/definitions/time_to_live"
5508 }
5509 },
5510 "required": [
5511 "command"
5512 ],
5513 "type": [
5514 "object"
5515 ]
5516 },
5517 "targetSchema": {
5518 "$ref": "#/definitions/dyno"
5519 },
5520 "title": "Create"
5521 },
5522 {
5523 "description": "Restart dyno.",
5524 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos/{(%23%2Fdefinitions%2Fdyno%2Fdefinitions%2Fidentity)}",
5525 "method": "DELETE",
5526 "rel": "empty",
5527 "targetSchema": {
5528 "additionalProperties": false,
5529 "type": [
5530 "object"
5531 ]
5532 },
5533 "title": "Restart"
5534 },
5535 {
5536 "description": "Restart all dynos.",
5537 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos",
5538 "method": "DELETE",
5539 "rel": "empty",
5540 "targetSchema": {
5541 "additionalProperties": false,
5542 "type": [
5543 "object"
5544 ]
5545 },
5546 "title": "Restart all"
5547 },
5548 {
5549 "description": "Stop dyno.",
5550 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos/{(%23%2Fdefinitions%2Fdyno%2Fdefinitions%2Fidentity)}/actions/stop",
5551 "method": "POST",
5552 "rel": "empty",
5553 "targetSchema": {
5554 "additionalProperties": false,
5555 "type": [
5556 "object"
5557 ]
5558 },
5559 "title": "Stop"
5560 },
5561 {
5562 "description": "Info for existing dyno.",
5563 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos/{(%23%2Fdefinitions%2Fdyno%2Fdefinitions%2Fidentity)}",
5564 "method": "GET",
5565 "rel": "self",
5566 "targetSchema": {
5567 "$ref": "#/definitions/dyno"
5568 },
5569 "title": "Info"
5570 },
5571 {
5572 "description": "List existing dynos.",
5573 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos",
5574 "method": "GET",
5575 "rel": "instances",
5576 "targetSchema": {
5577 "items": {
5578 "$ref": "#/definitions/dyno"
5579 },
5580 "type": [
5581 "array"
5582 ]
5583 },
5584 "title": "List"
5585 }
5586 ],
5587 "properties": {
5588 "attach_url": {
5589 "$ref": "#/definitions/dyno/definitions/attach_url"
5590 },
5591 "command": {
5592 "$ref": "#/definitions/dyno/definitions/command"
5593 },
5594 "created_at": {
5595 "$ref": "#/definitions/dyno/definitions/created_at"
5596 },
5597 "id": {
5598 "$ref": "#/definitions/dyno/definitions/id"
5599 },
5600 "name": {
5601 "$ref": "#/definitions/dyno/definitions/name"
5602 },
5603 "release": {
5604 "description": "app release of the dyno",
5605 "properties": {
5606 "id": {
5607 "$ref": "#/definitions/release/definitions/id"
5608 },
5609 "version": {
5610 "$ref": "#/definitions/release/definitions/version"
5611 }
5612 },
5613 "strictProperties": true,
5614 "type": [
5615 "object"
5616 ]
5617 },
5618 "app": {
5619 "description": "app formation belongs to",
5620 "properties": {
5621 "name": {
5622 "$ref": "#/definitions/app/definitions/name"
5623 },
5624 "id": {
5625 "$ref": "#/definitions/app/definitions/id"
5626 }
5627 },
5628 "type": [
5629 "object"
5630 ]
5631 },
5632 "size": {
5633 "$ref": "#/definitions/dyno/definitions/size"
5634 },
5635 "state": {
5636 "$ref": "#/definitions/dyno/definitions/state"
5637 },
5638 "type": {
5639 "$ref": "#/definitions/dyno/definitions/type"
5640 },
5641 "updated_at": {
5642 "$ref": "#/definitions/dyno/definitions/updated_at"
5643 }
5644 }
5645 },
5646 "filter-apps": {
5647 "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.",
5648 "$schema": "http://json-schema.org/draft-04/hyper-schema",
5649 "stability": "development",
5650 "title": "Heroku Platform API - Filters",
5651 "type": [
5652 "object"
5653 ],
5654 "definitions": {
5655 "filter": {
5656 "type": [
5657 "object"
5658 ],
5659 "properties": {
5660 "in": {
5661 "$ref": "#/definitions/filter-apps/definitions/in"
5662 }
5663 }
5664 },
5665 "in": {
5666 "type": [
5667 "object"
5668 ],
5669 "properties": {
5670 "id": {
5671 "$ref": "#/definitions/filter-apps/definitions/id"
5672 }
5673 }
5674 },
5675 "id": {
5676 "type": [
5677 "array"
5678 ],
5679 "items": {
5680 "$ref": "#/definitions/app/definitions/id"
5681 }
5682 }
5683 },
5684 "links": [
5685 {
5686 "description": "Request an apps list filtered by app id.",
5687 "title": "Apps",
5688 "href": "/filters/apps",
5689 "method": "POST",
5690 "ranges": [
5691 "id",
5692 "name",
5693 "updated_at"
5694 ],
5695 "rel": "instances",
5696 "schema": {
5697 "$ref": "#/definitions/filter-apps/definitions/filter"
5698 },
5699 "targetSchema": {
5700 "items": {
5701 "$ref": "#/definitions/team-app"
5702 },
5703 "type": [
5704 "array"
5705 ]
5706 }
5707 }
5708 ]
5709 },
5710 "formation": {
5711 "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.",
5712 "$schema": "http://json-schema.org/draft-04/hyper-schema",
5713 "stability": "production",
5714 "strictProperties": true,
5715 "title": "Heroku Platform API - Formation",
5716 "type": [
5717 "object"
5718 ],
5719 "definitions": {
5720 "command": {
5721 "description": "command to use to launch this process",
5722 "example": "bundle exec rails server -p $PORT",
5723 "readOnly": false,
5724 "type": [
5725 "string"
5726 ]
5727 },
5728 "created_at": {
5729 "description": "when process type was created",
5730 "example": "2012-01-01T12:00:00Z",
5731 "format": "date-time",
5732 "readOnly": true,
5733 "type": [
5734 "string"
5735 ]
5736 },
5737 "id": {
5738 "description": "unique identifier of this process type",
5739 "example": "01234567-89ab-cdef-0123-456789abcdef",
5740 "format": "uuid",
5741 "readOnly": true,
5742 "type": [
5743 "string"
5744 ]
5745 },
5746 "identity": {
5747 "anyOf": [
5748 {
5749 "$ref": "#/definitions/formation/definitions/id"
5750 },
5751 {
5752 "$ref": "#/definitions/formation/definitions/type"
5753 }
5754 ]
5755 },
5756 "quantity": {
5757 "description": "number of processes to maintain",
5758 "example": 1,
5759 "readOnly": false,
5760 "type": [
5761 "integer"
5762 ]
5763 },
5764 "size": {
5765 "description": "dyno size (default: \"standard-1X\")",
5766 "example": "standard-1X",
5767 "readOnly": false,
5768 "type": [
5769 "string"
5770 ]
5771 },
5772 "type": {
5773 "description": "type of process to maintain",
5774 "example": "web",
5775 "readOnly": true,
5776 "pattern": "^[-\\w]{1,128}$",
5777 "type": [
5778 "string"
5779 ]
5780 },
5781 "updated_at": {
5782 "description": "when dyno type was updated",
5783 "example": "2012-01-01T12:00:00Z",
5784 "format": "date-time",
5785 "readOnly": true,
5786 "type": [
5787 "string"
5788 ]
5789 },
5790 "update": {
5791 "additionalProperties": false,
5792 "description": "Properties to update a process type",
5793 "properties": {
5794 "quantity": {
5795 "$ref": "#/definitions/formation/definitions/quantity"
5796 },
5797 "size": {
5798 "$ref": "#/definitions/formation/definitions/size"
5799 },
5800 "type": {
5801 "$ref": "#/definitions/formation/definitions/type"
5802 }
5803 },
5804 "readOnly": false,
5805 "required": [
5806 "type"
5807 ],
5808 "type": [
5809 "object"
5810 ]
5811 }
5812 },
5813 "links": [
5814 {
5815 "description": "Info for a process type",
5816 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/formation/{(%23%2Fdefinitions%2Fformation%2Fdefinitions%2Fidentity)}",
5817 "method": "GET",
5818 "rel": "self",
5819 "targetSchema": {
5820 "$ref": "#/definitions/formation"
5821 },
5822 "title": "Info"
5823 },
5824 {
5825 "description": "List process type formation",
5826 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/formation",
5827 "method": "GET",
5828 "rel": "instances",
5829 "targetSchema": {
5830 "items": {
5831 "$ref": "#/definitions/formation"
5832 },
5833 "type": [
5834 "array"
5835 ]
5836 },
5837 "title": "List"
5838 },
5839 {
5840 "description": "Batch update process types",
5841 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/formation",
5842 "method": "PATCH",
5843 "rel": "update",
5844 "schema": {
5845 "properties": {
5846 "updates": {
5847 "type": [
5848 "array"
5849 ],
5850 "items": {
5851 "$ref": "#/definitions/formation/definitions/update"
5852 },
5853 "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\"."
5854 }
5855 },
5856 "required": [
5857 "updates"
5858 ],
5859 "type": [
5860 "object"
5861 ]
5862 },
5863 "targetSchema": {
5864 "items": {
5865 "$ref": "#/definitions/formation"
5866 },
5867 "type": [
5868 "array"
5869 ]
5870 },
5871 "title": "Batch Update"
5872 },
5873 {
5874 "description": "Update process type",
5875 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/formation/{(%23%2Fdefinitions%2Fformation%2Fdefinitions%2Fidentity)}",
5876 "method": "PATCH",
5877 "rel": "update",
5878 "schema": {
5879 "properties": {
5880 "quantity": {
5881 "$ref": "#/definitions/formation/definitions/quantity"
5882 },
5883 "size": {
5884 "$ref": "#/definitions/formation/definitions/size"
5885 }
5886 },
5887 "type": [
5888 "object"
5889 ]
5890 },
5891 "targetSchema": {
5892 "$ref": "#/definitions/formation"
5893 },
5894 "title": "Update",
5895 "type": [
5896 "object"
5897 ]
5898 }
5899 ],
5900 "properties": {
5901 "app": {
5902 "description": "app formation belongs to",
5903 "properties": {
5904 "name": {
5905 "$ref": "#/definitions/app/definitions/name"
5906 },
5907 "id": {
5908 "$ref": "#/definitions/app/definitions/id"
5909 }
5910 },
5911 "type": [
5912 "object"
5913 ]
5914 },
5915 "command": {
5916 "$ref": "#/definitions/formation/definitions/command"
5917 },
5918 "created_at": {
5919 "$ref": "#/definitions/formation/definitions/created_at"
5920 },
5921 "id": {
5922 "$ref": "#/definitions/formation/definitions/id"
5923 },
5924 "quantity": {
5925 "$ref": "#/definitions/formation/definitions/quantity"
5926 },
5927 "size": {
5928 "$ref": "#/definitions/formation/definitions/size"
5929 },
5930 "type": {
5931 "$ref": "#/definitions/formation/definitions/type"
5932 },
5933 "updated_at": {
5934 "$ref": "#/definitions/formation/definitions/updated_at"
5935 }
5936 }
5937 },
5938 "identity-provider": {
5939 "description": "Identity Providers represent the SAML configuration of an Organization.",
5940 "$schema": "http://json-schema.org/draft-04/hyper-schema",
5941 "stability": "production",
5942 "strictProperties": true,
5943 "title": "Heroku Platform API - Identity Provider",
5944 "type": [
5945 "object"
5946 ],
5947 "definitions": {
5948 "certificate": {
5949 "description": "raw contents of the public certificate (eg: .crt or .pem file)",
5950 "example": "-----BEGIN CERTIFICATE----- ...",
5951 "readOnly": false,
5952 "type": [
5953 "string"
5954 ]
5955 },
5956 "created_at": {
5957 "description": "when provider record was created",
5958 "example": "2012-01-01T12:00:00Z",
5959 "format": "date-time",
5960 "readOnly": true,
5961 "type": [
5962 "string"
5963 ]
5964 },
5965 "entity_id": {
5966 "description": "URL identifier provided by the identity provider",
5967 "example": "https://customer-domain.idp.com",
5968 "readOnly": false,
5969 "type": [
5970 "string"
5971 ]
5972 },
5973 "id": {
5974 "description": "unique identifier of this identity provider",
5975 "example": "01234567-89ab-cdef-0123-456789abcdef",
5976 "format": "uuid",
5977 "readOnly": true,
5978 "type": [
5979 "string"
5980 ]
5981 },
5982 "slo_target_url": {
5983 "description": "single log out URL for this identity provider",
5984 "example": "https://example.com/idp/logout",
5985 "readOnly": false,
5986 "type": [
5987 "string"
5988 ]
5989 },
5990 "sso_target_url": {
5991 "description": "single sign on URL for this identity provider",
5992 "example": "https://example.com/idp/login",
5993 "readOnly": false,
5994 "type": [
5995 "string"
5996 ]
5997 },
5998 "updated_at": {
5999 "description": "when the identity provider record was updated",
6000 "example": "2012-01-01T12:00:00Z",
6001 "format": "date-time",
6002 "readOnly": true,
6003 "type": [
6004 "string"
6005 ]
6006 },
6007 "owner": {
6008 "description": "entity that owns this identity provider",
6009 "properties": {
6010 "id": {
6011 "description": "unique identifier of the owner",
6012 "example": "01234567-89ab-cdef-0123-456789abcdef",
6013 "format": "uuid",
6014 "readOnly": true,
6015 "type": [
6016 "string"
6017 ]
6018 },
6019 "name": {
6020 "description": "name of the owner",
6021 "example": "acme",
6022 "readOnly": true,
6023 "type": [
6024 "string"
6025 ]
6026 },
6027 "type": {
6028 "description": "type of the owner",
6029 "enum": [
6030 "team",
6031 "enterprise-account"
6032 ],
6033 "example": "team",
6034 "readOnly": true,
6035 "type": [
6036 "string"
6037 ]
6038 }
6039 },
6040 "readOnly": false,
6041 "required": [
6042 "id",
6043 "type"
6044 ],
6045 "type": [
6046 "object"
6047 ]
6048 }
6049 },
6050 "links": [
6051 {
6052 "description": "Get a list of an organization's Identity Providers",
6053 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fname)}/identity-providers",
6054 "method": "GET",
6055 "rel": "instances",
6056 "targetSchema": {
6057 "items": {
6058 "$ref": "#/definitions/identity-provider"
6059 },
6060 "type": [
6061 "array"
6062 ]
6063 },
6064 "title": "List By Organization"
6065 },
6066 {
6067 "description": "Create an Identity Provider for an organization",
6068 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fname)}/identity-providers",
6069 "method": "POST",
6070 "rel": "create",
6071 "schema": {
6072 "properties": {
6073 "certificate": {
6074 "$ref": "#/definitions/identity-provider/definitions/certificate"
6075 },
6076 "entity_id": {
6077 "$ref": "#/definitions/identity-provider/definitions/entity_id"
6078 },
6079 "slo_target_url": {
6080 "$ref": "#/definitions/identity-provider/definitions/slo_target_url"
6081 },
6082 "sso_target_url": {
6083 "$ref": "#/definitions/identity-provider/definitions/sso_target_url"
6084 }
6085 },
6086 "required": [
6087 "certificate",
6088 "sso_target_url",
6089 "entity_id"
6090 ],
6091 "type": [
6092 "object"
6093 ]
6094 },
6095 "targetSchema": {
6096 "$ref": "#/definitions/identity-provider"
6097 },
6098 "title": "Create By Organization"
6099 },
6100 {
6101 "description": "Update an organization's Identity Provider",
6102 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fname)}/identity-providers/{(%23%2Fdefinitions%2Fidentity-provider%2Fdefinitions%2Fid)}",
6103 "method": "PATCH",
6104 "rel": "update",
6105 "schema": {
6106 "properties": {
6107 "certificate": {
6108 "$ref": "#/definitions/identity-provider/definitions/certificate"
6109 },
6110 "entity_id": {
6111 "$ref": "#/definitions/identity-provider/definitions/entity_id"
6112 },
6113 "slo_target_url": {
6114 "$ref": "#/definitions/identity-provider/definitions/slo_target_url"
6115 },
6116 "sso_target_url": {
6117 "$ref": "#/definitions/identity-provider/definitions/sso_target_url"
6118 }
6119 },
6120 "type": [
6121 "object"
6122 ]
6123 },
6124 "targetSchema": {
6125 "$ref": "#/definitions/identity-provider"
6126 },
6127 "title": "Update By Organization"
6128 },
6129 {
6130 "description": "Delete an organization's Identity Provider",
6131 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fname)}/identity-providers/{(%23%2Fdefinitions%2Fidentity-provider%2Fdefinitions%2Fid)}",
6132 "method": "DELETE",
6133 "rel": "destroy",
6134 "targetSchema": {
6135 "$ref": "#/definitions/identity-provider"
6136 },
6137 "title": "Delete By Organization"
6138 },
6139 {
6140 "description": "Get a list of a team's Identity Providers",
6141 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/identity-providers",
6142 "method": "GET",
6143 "rel": "instances",
6144 "targetSchema": {
6145 "items": {
6146 "$ref": "#/definitions/identity-provider"
6147 },
6148 "type": [
6149 "array"
6150 ]
6151 },
6152 "title": "List By Team"
6153 },
6154 {
6155 "description": "Create an Identity Provider for a team",
6156 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/identity-providers",
6157 "method": "POST",
6158 "rel": "create",
6159 "schema": {
6160 "properties": {
6161 "certificate": {
6162 "$ref": "#/definitions/identity-provider/definitions/certificate"
6163 },
6164 "entity_id": {
6165 "$ref": "#/definitions/identity-provider/definitions/entity_id"
6166 },
6167 "slo_target_url": {
6168 "$ref": "#/definitions/identity-provider/definitions/slo_target_url"
6169 },
6170 "sso_target_url": {
6171 "$ref": "#/definitions/identity-provider/definitions/sso_target_url"
6172 }
6173 },
6174 "required": [
6175 "certificate",
6176 "sso_target_url",
6177 "entity_id"
6178 ],
6179 "type": [
6180 "object"
6181 ]
6182 },
6183 "targetSchema": {
6184 "$ref": "#/definitions/identity-provider"
6185 },
6186 "title": "Create By Team"
6187 },
6188 {
6189 "description": "Update a team's Identity Provider",
6190 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/identity-providers/{(%23%2Fdefinitions%2Fidentity-provider%2Fdefinitions%2Fid)}",
6191 "method": "PATCH",
6192 "rel": "update",
6193 "schema": {
6194 "properties": {
6195 "certificate": {
6196 "$ref": "#/definitions/identity-provider/definitions/certificate"
6197 },
6198 "entity_id": {
6199 "$ref": "#/definitions/identity-provider/definitions/entity_id"
6200 },
6201 "slo_target_url": {
6202 "$ref": "#/definitions/identity-provider/definitions/slo_target_url"
6203 },
6204 "sso_target_url": {
6205 "$ref": "#/definitions/identity-provider/definitions/sso_target_url"
6206 }
6207 },
6208 "type": [
6209 "object"
6210 ]
6211 },
6212 "targetSchema": {
6213 "$ref": "#/definitions/identity-provider"
6214 },
6215 "title": "Update By Team"
6216 },
6217 {
6218 "description": "Delete a team's Identity Provider",
6219 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fname)}/identity-providers/{(%23%2Fdefinitions%2Fidentity-provider%2Fdefinitions%2Fid)}",
6220 "method": "DELETE",
6221 "rel": "destroy",
6222 "targetSchema": {
6223 "$ref": "#/definitions/identity-provider"
6224 },
6225 "title": "Delete By Team"
6226 }
6227 ],
6228 "properties": {
6229 "certificate": {
6230 "$ref": "#/definitions/identity-provider/definitions/certificate"
6231 },
6232 "created_at": {
6233 "$ref": "#/definitions/identity-provider/definitions/created_at"
6234 },
6235 "entity_id": {
6236 "$ref": "#/definitions/identity-provider/definitions/entity_id"
6237 },
6238 "id": {
6239 "$ref": "#/definitions/identity-provider/definitions/id"
6240 },
6241 "slo_target_url": {
6242 "$ref": "#/definitions/identity-provider/definitions/slo_target_url"
6243 },
6244 "sso_target_url": {
6245 "$ref": "#/definitions/identity-provider/definitions/sso_target_url"
6246 },
6247 "organization": {
6248 "description": "organization associated with this identity provider",
6249 "properties": {
6250 "name": {
6251 "$ref": "#/definitions/organization/definitions/name"
6252 }
6253 },
6254 "type": [
6255 "null",
6256 "object"
6257 ]
6258 },
6259 "updated_at": {
6260 "$ref": "#/definitions/identity-provider/definitions/updated_at"
6261 },
6262 "owner": {
6263 "$ref": "#/definitions/identity-provider/definitions/owner"
6264 }
6265 }
6266 },
6267 "inbound-ruleset": {
6268 "description": "An inbound-ruleset is a collection of rules that specify what hosts can or cannot connect to an application.",
6269 "$schema": "http://json-schema.org/draft-04/hyper-schema",
6270 "stability": "prototype",
6271 "strictProperties": true,
6272 "title": "Heroku Platform API - Inbound Ruleset",
6273 "type": [
6274 "object"
6275 ],
6276 "definitions": {
6277 "action": {
6278 "description": "states whether the connection is allowed or denied",
6279 "example": "allow",
6280 "readOnly": false,
6281 "type": [
6282 "string"
6283 ],
6284 "enum": [
6285 "allow",
6286 "deny"
6287 ]
6288 },
6289 "source": {
6290 "description": "is the request’s source in CIDR notation",
6291 "example": "1.1.1.1/1",
6292 "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]))$",
6293 "readOnly": false,
6294 "type": [
6295 "string"
6296 ]
6297 },
6298 "created_at": {
6299 "description": "when inbound-ruleset was created",
6300 "example": "2012-01-01T12:00:00Z",
6301 "format": "date-time",
6302 "readOnly": true,
6303 "type": [
6304 "string"
6305 ]
6306 },
6307 "id": {
6308 "description": "unique identifier of an inbound-ruleset",
6309 "example": "01234567-89ab-cdef-0123-456789abcdef",
6310 "format": "uuid",
6311 "readOnly": true,
6312 "type": [
6313 "string"
6314 ]
6315 },
6316 "identity": {
6317 "anyOf": [
6318 {
6319 "$ref": "#/definitions/inbound-ruleset/definitions/id"
6320 }
6321 ]
6322 },
6323 "rule": {
6324 "description": "the combination of an IP address in CIDR notation and whether to allow or deny it's traffic.",
6325 "type": [
6326 "object"
6327 ],
6328 "properties": {
6329 "action": {
6330 "$ref": "#/definitions/inbound-ruleset/definitions/action"
6331 },
6332 "source": {
6333 "$ref": "#/definitions/inbound-ruleset/definitions/source"
6334 }
6335 },
6336 "required": [
6337 "source",
6338 "action"
6339 ]
6340 }
6341 },
6342 "links": [
6343 {
6344 "description": "Current inbound ruleset for a space",
6345 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/inbound-ruleset",
6346 "method": "GET",
6347 "rel": "self",
6348 "targetSchema": {
6349 "$ref": "#/definitions/inbound-ruleset"
6350 },
6351 "title": "Current"
6352 },
6353 {
6354 "description": "Info on an existing Inbound Ruleset",
6355 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/inbound-rulesets/{(%23%2Fdefinitions%2Finbound-ruleset%2Fdefinitions%2Fidentity)}",
6356 "method": "GET",
6357 "rel": "self",
6358 "targetSchema": {
6359 "$ref": "#/definitions/inbound-ruleset"
6360 },
6361 "title": "Info"
6362 },
6363 {
6364 "description": "List all inbound rulesets for a space",
6365 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/inbound-rulesets",
6366 "method": "GET",
6367 "rel": "instances",
6368 "targetSchema": {
6369 "items": {
6370 "$ref": "#/definitions/inbound-ruleset"
6371 },
6372 "type": [
6373 "array"
6374 ]
6375 },
6376 "title": "List"
6377 },
6378 {
6379 "description": "Create a new inbound ruleset",
6380 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/inbound-ruleset",
6381 "method": "PUT",
6382 "rel": "create",
6383 "schema": {
6384 "type": [
6385 "object"
6386 ],
6387 "properties": {
6388 "rules": {
6389 "type": [
6390 "array"
6391 ],
6392 "items": {
6393 "$ref": "#/definitions/inbound-ruleset/definitions/rule"
6394 }
6395 }
6396 }
6397 },
6398 "title": "Create"
6399 }
6400 ],
6401 "properties": {
6402 "id": {
6403 "$ref": "#/definitions/inbound-ruleset/definitions/id"
6404 },
6405 "space": {
6406 "description": "identity of space",
6407 "properties": {
6408 "id": {
6409 "$ref": "#/definitions/space/definitions/id"
6410 },
6411 "name": {
6412 "$ref": "#/definitions/space/definitions/name"
6413 }
6414 },
6415 "type": [
6416 "object"
6417 ]
6418 },
6419 "created_at": {
6420 "$ref": "#/definitions/inbound-ruleset/definitions/created_at"
6421 },
6422 "rules": {
6423 "type": [
6424 "array"
6425 ],
6426 "items": {
6427 "$ref": "#/definitions/inbound-ruleset/definitions/rule"
6428 }
6429 },
6430 "created_by": {
6431 "$ref": "#/definitions/account/definitions/email"
6432 }
6433 }
6434 },
6435 "invoice-address": {
6436 "$schema": "http://json-schema.org/draft-04/hyper-schema",
6437 "description": "An invoice address represents the address that should be listed on an invoice.",
6438 "title": "Heroku Vault API - Invoice Address",
6439 "stability": "development",
6440 "type": [
6441 "object"
6442 ],
6443 "definitions": {
6444 "address_1": {
6445 "type": [
6446 "string"
6447 ],
6448 "description": "invoice street address line 1",
6449 "example": "40 Hickory Blvd."
6450 },
6451 "address_2": {
6452 "type": [
6453 "string"
6454 ],
6455 "description": "invoice street address line 2",
6456 "example": "Suite 300"
6457 },
6458 "city": {
6459 "type": [
6460 "string"
6461 ],
6462 "description": "invoice city",
6463 "example": "Seattle"
6464 },
6465 "country": {
6466 "type": [
6467 "string"
6468 ],
6469 "description": "country",
6470 "example": "US"
6471 },
6472 "heroku_id": {
6473 "type": [
6474 "string"
6475 ],
6476 "description": "heroku_id identifier reference",
6477 "example": "user930223902@heroku.com",
6478 "readOnly": true
6479 },
6480 "identity": {
6481 "anyOf": [
6482 {
6483 "$ref": "#/definitions/invoice-address/definitions/heroku_id"
6484 }
6485 ]
6486 },
6487 "other": {
6488 "type": [
6489 "string"
6490 ],
6491 "description": "metadata / additional information to go on invoice",
6492 "example": "Company ABC Inc. VAT 903820"
6493 },
6494 "postal_code": {
6495 "type": [
6496 "string"
6497 ],
6498 "description": "invoice zip code",
6499 "example": "98101"
6500 },
6501 "state": {
6502 "type": [
6503 "string"
6504 ],
6505 "description": "invoice state",
6506 "example": "WA"
6507 },
6508 "use_invoice_address": {
6509 "type": [
6510 "boolean"
6511 ],
6512 "description": "flag to use the invoice address for an account or not",
6513 "example": true,
6514 "default": false
6515 }
6516 },
6517 "links": [
6518 {
6519 "description": "Retrieve existing invoice address.",
6520 "href": "/account/invoice-address",
6521 "method": "GET",
6522 "rel": "self",
6523 "title": "info"
6524 },
6525 {
6526 "description": "Update invoice address for an account.",
6527 "href": "/account/invoice-address",
6528 "method": "PUT",
6529 "rel": "self",
6530 "title": "update",
6531 "schema": {
6532 "properties": {
6533 "address_1": {
6534 "$ref": "#/definitions/invoice-address/definitions/address_1"
6535 },
6536 "address_2": {
6537 "$ref": "#/definitions/invoice-address/definitions/address_2"
6538 },
6539 "city": {
6540 "$ref": "#/definitions/invoice-address/definitions/city"
6541 },
6542 "country": {
6543 "$ref": "#/definitions/invoice-address/definitions/country"
6544 },
6545 "other": {
6546 "$ref": "#/definitions/invoice-address/definitions/other"
6547 },
6548 "postal_code": {
6549 "$ref": "#/definitions/invoice-address/definitions/postal_code"
6550 },
6551 "state": {
6552 "$ref": "#/definitions/invoice-address/definitions/state"
6553 },
6554 "use_invoice_address": {
6555 "$ref": "#/definitions/invoice-address/definitions/use_invoice_address"
6556 }
6557 },
6558 "type": [
6559 "object"
6560 ]
6561 }
6562 }
6563 ],
6564 "properties": {
6565 "address_1": {
6566 "$ref": "#/definitions/invoice-address/definitions/address_1"
6567 },
6568 "address_2": {
6569 "$ref": "#/definitions/invoice-address/definitions/address_2"
6570 },
6571 "city": {
6572 "$ref": "#/definitions/invoice-address/definitions/city"
6573 },
6574 "country": {
6575 "$ref": "#/definitions/invoice-address/definitions/country"
6576 },
6577 "heroku_id": {
6578 "$ref": "#/definitions/invoice-address/definitions/identity"
6579 },
6580 "other": {
6581 "$ref": "#/definitions/invoice-address/definitions/other"
6582 },
6583 "postal_code": {
6584 "$ref": "#/definitions/invoice-address/definitions/postal_code"
6585 },
6586 "state": {
6587 "$ref": "#/definitions/invoice-address/definitions/state"
6588 },
6589 "use_invoice_address": {
6590 "$ref": "#/definitions/invoice-address/definitions/use_invoice_address"
6591 }
6592 }
6593 },
6594 "invoice": {
6595 "$schema": "http://json-schema.org/draft-04/hyper-schema",
6596 "description": "An invoice is an itemized bill of goods for an account which includes pricing and charges.",
6597 "stability": "development",
6598 "strictProperties": true,
6599 "title": "Heroku Platform API - Invoice",
6600 "type": [
6601 "object"
6602 ],
6603 "definitions": {
6604 "charges_total": {
6605 "description": "total charges on this invoice",
6606 "example": 100.0,
6607 "readOnly": true,
6608 "type": [
6609 "number"
6610 ]
6611 },
6612 "created_at": {
6613 "description": "when invoice was created",
6614 "example": "2012-01-01T12:00:00Z",
6615 "format": "date-time",
6616 "readOnly": true,
6617 "type": [
6618 "string"
6619 ]
6620 },
6621 "credits_total": {
6622 "description": "total credits on this invoice",
6623 "example": 100.0,
6624 "readOnly": true,
6625 "type": [
6626 "number"
6627 ]
6628 },
6629 "id": {
6630 "description": "unique identifier of this invoice",
6631 "example": "01234567-89ab-cdef-0123-456789abcdef",
6632 "format": "uuid",
6633 "readOnly": true,
6634 "type": [
6635 "string"
6636 ]
6637 },
6638 "identity": {
6639 "anyOf": [
6640 {
6641 "$ref": "#/definitions/invoice/definitions/number"
6642 }
6643 ]
6644 },
6645 "number": {
6646 "description": "human readable invoice number",
6647 "example": 9403943,
6648 "readOnly": true,
6649 "type": [
6650 "integer"
6651 ]
6652 },
6653 "period_end": {
6654 "description": "the ending date that the invoice covers",
6655 "example": "01/31/2014",
6656 "readOnly": true,
6657 "type": [
6658 "string"
6659 ]
6660 },
6661 "period_start": {
6662 "description": "the starting date that this invoice covers",
6663 "example": "01/01/2014",
6664 "readOnly": true,
6665 "type": [
6666 "string"
6667 ]
6668 },
6669 "state": {
6670 "description": "payment status for this invoice (pending, successful, failed)",
6671 "example": 1,
6672 "readOnly": true,
6673 "type": [
6674 "integer"
6675 ]
6676 },
6677 "total": {
6678 "description": "combined total of charges and credits on this invoice",
6679 "example": 100.0,
6680 "readOnly": true,
6681 "type": [
6682 "number"
6683 ]
6684 },
6685 "updated_at": {
6686 "description": "when invoice was updated",
6687 "example": "2012-01-01T12:00:00Z",
6688 "format": "date-time",
6689 "readOnly": true,
6690 "type": [
6691 "string"
6692 ]
6693 }
6694 },
6695 "links": [
6696 {
6697 "description": "Info for existing invoice.",
6698 "href": "/account/invoices/{(%23%2Fdefinitions%2Finvoice%2Fdefinitions%2Fidentity)}",
6699 "method": "GET",
6700 "rel": "self",
6701 "targetSchema": {
6702 "$ref": "#/definitions/invoice"
6703 },
6704 "title": "Info"
6705 },
6706 {
6707 "description": "List existing invoices.",
6708 "href": "/account/invoices",
6709 "method": "GET",
6710 "rel": "instances",
6711 "targetSchema": {
6712 "items": {
6713 "$ref": "#/definitions/invoice"
6714 },
6715 "type": [
6716 "array"
6717 ]
6718 },
6719 "title": "List"
6720 }
6721 ],
6722 "properties": {
6723 "charges_total": {
6724 "$ref": "#/definitions/invoice/definitions/charges_total"
6725 },
6726 "created_at": {
6727 "$ref": "#/definitions/invoice/definitions/created_at"
6728 },
6729 "credits_total": {
6730 "$ref": "#/definitions/invoice/definitions/credits_total"
6731 },
6732 "id": {
6733 "$ref": "#/definitions/invoice/definitions/id"
6734 },
6735 "number": {
6736 "$ref": "#/definitions/invoice/definitions/number"
6737 },
6738 "period_end": {
6739 "$ref": "#/definitions/invoice/definitions/period_end"
6740 },
6741 "period_start": {
6742 "$ref": "#/definitions/invoice/definitions/period_start"
6743 },
6744 "state": {
6745 "$ref": "#/definitions/invoice/definitions/state"
6746 },
6747 "total": {
6748 "$ref": "#/definitions/invoice/definitions/total"
6749 },
6750 "updated_at": {
6751 "$ref": "#/definitions/invoice/definitions/updated_at"
6752 }
6753 }
6754 },
6755 "key": {
6756 "description": "Keys represent public SSH keys associated with an account and are used to authorize accounts as they are performing git operations.",
6757 "$schema": "http://json-schema.org/draft-04/hyper-schema",
6758 "stability": "production",
6759 "strictProperties": true,
6760 "title": "Heroku Platform API - Key",
6761 "type": [
6762 "object"
6763 ],
6764 "definitions": {
6765 "comment": {
6766 "description": "comment on the key",
6767 "example": "username@host",
6768 "readOnly": true,
6769 "type": [
6770 "string"
6771 ]
6772 },
6773 "created_at": {
6774 "description": "when key was created",
6775 "example": "2012-01-01T12:00:00Z",
6776 "format": "date-time",
6777 "readOnly": true,
6778 "type": [
6779 "string"
6780 ]
6781 },
6782 "email": {
6783 "deprecated": true,
6784 "description": "deprecated. Please refer to 'comment' instead",
6785 "example": "username@host",
6786 "readOnly": true,
6787 "type": [
6788 "string"
6789 ]
6790 },
6791 "fingerprint": {
6792 "description": "a unique identifying string based on contents",
6793 "example": "17:63:a4:ba:24:d3:7f:af:17:c8:94:82:7e:80:56:bf",
6794 "readOnly": true,
6795 "type": [
6796 "string"
6797 ]
6798 },
6799 "id": {
6800 "description": "unique identifier of this key",
6801 "example": "01234567-89ab-cdef-0123-456789abcdef",
6802 "format": "uuid",
6803 "readOnly": true,
6804 "type": [
6805 "string"
6806 ]
6807 },
6808 "identity": {
6809 "anyOf": [
6810 {
6811 "$ref": "#/definitions/key/definitions/id"
6812 },
6813 {
6814 "$ref": "#/definitions/key/definitions/fingerprint"
6815 }
6816 ]
6817 },
6818 "public_key": {
6819 "description": "full public_key as uploaded",
6820 "example": "ssh-rsa AAAAB3NzaC1ycVc/../839Uv username@example.com",
6821 "readOnly": true,
6822 "type": [
6823 "string"
6824 ]
6825 },
6826 "updated_at": {
6827 "description": "when key was updated",
6828 "example": "2012-01-01T12:00:00Z",
6829 "format": "date-time",
6830 "readOnly": true,
6831 "type": [
6832 "string"
6833 ]
6834 }
6835 },
6836 "links": [
6837 {
6838 "description": "Info for existing key.",
6839 "href": "/account/keys/{(%23%2Fdefinitions%2Fkey%2Fdefinitions%2Fidentity)}",
6840 "method": "GET",
6841 "rel": "self",
6842 "targetSchema": {
6843 "$ref": "#/definitions/key"
6844 },
6845 "title": "Info"
6846 },
6847 {
6848 "description": "List existing keys.",
6849 "href": "/account/keys",
6850 "method": "GET",
6851 "rel": "instances",
6852 "targetSchema": {
6853 "items": {
6854 "$ref": "#/definitions/key"
6855 },
6856 "type": [
6857 "array"
6858 ]
6859 },
6860 "title": "List"
6861 }
6862 ],
6863 "properties": {
6864 "comment": {
6865 "$ref": "#/definitions/key/definitions/comment"
6866 },
6867 "created_at": {
6868 "$ref": "#/definitions/key/definitions/created_at"
6869 },
6870 "email": {
6871 "$ref": "#/definitions/key/definitions/email"
6872 },
6873 "fingerprint": {
6874 "$ref": "#/definitions/key/definitions/fingerprint"
6875 },
6876 "id": {
6877 "$ref": "#/definitions/key/definitions/id"
6878 },
6879 "public_key": {
6880 "$ref": "#/definitions/key/definitions/public_key"
6881 },
6882 "updated_at": {
6883 "$ref": "#/definitions/key/definitions/updated_at"
6884 }
6885 }
6886 },
6887 "log-drain": {
6888 "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.",
6889 "$schema": "http://json-schema.org/draft-04/hyper-schema",
6890 "stability": "production",
6891 "strictProperties": true,
6892 "title": "Heroku Platform API - Log Drain",
6893 "type": [
6894 "object"
6895 ],
6896 "definitions": {
6897 "addon": {
6898 "description": "add-on that created the drain",
6899 "example": {
6900 "id": "01234567-89ab-cdef-0123-456789abcdef",
6901 "name": "singing-swiftly-1242"
6902 },
6903 "properties": {
6904 "id": {
6905 "$ref": "#/definitions/add-on/definitions/id"
6906 },
6907 "name": {
6908 "$ref": "#/definitions/add-on/definitions/name"
6909 }
6910 },
6911 "readOnly": true,
6912 "type": [
6913 "object",
6914 "null"
6915 ]
6916 },
6917 "created_at": {
6918 "description": "when log drain was created",
6919 "example": "2012-01-01T12:00:00Z",
6920 "format": "date-time",
6921 "readOnly": true,
6922 "type": [
6923 "string"
6924 ]
6925 },
6926 "id": {
6927 "description": "unique identifier of this log drain",
6928 "example": "01234567-89ab-cdef-0123-456789abcdef",
6929 "format": "uuid",
6930 "readOnly": true,
6931 "type": [
6932 "string"
6933 ]
6934 },
6935 "query_identity": {
6936 "anyOf": [
6937 {
6938 "$ref": "#/definitions/log-drain/definitions/id"
6939 },
6940 {
6941 "$ref": "#/definitions/log-drain/definitions/url"
6942 },
6943 {
6944 "$ref": "#/definitions/log-drain/definitions/token"
6945 }
6946 ]
6947 },
6948 "identity": {
6949 "anyOf": [
6950 {
6951 "$ref": "#/definitions/log-drain/definitions/url"
6952 }
6953 ]
6954 },
6955 "token": {
6956 "description": "token associated with the log drain",
6957 "example": "d.01234567-89ab-cdef-0123-456789abcdef",
6958 "readOnly": true,
6959 "type": [
6960 "string"
6961 ]
6962 },
6963 "updated_at": {
6964 "description": "when log drain was updated",
6965 "example": "2012-01-01T12:00:00Z",
6966 "format": "date-time",
6967 "readOnly": true,
6968 "type": [
6969 "string"
6970 ]
6971 },
6972 "url": {
6973 "description": "url associated with the log drain",
6974 "example": "https://example.com/drain",
6975 "readOnly": true,
6976 "type": [
6977 "string"
6978 ]
6979 }
6980 },
6981 "links": [
6982 {
6983 "description": "Create a new log drain.",
6984 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-drains",
6985 "method": "POST",
6986 "rel": "create",
6987 "schema": {
6988 "properties": {
6989 "url": {
6990 "$ref": "#/definitions/log-drain/definitions/url"
6991 }
6992 },
6993 "required": [
6994 "url"
6995 ],
6996 "type": [
6997 "object"
6998 ]
6999 },
7000 "targetSchema": {
7001 "$ref": "#/definitions/log-drain"
7002 },
7003 "title": "Create"
7004 },
7005 {
7006 "description": "Update an add-on owned log drain.",
7007 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/log-drains/{(%23%2Fdefinitions%2Flog-drain%2Fdefinitions%2Fquery_identity)}",
7008 "method": "PUT",
7009 "rel": "update",
7010 "schema": {
7011 "properties": {
7012 "url": {
7013 "$ref": "#/definitions/log-drain/definitions/url"
7014 }
7015 },
7016 "required": [
7017 "url"
7018 ],
7019 "type": [
7020 "object"
7021 ]
7022 },
7023 "targetSchema": {
7024 "$ref": "#/definitions/log-drain"
7025 },
7026 "title": "Update"
7027 },
7028 {
7029 "description": "Delete an existing log drain. Log drains added by add-ons can only be removed by removing the add-on.",
7030 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-drains/{(%23%2Fdefinitions%2Flog-drain%2Fdefinitions%2Fquery_identity)}",
7031 "method": "DELETE",
7032 "rel": "destroy",
7033 "targetSchema": {
7034 "$ref": "#/definitions/log-drain"
7035 },
7036 "title": "Delete"
7037 },
7038 {
7039 "description": "Info for existing log drain.",
7040 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-drains/{(%23%2Fdefinitions%2Flog-drain%2Fdefinitions%2Fquery_identity)}",
7041 "method": "GET",
7042 "rel": "self",
7043 "targetSchema": {
7044 "$ref": "#/definitions/log-drain"
7045 },
7046 "title": "Info"
7047 },
7048 {
7049 "description": "List existing log drains for an add-on.",
7050 "href": "/addons/{(%23%2Fdefinitions%2Fadd-on%2Fdefinitions%2Fidentity)}/log-drains",
7051 "method": "GET",
7052 "rel": "instances",
7053 "targetSchema": {
7054 "items": {
7055 "$ref": "#/definitions/log-drain"
7056 },
7057 "type": [
7058 "array"
7059 ]
7060 },
7061 "title": "List By Add-on"
7062 },
7063 {
7064 "description": "List existing log drains.",
7065 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-drains",
7066 "method": "GET",
7067 "rel": "instances",
7068 "targetSchema": {
7069 "items": {
7070 "$ref": "#/definitions/log-drain"
7071 },
7072 "type": [
7073 "array"
7074 ]
7075 },
7076 "title": "List"
7077 }
7078 ],
7079 "properties": {
7080 "addon": {
7081 "$ref": "#/definitions/log-drain/definitions/addon"
7082 },
7083 "created_at": {
7084 "$ref": "#/definitions/log-drain/definitions/created_at"
7085 },
7086 "id": {
7087 "$ref": "#/definitions/log-drain/definitions/id"
7088 },
7089 "token": {
7090 "$ref": "#/definitions/log-drain/definitions/token"
7091 },
7092 "updated_at": {
7093 "$ref": "#/definitions/log-drain/definitions/updated_at"
7094 },
7095 "url": {
7096 "$ref": "#/definitions/log-drain/definitions/url"
7097 }
7098 }
7099 },
7100 "log-session": {
7101 "description": "A log session is a reference to the http based log stream for an app.",
7102 "$schema": "http://json-schema.org/draft-04/hyper-schema",
7103 "stability": "production",
7104 "strictProperties": true,
7105 "title": "Heroku Platform API - Log Session",
7106 "type": [
7107 "object"
7108 ],
7109 "definitions": {
7110 "created_at": {
7111 "description": "when log connection was created",
7112 "example": "2012-01-01T12:00:00Z",
7113 "format": "date-time",
7114 "readOnly": true,
7115 "type": [
7116 "string"
7117 ]
7118 },
7119 "dyno": {
7120 "description": "dyno to limit results to",
7121 "example": "web.1",
7122 "readOnly": false,
7123 "type": [
7124 "string"
7125 ]
7126 },
7127 "id": {
7128 "description": "unique identifier of this log session",
7129 "example": "01234567-89ab-cdef-0123-456789abcdef",
7130 "format": "uuid",
7131 "readOnly": true,
7132 "type": [
7133 "string"
7134 ]
7135 },
7136 "identity": {
7137 "anyOf": [
7138 {
7139 "$ref": "#/definitions/log-session/definitions/id"
7140 }
7141 ]
7142 },
7143 "lines": {
7144 "description": "number of log lines to stream at once",
7145 "example": 10,
7146 "readOnly": false,
7147 "type": [
7148 "integer"
7149 ]
7150 },
7151 "logplex_url": {
7152 "description": "URL for log streaming session",
7153 "example": "https://logplex.heroku.com/sessions/01234567-89ab-cdef-0123-456789abcdef?srv=1325419200",
7154 "readOnly": true,
7155 "type": [
7156 "string"
7157 ]
7158 },
7159 "source": {
7160 "description": "log source to limit results to",
7161 "example": "app",
7162 "readOnly": false,
7163 "type": [
7164 "string"
7165 ]
7166 },
7167 "tail": {
7168 "description": "whether to stream ongoing logs",
7169 "example": true,
7170 "readOnly": false,
7171 "type": [
7172 "boolean"
7173 ]
7174 },
7175 "updated_at": {
7176 "description": "when log session was updated",
7177 "example": "2012-01-01T12:00:00Z",
7178 "format": "date-time",
7179 "readOnly": true,
7180 "type": [
7181 "string"
7182 ]
7183 }
7184 },
7185 "links": [
7186 {
7187 "description": "Create a new log session.",
7188 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-sessions",
7189 "method": "POST",
7190 "rel": "create",
7191 "schema": {
7192 "properties": {
7193 "dyno": {
7194 "$ref": "#/definitions/log-session/definitions/dyno"
7195 },
7196 "lines": {
7197 "$ref": "#/definitions/log-session/definitions/lines"
7198 },
7199 "source": {
7200 "$ref": "#/definitions/log-session/definitions/source"
7201 },
7202 "tail": {
7203 "$ref": "#/definitions/log-session/definitions/tail"
7204 }
7205 },
7206 "type": [
7207 "object"
7208 ]
7209 },
7210 "targetSchema": {
7211 "$ref": "#/definitions/log-session"
7212 },
7213 "title": "Create"
7214 }
7215 ],
7216 "properties": {
7217 "created_at": {
7218 "$ref": "#/definitions/log-session/definitions/created_at"
7219 },
7220 "id": {
7221 "$ref": "#/definitions/log-session/definitions/id"
7222 },
7223 "logplex_url": {
7224 "$ref": "#/definitions/log-session/definitions/logplex_url"
7225 },
7226 "updated_at": {
7227 "$ref": "#/definitions/log-session/definitions/updated_at"
7228 }
7229 }
7230 },
7231 "oauth-authorization": {
7232 "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)",
7233 "$schema": "http://json-schema.org/draft-04/hyper-schema",
7234 "stability": "production",
7235 "strictProperties": true,
7236 "title": "Heroku Platform API - OAuth Authorization",
7237 "type": [
7238 "object"
7239 ],
7240 "definitions": {
7241 "created_at": {
7242 "description": "when OAuth authorization was created",
7243 "example": "2012-01-01T12:00:00Z",
7244 "format": "date-time",
7245 "readOnly": true,
7246 "type": [
7247 "string"
7248 ]
7249 },
7250 "description": {
7251 "description": "human-friendly description of this OAuth authorization",
7252 "example": "sample authorization",
7253 "readOnly": true,
7254 "type": [
7255 "string"
7256 ]
7257 },
7258 "id": {
7259 "description": "unique identifier of OAuth authorization",
7260 "example": "01234567-89ab-cdef-0123-456789abcdef",
7261 "format": "uuid",
7262 "readOnly": true,
7263 "type": [
7264 "string"
7265 ]
7266 },
7267 "identity": {
7268 "anyOf": [
7269 {
7270 "$ref": "#/definitions/oauth-authorization/definitions/id"
7271 }
7272 ]
7273 },
7274 "scope": {
7275 "description": "The scope of access OAuth authorization allows",
7276 "example": [
7277 "global"
7278 ],
7279 "readOnly": true,
7280 "type": [
7281 "array"
7282 ],
7283 "items": {
7284 "type": [
7285 "string"
7286 ]
7287 }
7288 },
7289 "updated_at": {
7290 "description": "when OAuth authorization was updated",
7291 "example": "2012-01-01T12:00:00Z",
7292 "format": "date-time",
7293 "readOnly": true,
7294 "type": [
7295 "string"
7296 ]
7297 }
7298 },
7299 "links": [
7300 {
7301 "description": "Create a new OAuth authorization.",
7302 "href": "/oauth/authorizations",
7303 "method": "POST",
7304 "rel": "create",
7305 "schema": {
7306 "properties": {
7307 "client": {
7308 "$ref": "#/definitions/oauth-client/definitions/identity"
7309 },
7310 "description": {
7311 "$ref": "#/definitions/oauth-authorization/definitions/description"
7312 },
7313 "expires_in": {
7314 "$ref": "#/definitions/oauth-token/definitions/expires_in"
7315 },
7316 "scope": {
7317 "$ref": "#/definitions/oauth-authorization/definitions/scope"
7318 }
7319 },
7320 "required": [
7321 "scope"
7322 ],
7323 "type": [
7324 "object"
7325 ]
7326 },
7327 "targetSchema": {
7328 "$ref": "#/definitions/oauth-authorization"
7329 },
7330 "title": "Create"
7331 },
7332 {
7333 "description": "Delete OAuth authorization.",
7334 "href": "/oauth/authorizations/{(%23%2Fdefinitions%2Foauth-authorization%2Fdefinitions%2Fidentity)}",
7335 "method": "DELETE",
7336 "rel": "destroy",
7337 "targetSchema": {
7338 "$ref": "#/definitions/oauth-authorization"
7339 },
7340 "title": "Delete"
7341 },
7342 {
7343 "description": "Info for an OAuth authorization.",
7344 "href": "/oauth/authorizations/{(%23%2Fdefinitions%2Foauth-authorization%2Fdefinitions%2Fidentity)}",
7345 "method": "GET",
7346 "rel": "self",
7347 "targetSchema": {
7348 "$ref": "#/definitions/oauth-authorization"
7349 },
7350 "title": "Info"
7351 },
7352 {
7353 "description": "List OAuth authorizations.",
7354 "href": "/oauth/authorizations",
7355 "method": "GET",
7356 "rel": "instances",
7357 "targetSchema": {
7358 "items": {
7359 "$ref": "#/definitions/oauth-authorization"
7360 },
7361 "type": [
7362 "array"
7363 ]
7364 },
7365 "title": "List"
7366 },
7367 {
7368 "description": "Regenerate OAuth tokens. This endpoint is only available to direct authorizations or privileged OAuth clients.",
7369 "href": "/oauth/authorizations/{(%23%2Fdefinitions%2Foauth-authorization%2Fdefinitions%2Fidentity)}/actions/regenerate-tokens",
7370 "method": "POST",
7371 "rel": "update",
7372 "targetSchema": {
7373 "$ref": "#/definitions/oauth-authorization"
7374 },
7375 "title": "Regenerate"
7376 }
7377 ],
7378 "properties": {
7379 "access_token": {
7380 "description": "access token for this authorization",
7381 "properties": {
7382 "expires_in": {
7383 "$ref": "#/definitions/oauth-token/definitions/expires_in"
7384 },
7385 "id": {
7386 "$ref": "#/definitions/oauth-token/definitions/id"
7387 },
7388 "token": {
7389 "$ref": "#/definitions/oauth-token/definitions/token"
7390 }
7391 },
7392 "type": [
7393 "null",
7394 "object"
7395 ]
7396 },
7397 "client": {
7398 "description": "identifier of the client that obtained this authorization, if any",
7399 "properties": {
7400 "id": {
7401 "$ref": "#/definitions/oauth-client/definitions/id"
7402 },
7403 "name": {
7404 "$ref": "#/definitions/oauth-client/definitions/name"
7405 },
7406 "redirect_uri": {
7407 "$ref": "#/definitions/oauth-client/definitions/redirect_uri"
7408 }
7409 },
7410 "type": [
7411 "null",
7412 "object"
7413 ]
7414 },
7415 "created_at": {
7416 "$ref": "#/definitions/oauth-authorization/definitions/created_at"
7417 },
7418 "grant": {
7419 "description": "this authorization's grant",
7420 "properties": {
7421 "code": {
7422 "$ref": "#/definitions/oauth-grant/definitions/code"
7423 },
7424 "expires_in": {
7425 "$ref": "#/definitions/oauth-grant/definitions/expires_in"
7426 },
7427 "id": {
7428 "$ref": "#/definitions/oauth-grant/definitions/id"
7429 }
7430 },
7431 "strictProperties": true,
7432 "type": [
7433 "null",
7434 "object"
7435 ]
7436 },
7437 "id": {
7438 "$ref": "#/definitions/oauth-authorization/definitions/id"
7439 },
7440 "refresh_token": {
7441 "description": "refresh token for this authorization",
7442 "properties": {
7443 "expires_in": {
7444 "$ref": "#/definitions/oauth-token/definitions/expires_in"
7445 },
7446 "id": {
7447 "$ref": "#/definitions/oauth-token/definitions/id"
7448 },
7449 "token": {
7450 "$ref": "#/definitions/oauth-token/definitions/token"
7451 }
7452 },
7453 "strictProperties": true,
7454 "type": [
7455 "null",
7456 "object"
7457 ]
7458 },
7459 "scope": {
7460 "$ref": "#/definitions/oauth-authorization/definitions/scope"
7461 },
7462 "updated_at": {
7463 "$ref": "#/definitions/oauth-authorization/definitions/updated_at"
7464 },
7465 "user": {
7466 "description": "authenticated user associated with this authorization",
7467 "properties": {
7468 "id": {
7469 "$ref": "#/definitions/account/definitions/id"
7470 },
7471 "email": {
7472 "$ref": "#/definitions/account/definitions/email"
7473 },
7474 "full_name": {
7475 "$ref": "#/definitions/account/definitions/name"
7476 }
7477 },
7478 "strictProperties": true,
7479 "type": [
7480 "object"
7481 ]
7482 }
7483 }
7484 },
7485 "oauth-client": {
7486 "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).",
7487 "$schema": "http://json-schema.org/draft-04/hyper-schema",
7488 "stability": "production",
7489 "strictProperties": true,
7490 "title": "Heroku Platform API - OAuth Client",
7491 "type": [
7492 "object"
7493 ],
7494 "definitions": {
7495 "created_at": {
7496 "description": "when OAuth client was created",
7497 "example": "2012-01-01T12:00:00Z",
7498 "format": "date-time",
7499 "readOnly": true,
7500 "type": [
7501 "string"
7502 ]
7503 },
7504 "id": {
7505 "description": "unique identifier of this OAuth client",
7506 "example": "01234567-89ab-cdef-0123-456789abcdef",
7507 "format": "uuid",
7508 "readOnly": true,
7509 "type": [
7510 "string"
7511 ]
7512 },
7513 "identity": {
7514 "anyOf": [
7515 {
7516 "$ref": "#/definitions/oauth-client/definitions/id"
7517 }
7518 ]
7519 },
7520 "ignores_delinquent": {
7521 "description": "whether the client is still operable given a delinquent account",
7522 "example": false,
7523 "readOnly": true,
7524 "type": [
7525 "boolean",
7526 "null"
7527 ]
7528 },
7529 "name": {
7530 "description": "OAuth client name",
7531 "example": "example",
7532 "readOnly": true,
7533 "type": [
7534 "string"
7535 ]
7536 },
7537 "redirect_uri": {
7538 "description": "endpoint for redirection after authorization with OAuth client",
7539 "example": "https://example.com/auth/heroku/callback",
7540 "readOnly": true,
7541 "type": [
7542 "string"
7543 ]
7544 },
7545 "secret": {
7546 "description": "secret used to obtain OAuth authorizations under this client",
7547 "example": "01234567-89ab-cdef-0123-456789abcdef",
7548 "readOnly": true,
7549 "type": [
7550 "string"
7551 ]
7552 },
7553 "updated_at": {
7554 "description": "when OAuth client was updated",
7555 "example": "2012-01-01T12:00:00Z",
7556 "format": "date-time",
7557 "readOnly": true,
7558 "type": [
7559 "string"
7560 ]
7561 }
7562 },
7563 "links": [
7564 {
7565 "description": "Create a new OAuth client.",
7566 "href": "/oauth/clients",
7567 "method": "POST",
7568 "rel": "create",
7569 "schema": {
7570 "properties": {
7571 "name": {
7572 "$ref": "#/definitions/oauth-client/definitions/name"
7573 },
7574 "redirect_uri": {
7575 "$ref": "#/definitions/oauth-client/definitions/redirect_uri"
7576 }
7577 },
7578 "required": [
7579 "name",
7580 "redirect_uri"
7581 ],
7582 "type": [
7583 "object"
7584 ]
7585 },
7586 "targetSchema": {
7587 "$ref": "#/definitions/oauth-client"
7588 },
7589 "title": "Create"
7590 },
7591 {
7592 "description": "Delete OAuth client.",
7593 "href": "/oauth/clients/{(%23%2Fdefinitions%2Foauth-client%2Fdefinitions%2Fidentity)}",
7594 "method": "DELETE",
7595 "rel": "destroy",
7596 "targetSchema": {
7597 "$ref": "#/definitions/oauth-client"
7598 },
7599 "title": "Delete"
7600 },
7601 {
7602 "description": "Info for an OAuth client",
7603 "href": "/oauth/clients/{(%23%2Fdefinitions%2Foauth-client%2Fdefinitions%2Fidentity)}",
7604 "method": "GET",
7605 "rel": "self",
7606 "title": "Info"
7607 },
7608 {
7609 "description": "List OAuth clients",
7610 "href": "/oauth/clients",
7611 "method": "GET",
7612 "rel": "instances",
7613 "targetSchema": {
7614 "items": {
7615 "$ref": "#/definitions/oauth-client"
7616 },
7617 "type": [
7618 "array"
7619 ]
7620 },
7621 "title": "List"
7622 },
7623 {
7624 "description": "Update OAuth client",
7625 "href": "/oauth/clients/{(%23%2Fdefinitions%2Foauth-client%2Fdefinitions%2Fidentity)}",
7626 "method": "PATCH",
7627 "rel": "update",
7628 "schema": {
7629 "properties": {
7630 "name": {
7631 "$ref": "#/definitions/oauth-client/definitions/name"
7632 },
7633 "redirect_uri": {
7634 "$ref": "#/definitions/oauth-client/definitions/redirect_uri"
7635 }
7636 },
7637 "type": [
7638 "object"
7639 ]
7640 },
7641 "targetSchema": {
7642 "$ref": "#/definitions/oauth-client"
7643 },
7644 "title": "Update"
7645 },
7646 {
7647 "description": "Rotate credentials for an OAuth client",
7648 "href": "/oauth/clients/{(%23%2Fdefinitions%2Foauth-client%2Fdefinitions%2Fidentity)}/actions/rotate-credentials",
7649 "method": "POST",
7650 "rel": "update",
7651 "targetSchema": {
7652 "$ref": "#/definitions/oauth-client"
7653 },
7654 "title": "Rotate Credentials"
7655 }
7656 ],
7657 "properties": {
7658 "created_at": {
7659 "$ref": "#/definitions/oauth-client/definitions/created_at"
7660 },
7661 "id": {
7662 "$ref": "#/definitions/oauth-client/definitions/id"
7663 },
7664 "ignores_delinquent": {
7665 "$ref": "#/definitions/oauth-client/definitions/ignores_delinquent"
7666 },
7667 "name": {
7668 "$ref": "#/definitions/oauth-client/definitions/name"
7669 },
7670 "redirect_uri": {
7671 "$ref": "#/definitions/oauth-client/definitions/redirect_uri"
7672 },
7673 "secret": {
7674 "$ref": "#/definitions/oauth-client/definitions/secret"
7675 },
7676 "updated_at": {
7677 "$ref": "#/definitions/oauth-client/definitions/updated_at"
7678 }
7679 }
7680 },
7681 "oauth-grant": {
7682 "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)",
7683 "$schema": "http://json-schema.org/draft-04/hyper-schema",
7684 "stability": "production",
7685 "strictProperties": true,
7686 "title": "Heroku Platform API - OAuth Grant",
7687 "type": [
7688 "object"
7689 ],
7690 "definitions": {
7691 "code": {
7692 "description": "grant code received from OAuth web application authorization",
7693 "example": "01234567-89ab-cdef-0123-456789abcdef",
7694 "readOnly": true,
7695 "type": [
7696 "string"
7697 ]
7698 },
7699 "expires_in": {
7700 "description": "seconds until OAuth grant expires",
7701 "example": 2592000,
7702 "readOnly": true,
7703 "type": [
7704 "integer"
7705 ]
7706 },
7707 "id": {
7708 "description": "unique identifier of OAuth grant",
7709 "example": "01234567-89ab-cdef-0123-456789abcdef",
7710 "format": "uuid",
7711 "readOnly": true,
7712 "type": [
7713 "string"
7714 ]
7715 },
7716 "identity": {
7717 "anyOf": [
7718 {
7719 "$ref": "#/definitions/oauth-grant/definitions/id"
7720 }
7721 ]
7722 },
7723 "type": {
7724 "description": "type of grant requested, one of `authorization_code` or `refresh_token`",
7725 "example": "authorization_code",
7726 "readOnly": false,
7727 "type": [
7728 "string"
7729 ]
7730 }
7731 },
7732 "links": [
7733 ],
7734 "properties": {
7735 }
7736 },
7737 "oauth-token": {
7738 "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)",
7739 "$schema": "http://json-schema.org/draft-04/hyper-schema",
7740 "stability": "production",
7741 "strictProperties": true,
7742 "title": "Heroku Platform API - OAuth Token",
7743 "type": [
7744 "object"
7745 ],
7746 "definitions": {
7747 "created_at": {
7748 "description": "when OAuth token was created",
7749 "example": "2012-01-01T12:00:00Z",
7750 "format": "date-time",
7751 "readOnly": true,
7752 "type": [
7753 "string"
7754 ]
7755 },
7756 "expires_in": {
7757 "description": "seconds until OAuth token expires; may be `null` for tokens with indefinite lifetime",
7758 "example": 2592000,
7759 "readOnly": true,
7760 "type": [
7761 "null",
7762 "integer"
7763 ]
7764 },
7765 "id": {
7766 "description": "unique identifier of OAuth token",
7767 "example": "01234567-89ab-cdef-0123-456789abcdef",
7768 "format": "uuid",
7769 "readOnly": true,
7770 "type": [
7771 "string"
7772 ]
7773 },
7774 "identity": {
7775 "anyOf": [
7776 {
7777 "$ref": "#/definitions/oauth-token/definitions/id"
7778 }
7779 ]
7780 },
7781 "token": {
7782 "description": "contents of the token to be used for authorization",
7783 "example": "01234567-89ab-cdef-0123-456789abcdef",
7784 "readOnly": true,
7785 "type": [
7786 "string"
7787 ]
7788 },
7789 "updated_at": {
7790 "description": "when OAuth token was updated",
7791 "example": "2012-01-01T12:00:00Z",
7792 "format": "date-time",
7793 "readOnly": true,
7794 "type": [
7795 "string"
7796 ]
7797 }
7798 },
7799 "links": [
7800 {
7801 "description": "Create a new OAuth token.",
7802 "href": "/oauth/tokens",
7803 "method": "POST",
7804 "rel": "create",
7805 "schema": {
7806 "properties": {
7807 "client": {
7808 "type": [
7809 "object"
7810 ],
7811 "properties": {
7812 "secret": {
7813 "$ref": "#/definitions/oauth-client/definitions/secret"
7814 }
7815 }
7816 },
7817 "grant": {
7818 "type": [
7819 "object"
7820 ],
7821 "properties": {
7822 "code": {
7823 "$ref": "#/definitions/oauth-grant/definitions/code"
7824 },
7825 "type": {
7826 "$ref": "#/definitions/oauth-grant/definitions/type"
7827 }
7828 }
7829 },
7830 "refresh_token": {
7831 "type": [
7832 "object"
7833 ],
7834 "properties": {
7835 "token": {
7836 "$ref": "#/definitions/oauth-token/definitions/token"
7837 }
7838 }
7839 }
7840 },
7841 "required": [
7842 "grant",
7843 "client",
7844 "refresh_token"
7845 ],
7846 "type": [
7847 "object"
7848 ]
7849 },
7850 "targetSchema": {
7851 "$ref": "#/definitions/oauth-token"
7852 },
7853 "title": "Create"
7854 },
7855 {
7856 "description": "Revoke OAuth access token.",
7857 "href": "/oauth/tokens/{(%23%2Fdefinitions%2Foauth-token%2Fdefinitions%2Fidentity)}",
7858 "method": "DELETE",
7859 "rel": "destroy",
7860 "targetSchema": {
7861 "$ref": "#/definitions/oauth-token"
7862 },
7863 "title": "Delete"
7864 }
7865 ],
7866 "properties": {
7867 "access_token": {
7868 "description": "current access token",
7869 "properties": {
7870 "expires_in": {
7871 "$ref": "#/definitions/oauth-token/definitions/expires_in"
7872 },
7873 "id": {
7874 "$ref": "#/definitions/oauth-token/definitions/id"
7875 },
7876 "token": {
7877 "$ref": "#/definitions/oauth-token/definitions/token"
7878 }
7879 },
7880 "strictProperties": true,
7881 "type": [
7882 "object"
7883 ]
7884 },
7885 "authorization": {
7886 "description": "authorization for this set of tokens",
7887 "properties": {
7888 "id": {
7889 "$ref": "#/definitions/oauth-authorization/definitions/id"
7890 }
7891 },
7892 "strictProperties": true,
7893 "type": [
7894 "object"
7895 ]
7896 },
7897 "client": {
7898 "description": "OAuth client secret used to obtain token",
7899 "properties": {
7900 "secret": {
7901 "$ref": "#/definitions/oauth-client/definitions/secret"
7902 }
7903 },
7904 "strictProperties": true,
7905 "type": [
7906 "null",
7907 "object"
7908 ]
7909 },
7910 "created_at": {
7911 "$ref": "#/definitions/oauth-token/definitions/created_at"
7912 },
7913 "grant": {
7914 "description": "grant used on the underlying authorization",
7915 "properties": {
7916 "code": {
7917 "$ref": "#/definitions/oauth-grant/definitions/code"
7918 },
7919 "type": {
7920 "$ref": "#/definitions/oauth-grant/definitions/type"
7921 }
7922 },
7923 "strictProperties": true,
7924 "type": [
7925 "object"
7926 ]
7927 },
7928 "id": {
7929 "$ref": "#/definitions/oauth-token/definitions/id"
7930 },
7931 "refresh_token": {
7932 "description": "refresh token for this authorization",
7933 "properties": {
7934 "expires_in": {
7935 "$ref": "#/definitions/oauth-token/definitions/expires_in"
7936 },
7937 "id": {
7938 "$ref": "#/definitions/oauth-token/definitions/id"
7939 },
7940 "token": {
7941 "$ref": "#/definitions/oauth-token/definitions/token"
7942 }
7943 },
7944 "strictProperties": true,
7945 "type": [
7946 "object"
7947 ]
7948 },
7949 "session": {
7950 "description": "OAuth session using this token",
7951 "properties": {
7952 "id": {
7953 "$ref": "#/definitions/oauth-token/definitions/id"
7954 }
7955 },
7956 "strictProperties": true,
7957 "type": [
7958 "object"
7959 ]
7960 },
7961 "updated_at": {
7962 "$ref": "#/definitions/oauth-token/definitions/updated_at"
7963 },
7964 "user": {
7965 "description": "Reference to the user associated with this token",
7966 "properties": {
7967 "id": {
7968 "$ref": "#/definitions/account/definitions/id"
7969 }
7970 },
7971 "strictProperties": true,
7972 "type": [
7973 "object"
7974 ]
7975 }
7976 }
7977 },
7978 "organization-add-on": {
7979 "$schema": "http://json-schema.org/draft-04/hyper-schema",
7980 "description": "Deprecated: A list of add-ons the Organization uses across all apps",
7981 "stability": "production",
7982 "deprecated_at": "2017-04-10",
7983 "title": "Heroku Platform API - Organization Add-on",
7984 "type": [
7985 "object"
7986 ],
7987 "links": [
7988 {
7989 "description": "List add-ons used across all Organization apps",
7990 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/addons",
7991 "method": "GET",
7992 "rel": "instances",
7993 "targetSchema": {
7994 "items": {
7995 "$ref": "#/definitions/add-on"
7996 },
7997 "type": [
7998 "array"
7999 ]
8000 },
8001 "title": "List For Organization"
8002 }
8003 ]
8004 },
8005 "organization-app-collaborator": {
8006 "description": "Deprecated: An organization collaborator represents an account that has been given access to an organization app on Heroku.",
8007 "$schema": "http://json-schema.org/draft-04/hyper-schema",
8008 "stability": "prototype",
8009 "deprecated_at": "2017-04-10",
8010 "title": "Heroku Platform API - Organization App Collaborator",
8011 "type": [
8012 "object"
8013 ],
8014 "definitions": {
8015 "identity": {
8016 "anyOf": [
8017 {
8018 "$ref": "#/definitions/collaborator/definitions/email"
8019 }
8020 ]
8021 }
8022 },
8023 "links": [
8024 {
8025 "description": "Create a new collaborator on an organization 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-app-permissions) according to their role in the organization.",
8026 "href": "/organizations/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators",
8027 "method": "POST",
8028 "rel": "create",
8029 "schema": {
8030 "properties": {
8031 "permissions": {
8032 "type": [
8033 "array"
8034 ],
8035 "items": {
8036 "$ref": "#/definitions/organization-app-permission/definitions/name"
8037 },
8038 "description": "An array of permissions to give to the collaborator."
8039 },
8040 "silent": {
8041 "$ref": "#/definitions/collaborator/definitions/silent"
8042 },
8043 "user": {
8044 "$ref": "#/definitions/account/definitions/identity"
8045 }
8046 },
8047 "required": [
8048 "user"
8049 ],
8050 "type": [
8051 "object"
8052 ]
8053 },
8054 "targetSchema": {
8055 "$ref": "#/definitions/organization-app-collaborator"
8056 },
8057 "title": "Create"
8058 },
8059 {
8060 "description": "Delete an existing collaborator from an organization app.",
8061 "href": "/organizations/apps/{(%23%2Fdefinitions%2Forganization-app%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Forganization-app-collaborator%2Fdefinitions%2Fidentity)}",
8062 "method": "DELETE",
8063 "rel": "destroy",
8064 "targetSchema": {
8065 "$ref": "#/definitions/organization-app-collaborator"
8066 },
8067 "title": "Delete"
8068 },
8069 {
8070 "description": "Info for a collaborator on an organization app.",
8071 "href": "/organizations/apps/{(%23%2Fdefinitions%2Forganization-app%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Forganization-app-collaborator%2Fdefinitions%2Fidentity)}",
8072 "method": "GET",
8073 "rel": "self",
8074 "targetSchema": {
8075 "$ref": "#/definitions/organization-app-collaborator"
8076 },
8077 "title": "Info"
8078 },
8079 {
8080 "description": "Update an existing collaborator from an organization app.",
8081 "href": "/organizations/apps/{(%23%2Fdefinitions%2Forganization-app%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Forganization-app-collaborator%2Fdefinitions%2Fidentity)}",
8082 "method": "PATCH",
8083 "rel": "update",
8084 "schema": {
8085 "properties": {
8086 "permissions": {
8087 "type": [
8088 "array"
8089 ],
8090 "items": {
8091 "$ref": "#/definitions/organization-app-permission/definitions/name"
8092 },
8093 "description": "An array of permissions to give to the collaborator."
8094 }
8095 },
8096 "required": [
8097 "permissions"
8098 ],
8099 "type": [
8100 "object"
8101 ]
8102 },
8103 "targetSchema": {
8104 "$ref": "#/definitions/organization-app-collaborator"
8105 },
8106 "title": "Update"
8107 },
8108 {
8109 "description": "List collaborators on an organization app.",
8110 "href": "/organizations/apps/{(%23%2Fdefinitions%2Forganization-app%2Fdefinitions%2Fidentity)}/collaborators",
8111 "method": "GET",
8112 "rel": "instances",
8113 "targetSchema": {
8114 "items": {
8115 "$ref": "#/definitions/organization-app-collaborator"
8116 },
8117 "type": [
8118 "array"
8119 ]
8120 },
8121 "title": "List"
8122 }
8123 ],
8124 "properties": {
8125 "app": {
8126 "description": "app collaborator belongs to",
8127 "properties": {
8128 "name": {
8129 "$ref": "#/definitions/app/definitions/name"
8130 },
8131 "id": {
8132 "$ref": "#/definitions/app/definitions/id"
8133 }
8134 },
8135 "strictProperties": true,
8136 "type": [
8137 "object"
8138 ]
8139 },
8140 "created_at": {
8141 "$ref": "#/definitions/collaborator/definitions/created_at"
8142 },
8143 "id": {
8144 "$ref": "#/definitions/collaborator/definitions/id"
8145 },
8146 "role": {
8147 "$ref": "#/definitions/organization/definitions/role"
8148 },
8149 "updated_at": {
8150 "$ref": "#/definitions/collaborator/definitions/updated_at"
8151 },
8152 "user": {
8153 "description": "identity of collaborated account",
8154 "properties": {
8155 "email": {
8156 "$ref": "#/definitions/account/definitions/email"
8157 },
8158 "federated": {
8159 "$ref": "#/definitions/account/definitions/federated"
8160 },
8161 "id": {
8162 "$ref": "#/definitions/account/definitions/id"
8163 }
8164 },
8165 "strictProperties": true,
8166 "type": [
8167 "object"
8168 ]
8169 }
8170 }
8171 },
8172 "organization-app": {
8173 "$schema": "http://json-schema.org/draft-04/hyper-schema",
8174 "description": "Deprecated: An organization app encapsulates the organization specific functionality of Heroku apps.",
8175 "stability": "prototype",
8176 "deprecated_at": "2017-04-10",
8177 "title": "Heroku Platform API - Organization App",
8178 "type": [
8179 "object"
8180 ],
8181 "definitions": {
8182 "locked": {
8183 "default": false,
8184 "description": "are other organization members forbidden from joining this app.",
8185 "example": false,
8186 "type": [
8187 "boolean"
8188 ]
8189 },
8190 "identity": {
8191 "anyOf": [
8192 {
8193 "$ref": "#/definitions/app/definitions/name"
8194 }
8195 ]
8196 },
8197 "joined": {
8198 "default": false,
8199 "description": "is the current member a collaborator on this app.",
8200 "example": false,
8201 "type": [
8202 "boolean"
8203 ]
8204 },
8205 "personal": {
8206 "default": false,
8207 "description": "force creation of the app in the user account even if a default org is set.",
8208 "example": false,
8209 "type": [
8210 "boolean"
8211 ]
8212 }
8213 },
8214 "links": [
8215 {
8216 "description": "Create a new app in the specified organization, in the default organization if unspecified, or in personal account, if default organization is not set.",
8217 "href": "/organizations/apps",
8218 "method": "POST",
8219 "rel": "create",
8220 "schema": {
8221 "properties": {
8222 "locked": {
8223 "$ref": "#/definitions/organization-app/definitions/locked"
8224 },
8225 "name": {
8226 "$ref": "#/definitions/app/definitions/name"
8227 },
8228 "organization": {
8229 "$ref": "#/definitions/organization/definitions/name"
8230 },
8231 "personal": {
8232 "$ref": "#/definitions/organization-app/definitions/personal"
8233 },
8234 "region": {
8235 "$ref": "#/definitions/region/definitions/name"
8236 },
8237 "space": {
8238 "$ref": "#/definitions/space/definitions/name"
8239 },
8240 "stack": {
8241 "$ref": "#/definitions/stack/definitions/name"
8242 }
8243 },
8244 "type": [
8245 "object"
8246 ]
8247 },
8248 "title": "Create"
8249 },
8250 {
8251 "description": "List organization apps.",
8252 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/apps",
8253 "method": "GET",
8254 "rel": "instances",
8255 "targetSchema": {
8256 "items": {
8257 "$ref": "#/definitions/organization-app"
8258 },
8259 "type": [
8260 "array"
8261 ]
8262 },
8263 "title": "List For Organization"
8264 },
8265 {
8266 "description": "Info for an organization app.",
8267 "href": "/organizations/apps/{(%23%2Fdefinitions%2Forganization-app%2Fdefinitions%2Fidentity)}",
8268 "method": "GET",
8269 "rel": "self",
8270 "title": "Info"
8271 },
8272 {
8273 "description": "Lock or unlock an organization app.",
8274 "href": "/organizations/apps/{(%23%2Fdefinitions%2Forganization-app%2Fdefinitions%2Fidentity)}",
8275 "method": "PATCH",
8276 "rel": "update",
8277 "schema": {
8278 "properties": {
8279 "locked": {
8280 "$ref": "#/definitions/organization-app/definitions/locked"
8281 }
8282 },
8283 "required": [
8284 "locked"
8285 ],
8286 "type": [
8287 "object"
8288 ]
8289 },
8290 "targetSchema": {
8291 "$ref": "#/definitions/organization-app"
8292 },
8293 "title": "Update Locked"
8294 },
8295 {
8296 "description": "Transfer an existing organization app to another Heroku account.",
8297 "href": "/organizations/apps/{(%23%2Fdefinitions%2Forganization-app%2Fdefinitions%2Fidentity)}",
8298 "method": "PATCH",
8299 "rel": "update",
8300 "schema": {
8301 "properties": {
8302 "owner": {
8303 "$ref": "#/definitions/account/definitions/identity"
8304 }
8305 },
8306 "required": [
8307 "owner"
8308 ],
8309 "type": [
8310 "object"
8311 ]
8312 },
8313 "title": "Transfer to Account"
8314 },
8315 {
8316 "description": "Transfer an existing organization app to another organization.",
8317 "href": "/organizations/apps/{(%23%2Fdefinitions%2Forganization-app%2Fdefinitions%2Fidentity)}",
8318 "method": "PATCH",
8319 "rel": "update",
8320 "schema": {
8321 "properties": {
8322 "owner": {
8323 "$ref": "#/definitions/organization/definitions/name"
8324 }
8325 },
8326 "required": [
8327 "owner"
8328 ],
8329 "type": [
8330 "object"
8331 ]
8332 },
8333 "targetSchema": {
8334 "$ref": "#/definitions/organization-app"
8335 },
8336 "title": "Transfer to Organization"
8337 }
8338 ],
8339 "properties": {
8340 "archived_at": {
8341 "$ref": "#/definitions/app/definitions/archived_at"
8342 },
8343 "buildpack_provided_description": {
8344 "$ref": "#/definitions/app/definitions/buildpack_provided_description"
8345 },
8346 "build_stack": {
8347 "description": "identity of the stack that will be used for new builds",
8348 "properties": {
8349 "id": {
8350 "$ref": "#/definitions/stack/definitions/id"
8351 },
8352 "name": {
8353 "$ref": "#/definitions/stack/definitions/name"
8354 }
8355 },
8356 "type": [
8357 "object"
8358 ]
8359 },
8360 "created_at": {
8361 "$ref": "#/definitions/app/definitions/created_at"
8362 },
8363 "git_url": {
8364 "$ref": "#/definitions/app/definitions/git_url"
8365 },
8366 "id": {
8367 "$ref": "#/definitions/app/definitions/id"
8368 },
8369 "joined": {
8370 "$ref": "#/definitions/organization-app/definitions/joined"
8371 },
8372 "locked": {
8373 "$ref": "#/definitions/organization-app/definitions/locked"
8374 },
8375 "maintenance": {
8376 "$ref": "#/definitions/app/definitions/maintenance"
8377 },
8378 "name": {
8379 "$ref": "#/definitions/app/definitions/name"
8380 },
8381 "organization": {
8382 "description": "organization that owns this app",
8383 "properties": {
8384 "name": {
8385 "$ref": "#/definitions/organization/definitions/name"
8386 }
8387 },
8388 "type": [
8389 "null",
8390 "object"
8391 ]
8392 },
8393 "owner": {
8394 "description": "identity of app owner",
8395 "properties": {
8396 "email": {
8397 "$ref": "#/definitions/account/definitions/email"
8398 },
8399 "id": {
8400 "$ref": "#/definitions/account/definitions/id"
8401 }
8402 },
8403 "type": [
8404 "null",
8405 "object"
8406 ]
8407 },
8408 "region": {
8409 "description": "identity of app region",
8410 "properties": {
8411 "id": {
8412 "$ref": "#/definitions/region/definitions/id"
8413 },
8414 "name": {
8415 "$ref": "#/definitions/region/definitions/name"
8416 }
8417 },
8418 "type": [
8419 "object"
8420 ]
8421 },
8422 "released_at": {
8423 "$ref": "#/definitions/app/definitions/released_at"
8424 },
8425 "repo_size": {
8426 "$ref": "#/definitions/app/definitions/repo_size"
8427 },
8428 "slug_size": {
8429 "$ref": "#/definitions/app/definitions/slug_size"
8430 },
8431 "space": {
8432 "description": "identity of space",
8433 "properties": {
8434 "id": {
8435 "$ref": "#/definitions/space/definitions/id"
8436 },
8437 "name": {
8438 "$ref": "#/definitions/space/definitions/name"
8439 }
8440 },
8441 "type": [
8442 "null",
8443 "object"
8444 ]
8445 },
8446 "stack": {
8447 "description": "identity of app stack",
8448 "properties": {
8449 "id": {
8450 "$ref": "#/definitions/stack/definitions/id"
8451 },
8452 "name": {
8453 "$ref": "#/definitions/stack/definitions/name"
8454 }
8455 },
8456 "type": [
8457 "object"
8458 ]
8459 },
8460 "updated_at": {
8461 "$ref": "#/definitions/app/definitions/updated_at"
8462 },
8463 "web_url": {
8464 "$ref": "#/definitions/app/definitions/web_url"
8465 }
8466 }
8467 },
8468 "organization-feature": {
8469 "description": "Deprecated: An organization feature represents a feature enabled on an organization account.",
8470 "$schema": "http://json-schema.org/draft-04/hyper-schema",
8471 "stability": "prototype",
8472 "deprecated_at": "2017-04-10",
8473 "strictProperties": true,
8474 "title": "Heroku Platform API - Organization Feature",
8475 "type": [
8476 "object"
8477 ],
8478 "definitions": {
8479 "created_at": {
8480 "description": "when organization feature was created",
8481 "example": "2012-01-01T12:00:00Z",
8482 "format": "date-time",
8483 "readOnly": true,
8484 "type": [
8485 "string"
8486 ]
8487 },
8488 "description": {
8489 "description": "description of organization feature",
8490 "example": "Causes account to example.",
8491 "readOnly": true,
8492 "type": [
8493 "string"
8494 ]
8495 },
8496 "doc_url": {
8497 "description": "documentation URL of organization feature",
8498 "example": "http://devcenter.heroku.com/articles/example",
8499 "readOnly": true,
8500 "type": [
8501 "string"
8502 ]
8503 },
8504 "enabled": {
8505 "description": "whether or not organization feature has been enabled",
8506 "example": true,
8507 "readOnly": false,
8508 "type": [
8509 "boolean"
8510 ]
8511 },
8512 "id": {
8513 "description": "unique identifier of organization feature",
8514 "example": "01234567-89ab-cdef-0123-456789abcdef",
8515 "format": "uuid",
8516 "readOnly": true,
8517 "type": [
8518 "string"
8519 ]
8520 },
8521 "identity": {
8522 "anyOf": [
8523 {
8524 "$ref": "#/definitions/organization-feature/definitions/id"
8525 },
8526 {
8527 "$ref": "#/definitions/organization-feature/definitions/name"
8528 }
8529 ]
8530 },
8531 "name": {
8532 "description": "unique name of organization feature",
8533 "example": "name",
8534 "readOnly": true,
8535 "type": [
8536 "string"
8537 ]
8538 },
8539 "state": {
8540 "description": "state of organization feature",
8541 "example": "public",
8542 "readOnly": true,
8543 "type": [
8544 "string"
8545 ]
8546 },
8547 "updated_at": {
8548 "description": "when organization feature was updated",
8549 "example": "2012-01-01T12:00:00Z",
8550 "format": "date-time",
8551 "readOnly": true,
8552 "type": [
8553 "string"
8554 ]
8555 },
8556 "display_name": {
8557 "description": "user readable feature name",
8558 "example": "My Feature",
8559 "readOnly": true,
8560 "type": [
8561 "string"
8562 ]
8563 },
8564 "feedback_email": {
8565 "description": "e-mail to send feedback about the feature",
8566 "example": "feedback@heroku.com",
8567 "readOnly": true,
8568 "type": [
8569 "string"
8570 ]
8571 }
8572 },
8573 "links": [
8574 {
8575 "description": "Info for an existing organization feature.",
8576 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/features/{(%23%2Fdefinitions%2Forganization-feature%2Fdefinitions%2Fidentity)}",
8577 "method": "GET",
8578 "rel": "self",
8579 "targetSchema": {
8580 "$ref": "#/definitions/organization-feature"
8581 },
8582 "title": "Info"
8583 },
8584 {
8585 "description": "List existing organization features.",
8586 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/features",
8587 "method": "GET",
8588 "rel": "instances",
8589 "targetSchema": {
8590 "items": {
8591 "$ref": "#/definitions/organization-feature"
8592 },
8593 "type": [
8594 "array"
8595 ]
8596 },
8597 "title": "List"
8598 },
8599 {
8600 "description": "Update an existing organization feature.",
8601 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/features/{(%23%2Fdefinitions%2Forganization-feature%2Fdefinitions%2Fidentity)}",
8602 "method": "PATCH",
8603 "rel": "update",
8604 "schema": {
8605 "properties": {
8606 "enabled": {
8607 "$ref": "#/definitions/organization-feature/definitions/enabled"
8608 }
8609 },
8610 "required": [
8611 "enabled"
8612 ],
8613 "type": [
8614 "object"
8615 ]
8616 },
8617 "targetSchema": {
8618 "$ref": "#/definitions/organization-feature"
8619 },
8620 "title": "Update"
8621 }
8622 ],
8623 "properties": {
8624 "created_at": {
8625 "$ref": "#/definitions/organization-feature/definitions/created_at"
8626 },
8627 "description": {
8628 "$ref": "#/definitions/organization-feature/definitions/description"
8629 },
8630 "doc_url": {
8631 "$ref": "#/definitions/organization-feature/definitions/doc_url"
8632 },
8633 "enabled": {
8634 "$ref": "#/definitions/organization-feature/definitions/enabled"
8635 },
8636 "id": {
8637 "$ref": "#/definitions/organization-feature/definitions/id"
8638 },
8639 "name": {
8640 "$ref": "#/definitions/organization-feature/definitions/name"
8641 },
8642 "state": {
8643 "$ref": "#/definitions/organization-feature/definitions/state"
8644 },
8645 "updated_at": {
8646 "$ref": "#/definitions/organization-feature/definitions/updated_at"
8647 },
8648 "display_name": {
8649 "$ref": "#/definitions/organization-feature/definitions/display_name"
8650 },
8651 "feedback_email": {
8652 "$ref": "#/definitions/organization-feature/definitions/feedback_email"
8653 }
8654 }
8655 },
8656 "organization-invitation": {
8657 "description": "Deprecated: An organization invitation represents an invite to an organization.",
8658 "$schema": "http://json-schema.org/draft-04/hyper-schema",
8659 "stability": "prototype",
8660 "deprecated_at": "2017-04-10",
8661 "strictProperties": true,
8662 "title": "Heroku Platform API - Organization Invitation",
8663 "type": [
8664 "object"
8665 ],
8666 "definitions": {
8667 "created_at": {
8668 "description": "when invitation was created",
8669 "example": "2012-01-01T12:00:00Z",
8670 "format": "date-time",
8671 "readOnly": true,
8672 "type": [
8673 "string"
8674 ]
8675 },
8676 "identity": {
8677 "anyOf": [
8678 {
8679 "$ref": "#/definitions/organization-invitation/definitions/id"
8680 }
8681 ]
8682 },
8683 "id": {
8684 "description": "Unique identifier of an invitation",
8685 "example": "01234567-89ab-cdef-0123-456789abcdef",
8686 "format": "uuid",
8687 "readOnly": true,
8688 "type": [
8689 "string"
8690 ]
8691 },
8692 "token": {
8693 "description": "Special token for invitation",
8694 "example": "614ae25aa2d4802096cd7c18625b526c",
8695 "readOnly": true,
8696 "type": [
8697 "string"
8698 ]
8699 },
8700 "updated_at": {
8701 "description": "when invitation was updated",
8702 "example": "2012-01-01T12:00:00Z",
8703 "format": "date-time",
8704 "readOnly": true,
8705 "type": [
8706 "string"
8707 ]
8708 }
8709 },
8710 "links": [
8711 {
8712 "description": "Get a list of an organization's Identity Providers",
8713 "title": "List",
8714 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fname)}/invitations",
8715 "method": "GET",
8716 "rel": "instances",
8717 "targetSchema": {
8718 "items": {
8719 "$ref": "#/definitions/organization-invitation"
8720 },
8721 "type": [
8722 "array"
8723 ]
8724 }
8725 },
8726 {
8727 "description": "Create Organization Invitation",
8728 "title": "Create",
8729 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/invitations",
8730 "method": "PUT",
8731 "rel": "update",
8732 "schema": {
8733 "properties": {
8734 "email": {
8735 "$ref": "#/definitions/account/definitions/email"
8736 },
8737 "role": {
8738 "$ref": "#/definitions/organization/definitions/role"
8739 }
8740 },
8741 "required": [
8742 "email",
8743 "role"
8744 ],
8745 "type": [
8746 "object"
8747 ]
8748 }
8749 },
8750 {
8751 "description": "Revoke an organization invitation.",
8752 "title": "Revoke",
8753 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/invitations/{(%23%2Fdefinitions%2Forganization-invitation%2Fdefinitions%2Fidentity)}",
8754 "method": "DELETE",
8755 "rel": "self"
8756 },
8757 {
8758 "description": "Get an invitation by its token",
8759 "title": "Get",
8760 "href": "/organizations/invitations/{(%23%2Fdefinitions%2Forganization-invitation%2Fdefinitions%2Ftoken)}",
8761 "method": "GET",
8762 "rel": "instances",
8763 "targetSchema": {
8764 "$ref": "#/definitions/organization-invitation"
8765 }
8766 },
8767 {
8768 "description": "Accept Organization Invitation",
8769 "title": "Accept",
8770 "href": "/organizations/invitations/{(%23%2Fdefinitions%2Forganization-invitation%2Fdefinitions%2Ftoken)}/accept",
8771 "method": "POST",
8772 "rel": "create",
8773 "targetSchema": {
8774 "$ref": "#/definitions/organization-member"
8775 }
8776 }
8777 ],
8778 "properties": {
8779 "created_at": {
8780 "$ref": "#/definitions/organization-invitation/definitions/created_at"
8781 },
8782 "id": {
8783 "$ref": "#/definitions/organization-invitation/definitions/id"
8784 },
8785 "invited_by": {
8786 "properties": {
8787 "email": {
8788 "$ref": "#/definitions/account/definitions/email"
8789 },
8790 "id": {
8791 "$ref": "#/definitions/account/definitions/id"
8792 },
8793 "name": {
8794 "$ref": "#/definitions/account/definitions/name"
8795 }
8796 },
8797 "strictProperties": true,
8798 "type": [
8799 "object"
8800 ]
8801 },
8802 "organization": {
8803 "properties": {
8804 "id": {
8805 "$ref": "#/definitions/organization/definitions/id"
8806 },
8807 "name": {
8808 "$ref": "#/definitions/organization/definitions/name"
8809 }
8810 },
8811 "strictProperties": true,
8812 "type": [
8813 "object"
8814 ]
8815 },
8816 "role": {
8817 "$ref": "#/definitions/organization/definitions/role"
8818 },
8819 "updated_at": {
8820 "$ref": "#/definitions/organization-invitation/definitions/updated_at"
8821 },
8822 "user": {
8823 "properties": {
8824 "email": {
8825 "$ref": "#/definitions/account/definitions/email"
8826 },
8827 "id": {
8828 "$ref": "#/definitions/account/definitions/id"
8829 },
8830 "name": {
8831 "$ref": "#/definitions/account/definitions/name"
8832 }
8833 },
8834 "strictProperties": true,
8835 "type": [
8836 "object"
8837 ]
8838 }
8839 }
8840 },
8841 "organization-invoice": {
8842 "$schema": "http://json-schema.org/draft-04/hyper-schema",
8843 "description": "Deprecated: An organization invoice is an itemized bill of goods for an organization which includes pricing and charges.",
8844 "stability": "prototype",
8845 "deprecated_at": "2017-04-10",
8846 "strictProperties": true,
8847 "title": "Heroku Platform API - Organization Invoice",
8848 "type": [
8849 "object"
8850 ],
8851 "definitions": {
8852 "addons_total": {
8853 "description": "total add-ons charges in on this invoice",
8854 "example": 25000,
8855 "readOnly": true,
8856 "type": [
8857 "integer"
8858 ]
8859 },
8860 "database_total": {
8861 "description": "total database charges on this invoice",
8862 "example": 25000,
8863 "readOnly": true,
8864 "type": [
8865 "integer"
8866 ]
8867 },
8868 "charges_total": {
8869 "description": "total charges on this invoice",
8870 "example": 0,
8871 "readOnly": true,
8872 "type": [
8873 "integer"
8874 ]
8875 },
8876 "created_at": {
8877 "description": "when invoice was created",
8878 "example": "2012-01-01T12:00:00Z",
8879 "format": "date-time",
8880 "readOnly": true,
8881 "type": [
8882 "string"
8883 ]
8884 },
8885 "credits_total": {
8886 "description": "total credits on this invoice",
8887 "example": 100000,
8888 "readOnly": true,
8889 "type": [
8890 "integer"
8891 ]
8892 },
8893 "dyno_units": {
8894 "description": "The total amount of dyno units consumed across dyno types.",
8895 "example": 1.92,
8896 "readOnly": true,
8897 "type": [
8898 "number"
8899 ]
8900 },
8901 "id": {
8902 "description": "unique identifier of this invoice",
8903 "example": "01234567-89ab-cdef-0123-456789abcdef",
8904 "format": "uuid",
8905 "readOnly": true,
8906 "type": [
8907 "string"
8908 ]
8909 },
8910 "identity": {
8911 "anyOf": [
8912 {
8913 "$ref": "#/definitions/organization-invoice/definitions/number"
8914 }
8915 ]
8916 },
8917 "number": {
8918 "description": "human readable invoice number",
8919 "example": 9403943,
8920 "readOnly": true,
8921 "type": [
8922 "integer"
8923 ]
8924 },
8925 "payment_status": {
8926 "description": "Status of the invoice payment.",
8927 "example": "Paid",
8928 "readOnly": true,
8929 "type": [
8930 "string"
8931 ]
8932 },
8933 "platform_total": {
8934 "description": "total platform charges on this invoice",
8935 "example": 50000,
8936 "readOnly": true,
8937 "type": [
8938 "integer"
8939 ]
8940 },
8941 "period_end": {
8942 "description": "the ending date that the invoice covers",
8943 "example": "01/31/2014",
8944 "readOnly": true,
8945 "type": [
8946 "string"
8947 ]
8948 },
8949 "period_start": {
8950 "description": "the starting date that this invoice covers",
8951 "example": "01/01/2014",
8952 "readOnly": true,
8953 "type": [
8954 "string"
8955 ]
8956 },
8957 "state": {
8958 "description": "payment status for this invoice (pending, successful, failed)",
8959 "example": 1,
8960 "readOnly": true,
8961 "type": [
8962 "integer"
8963 ]
8964 },
8965 "total": {
8966 "description": "combined total of charges and credits on this invoice",
8967 "example": 100000,
8968 "readOnly": true,
8969 "type": [
8970 "integer"
8971 ]
8972 },
8973 "updated_at": {
8974 "description": "when invoice was updated",
8975 "example": "2012-01-01T12:00:00Z",
8976 "format": "date-time",
8977 "readOnly": true,
8978 "type": [
8979 "string"
8980 ]
8981 },
8982 "weighted_dyno_hours": {
8983 "description": "The total amount of hours consumed across dyno types.",
8984 "example": 1488,
8985 "readOnly": true,
8986 "type": [
8987 "number"
8988 ]
8989 }
8990 },
8991 "links": [
8992 {
8993 "description": "Info for existing invoice.",
8994 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/invoices/{(%23%2Fdefinitions%2Forganization-invoice%2Fdefinitions%2Fidentity)}",
8995 "method": "GET",
8996 "rel": "self",
8997 "targetSchema": {
8998 "$ref": "#/definitions/organization-invoice"
8999 },
9000 "title": "Info"
9001 },
9002 {
9003 "description": "List existing invoices.",
9004 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/invoices",
9005 "method": "GET",
9006 "rel": "instances",
9007 "targetSchema": {
9008 "items": {
9009 "$ref": "#/definitions/organization-invoice"
9010 },
9011 "type": [
9012 "array"
9013 ]
9014 },
9015 "title": "List"
9016 }
9017 ],
9018 "properties": {
9019 "addons_total": {
9020 "$ref": "#/definitions/organization-invoice/definitions/addons_total"
9021 },
9022 "database_total": {
9023 "$ref": "#/definitions/organization-invoice/definitions/database_total"
9024 },
9025 "charges_total": {
9026 "$ref": "#/definitions/organization-invoice/definitions/charges_total"
9027 },
9028 "created_at": {
9029 "$ref": "#/definitions/organization-invoice/definitions/created_at"
9030 },
9031 "credits_total": {
9032 "$ref": "#/definitions/organization-invoice/definitions/credits_total"
9033 },
9034 "dyno_units": {
9035 "$ref": "#/definitions/organization-invoice/definitions/dyno_units"
9036 },
9037 "id": {
9038 "$ref": "#/definitions/organization-invoice/definitions/id"
9039 },
9040 "number": {
9041 "$ref": "#/definitions/organization-invoice/definitions/number"
9042 },
9043 "payment_status": {
9044 "$ref": "#/definitions/organization-invoice/definitions/payment_status"
9045 },
9046 "period_end": {
9047 "$ref": "#/definitions/organization-invoice/definitions/period_end"
9048 },
9049 "period_start": {
9050 "$ref": "#/definitions/organization-invoice/definitions/period_start"
9051 },
9052 "platform_total": {
9053 "$ref": "#/definitions/organization-invoice/definitions/platform_total"
9054 },
9055 "state": {
9056 "$ref": "#/definitions/organization-invoice/definitions/state"
9057 },
9058 "total": {
9059 "$ref": "#/definitions/organization-invoice/definitions/total"
9060 },
9061 "updated_at": {
9062 "$ref": "#/definitions/organization-invoice/definitions/updated_at"
9063 },
9064 "weighted_dyno_hours": {
9065 "$ref": "#/definitions/organization-invoice/definitions/weighted_dyno_hours"
9066 }
9067 }
9068 },
9069 "organization-member": {
9070 "$schema": "http://json-schema.org/draft-04/hyper-schema",
9071 "description": "Deprecated: An organization member is an individual with access to an organization.",
9072 "stability": "prototype",
9073 "deprecated_at": "2017-04-10",
9074 "additionalProperties": false,
9075 "required": [
9076 "created_at",
9077 "email",
9078 "federated",
9079 "updated_at"
9080 ],
9081 "title": "Heroku Platform API - Organization Member",
9082 "type": [
9083 "object"
9084 ],
9085 "definitions": {
9086 "created_at": {
9087 "description": "when the membership record was created",
9088 "example": "2012-01-01T12:00:00Z",
9089 "format": "date-time",
9090 "readOnly": true,
9091 "type": [
9092 "string"
9093 ]
9094 },
9095 "email": {
9096 "description": "email address of the organization member",
9097 "example": "someone@example.org",
9098 "readOnly": true,
9099 "type": [
9100 "string"
9101 ]
9102 },
9103 "federated": {
9104 "description": "whether the user is federated and belongs to an Identity Provider",
9105 "example": false,
9106 "readOnly": true,
9107 "type": [
9108 "boolean"
9109 ]
9110 },
9111 "id": {
9112 "description": "unique identifier of organization member",
9113 "example": "01234567-89ab-cdef-0123-456789abcdef",
9114 "format": "uuid",
9115 "readOnly": true,
9116 "type": [
9117 "string"
9118 ]
9119 },
9120 "identity": {
9121 "anyOf": [
9122 {
9123 "$ref": "#/definitions/organization-member/definitions/email"
9124 },
9125 {
9126 "$ref": "#/definitions/organization-member/definitions/id"
9127 }
9128 ]
9129 },
9130 "name": {
9131 "description": "full name of the organization member",
9132 "example": "Tina Edmonds",
9133 "readOnly": true,
9134 "type": [
9135 "string",
9136 "null"
9137 ]
9138 },
9139 "two_factor_authentication": {
9140 "description": "whether the Enterprise organization member has two factor authentication enabled",
9141 "example": true,
9142 "readOnly": true,
9143 "type": [
9144 "boolean"
9145 ]
9146 },
9147 "updated_at": {
9148 "description": "when the membership record was updated",
9149 "example": "2012-01-01T12:00:00Z",
9150 "format": "date-time",
9151 "readOnly": true,
9152 "type": [
9153 "string"
9154 ]
9155 }
9156 },
9157 "links": [
9158 {
9159 "description": "Create a new organization member, or update their role.",
9160 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/members",
9161 "method": "PUT",
9162 "rel": "create",
9163 "schema": {
9164 "properties": {
9165 "email": {
9166 "$ref": "#/definitions/organization-member/definitions/email"
9167 },
9168 "federated": {
9169 "$ref": "#/definitions/organization-member/definitions/federated"
9170 },
9171 "role": {
9172 "$ref": "#/definitions/organization/definitions/role"
9173 }
9174 },
9175 "required": [
9176 "email",
9177 "role"
9178 ],
9179 "type": [
9180 "object"
9181 ]
9182 },
9183 "targetSchema": {
9184 "$ref": "#/definitions/organization-member"
9185 },
9186 "title": "Create or Update"
9187 },
9188 {
9189 "description": "Create a new organization member.",
9190 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/members",
9191 "method": "POST",
9192 "rel": "create",
9193 "schema": {
9194 "properties": {
9195 "email": {
9196 "$ref": "#/definitions/organization-member/definitions/email"
9197 },
9198 "federated": {
9199 "$ref": "#/definitions/organization-member/definitions/federated"
9200 },
9201 "role": {
9202 "$ref": "#/definitions/organization/definitions/role"
9203 }
9204 },
9205 "required": [
9206 "email",
9207 "role"
9208 ],
9209 "type": [
9210 "object"
9211 ]
9212 },
9213 "targetSchema": {
9214 "$ref": "#/definitions/organization-member"
9215 },
9216 "title": "Create"
9217 },
9218 {
9219 "description": "Update an organization member.",
9220 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/members",
9221 "method": "PATCH",
9222 "rel": "update",
9223 "schema": {
9224 "properties": {
9225 "email": {
9226 "$ref": "#/definitions/organization-member/definitions/email"
9227 },
9228 "federated": {
9229 "$ref": "#/definitions/organization-member/definitions/federated"
9230 },
9231 "role": {
9232 "$ref": "#/definitions/organization/definitions/role"
9233 }
9234 },
9235 "required": [
9236 "email",
9237 "role"
9238 ],
9239 "type": [
9240 "object"
9241 ]
9242 },
9243 "targetSchema": {
9244 "$ref": "#/definitions/organization-member"
9245 },
9246 "title": "update"
9247 },
9248 {
9249 "description": "Remove a member from the organization.",
9250 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/members/{(%23%2Fdefinitions%2Forganization-member%2Fdefinitions%2Fidentity)}",
9251 "method": "DELETE",
9252 "rel": "destroy",
9253 "targetSchema": {
9254 "$ref": "#/definitions/organization-member"
9255 },
9256 "title": "Delete"
9257 },
9258 {
9259 "description": "List members of the organization.",
9260 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/members",
9261 "method": "GET",
9262 "ranges": [
9263 "email"
9264 ],
9265 "rel": "instances",
9266 "targetSchema": {
9267 "items": {
9268 "$ref": "#/definitions/organization-member"
9269 },
9270 "type": [
9271 "array"
9272 ]
9273 },
9274 "title": "List"
9275 },
9276 {
9277 "description": "List the apps of a member.",
9278 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/members/{(%23%2Fdefinitions%2Forganization-member%2Fdefinitions%2Fidentity)}/apps",
9279 "method": "GET",
9280 "rel": "instances",
9281 "targetSchema": {
9282 "items": {
9283 "$ref": "#/definitions/organization-app"
9284 },
9285 "type": [
9286 "array"
9287 ]
9288 },
9289 "title": "App List"
9290 }
9291 ],
9292 "properties": {
9293 "created_at": {
9294 "$ref": "#/definitions/organization-member/definitions/created_at"
9295 },
9296 "email": {
9297 "$ref": "#/definitions/organization-member/definitions/email"
9298 },
9299 "federated": {
9300 "$ref": "#/definitions/organization-member/definitions/federated"
9301 },
9302 "id": {
9303 "$ref": "#/definitions/organization-member/definitions/id"
9304 },
9305 "role": {
9306 "$ref": "#/definitions/organization/definitions/role"
9307 },
9308 "two_factor_authentication": {
9309 "$ref": "#/definitions/organization-member/definitions/two_factor_authentication"
9310 },
9311 "updated_at": {
9312 "$ref": "#/definitions/organization-member/definitions/updated_at"
9313 },
9314 "user": {
9315 "description": "user information for the membership",
9316 "properties": {
9317 "email": {
9318 "$ref": "#/definitions/account/definitions/email"
9319 },
9320 "id": {
9321 "$ref": "#/definitions/account/definitions/id"
9322 },
9323 "name": {
9324 "$ref": "#/definitions/account/definitions/name"
9325 }
9326 },
9327 "strictProperties": true,
9328 "type": [
9329 "object"
9330 ]
9331 }
9332 }
9333 },
9334 "organization-preferences": {
9335 "description": "Deprecated: Tracks an organization's preferences",
9336 "$schema": "http://json-schema.org/draft-04/hyper-schema",
9337 "stability": "prototype",
9338 "deprecated_at": "2017-04-10",
9339 "strictProperties": true,
9340 "title": "Heroku Platform API - Organization Preferences",
9341 "type": [
9342 "object"
9343 ],
9344 "definitions": {
9345 "default-permission": {
9346 "description": "The default permission used when adding new members to the organization",
9347 "example": "member",
9348 "readOnly": false,
9349 "enum": [
9350 "admin",
9351 "member",
9352 "viewer",
9353 null
9354 ],
9355 "type": [
9356 "null",
9357 "string"
9358 ]
9359 },
9360 "identity": {
9361 "$ref": "#/definitions/organization/definitions/identity"
9362 },
9363 "whitelisting-enabled": {
9364 "description": "Whether whitelisting rules should be applied to add-on installations",
9365 "example": true,
9366 "readOnly": false,
9367 "type": [
9368 "boolean",
9369 "null"
9370 ]
9371 }
9372 },
9373 "links": [
9374 {
9375 "description": "Retrieve Organization Preferences",
9376 "href": "/organizations/{(%23%2Fdefinitions%2Forganization-preferences%2Fdefinitions%2Fidentity)}/preferences",
9377 "method": "GET",
9378 "rel": "self",
9379 "targetSchema": {
9380 "$ref": "#/definitions/organization-preferences"
9381 },
9382 "title": "List"
9383 },
9384 {
9385 "description": "Update Organization Preferences",
9386 "href": "/organizations/{(%23%2Fdefinitions%2Forganization-preferences%2Fdefinitions%2Fidentity)}/preferences",
9387 "method": "PATCH",
9388 "rel": "update",
9389 "schema": {
9390 "type": [
9391 "object"
9392 ],
9393 "properties": {
9394 "whitelisting-enabled": {
9395 "$ref": "#/definitions/organization-preferences/definitions/whitelisting-enabled"
9396 }
9397 }
9398 },
9399 "targetSchema": {
9400 "$ref": "#/definitions/organization-preferences"
9401 },
9402 "title": "Update"
9403 }
9404 ],
9405 "properties": {
9406 "default-permission": {
9407 "$ref": "#/definitions/organization-preferences/definitions/default-permission"
9408 },
9409 "whitelisting-enabled": {
9410 "$ref": "#/definitions/organization-preferences/definitions/whitelisting-enabled"
9411 }
9412 }
9413 },
9414 "organization": {
9415 "$schema": "http://json-schema.org/draft-04/hyper-schema",
9416 "description": "Deprecated: Organizations allow you to manage access to a shared group of applications across your development team.",
9417 "stability": "prototype",
9418 "deprecated_at": "2017-04-10",
9419 "strictProperties": true,
9420 "title": "Heroku Platform API - Organization",
9421 "type": [
9422 "object"
9423 ],
9424 "definitions": {
9425 "created_at": {
9426 "description": "when the organization was created",
9427 "example": "2012-01-01T12:00:00Z",
9428 "format": "date-time",
9429 "readOnly": true,
9430 "type": [
9431 "string"
9432 ]
9433 },
9434 "credit_card_collections": {
9435 "description": "whether charges incurred by the org are paid by credit card.",
9436 "example": true,
9437 "readOnly": true,
9438 "type": [
9439 "boolean"
9440 ]
9441 },
9442 "default": {
9443 "description": "whether to use this organization when none is specified",
9444 "example": true,
9445 "readOnly": false,
9446 "type": [
9447 "boolean"
9448 ]
9449 },
9450 "id": {
9451 "description": "unique identifier of organization",
9452 "example": "01234567-89ab-cdef-0123-456789abcdef",
9453 "format": "uuid",
9454 "readOnly": true,
9455 "type": [
9456 "string"
9457 ]
9458 },
9459 "identity": {
9460 "anyOf": [
9461 {
9462 "$ref": "#/definitions/organization/definitions/name"
9463 },
9464 {
9465 "$ref": "#/definitions/organization/definitions/id"
9466 }
9467 ]
9468 },
9469 "address_1": {
9470 "type": [
9471 "string"
9472 ],
9473 "description": "street address line 1",
9474 "example": "40 Hickory Lane"
9475 },
9476 "address_2": {
9477 "type": [
9478 "string"
9479 ],
9480 "description": "street address line 2",
9481 "example": "Suite 103"
9482 },
9483 "card_number": {
9484 "type": [
9485 "string"
9486 ],
9487 "description": "encrypted card number of payment method",
9488 "example": "encrypted-card-number"
9489 },
9490 "city": {
9491 "type": [
9492 "string"
9493 ],
9494 "description": "city",
9495 "example": "San Francisco"
9496 },
9497 "country": {
9498 "type": [
9499 "string"
9500 ],
9501 "description": "country",
9502 "example": "US"
9503 },
9504 "cvv": {
9505 "type": [
9506 "string"
9507 ],
9508 "description": "card verification value",
9509 "example": "123"
9510 },
9511 "expiration_month": {
9512 "type": [
9513 "string"
9514 ],
9515 "description": "expiration month",
9516 "example": "11"
9517 },
9518 "expiration_year": {
9519 "type": [
9520 "string"
9521 ],
9522 "description": "expiration year",
9523 "example": "2014"
9524 },
9525 "first_name": {
9526 "type": [
9527 "string"
9528 ],
9529 "description": "the first name for payment method",
9530 "example": "Jason"
9531 },
9532 "last_name": {
9533 "type": [
9534 "string"
9535 ],
9536 "description": "the last name for payment method",
9537 "example": "Walker"
9538 },
9539 "other": {
9540 "type": [
9541 "string"
9542 ],
9543 "description": "metadata",
9544 "example": "Additional information for payment method"
9545 },
9546 "postal_code": {
9547 "type": [
9548 "string"
9549 ],
9550 "description": "postal code",
9551 "example": "90210"
9552 },
9553 "state": {
9554 "type": [
9555 "string"
9556 ],
9557 "description": "state",
9558 "example": "CA"
9559 },
9560 "membership_limit": {
9561 "description": "upper limit of members allowed in an organization.",
9562 "example": 25,
9563 "readOnly": true,
9564 "type": [
9565 "number",
9566 "null"
9567 ]
9568 },
9569 "name": {
9570 "description": "unique name of organization",
9571 "example": "example",
9572 "readOnly": true,
9573 "type": [
9574 "string"
9575 ]
9576 },
9577 "provisioned_licenses": {
9578 "description": "whether the org is provisioned licenses by salesforce.",
9579 "example": true,
9580 "readOnly": true,
9581 "type": [
9582 "boolean"
9583 ]
9584 },
9585 "role": {
9586 "description": "role in the organization",
9587 "enum": [
9588 "admin",
9589 "collaborator",
9590 "member",
9591 "owner",
9592 null
9593 ],
9594 "example": "admin",
9595 "readOnly": true,
9596 "type": [
9597 "null",
9598 "string"
9599 ]
9600 },
9601 "type": {
9602 "description": "type of organization.",
9603 "example": "team",
9604 "enum": [
9605 "enterprise",
9606 "team"
9607 ],
9608 "readOnly": true,
9609 "type": [
9610 "string"
9611 ]
9612 },
9613 "updated_at": {
9614 "description": "when the organization was updated",
9615 "example": "2012-01-01T12:00:00Z",
9616 "format": "date-time",
9617 "readOnly": true,
9618 "type": [
9619 "string"
9620 ]
9621 }
9622 },
9623 "links": [
9624 {
9625 "description": "List organizations in which you are a member.",
9626 "href": "/organizations",
9627 "method": "GET",
9628 "rel": "instances",
9629 "targetSchema": {
9630 "items": {
9631 "$ref": "#/definitions/organization"
9632 },
9633 "type": [
9634 "array"
9635 ]
9636 },
9637 "title": "List"
9638 },
9639 {
9640 "description": "Info for an organization.",
9641 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}",
9642 "method": "GET",
9643 "rel": "self",
9644 "title": "Info"
9645 },
9646 {
9647 "description": "Update organization properties.",
9648 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}",
9649 "method": "PATCH",
9650 "rel": "update",
9651 "schema": {
9652 "properties": {
9653 "default": {
9654 "$ref": "#/definitions/organization/definitions/default"
9655 },
9656 "name": {
9657 "$ref": "#/definitions/organization/definitions/name"
9658 }
9659 },
9660 "type": [
9661 "object"
9662 ]
9663 },
9664 "targetSchema": {
9665 "$ref": "#/definitions/organization"
9666 },
9667 "title": "Update"
9668 },
9669 {
9670 "description": "Create a new organization.",
9671 "href": "/organizations",
9672 "method": "POST",
9673 "rel": "create",
9674 "schema": {
9675 "properties": {
9676 "name": {
9677 "$ref": "#/definitions/organization/definitions/name"
9678 },
9679 "address_1": {
9680 "$ref": "#/definitions/organization/definitions/address_1"
9681 },
9682 "address_2": {
9683 "$ref": "#/definitions/organization/definitions/address_2"
9684 },
9685 "card_number": {
9686 "$ref": "#/definitions/organization/definitions/card_number"
9687 },
9688 "city": {
9689 "$ref": "#/definitions/organization/definitions/city"
9690 },
9691 "country": {
9692 "$ref": "#/definitions/organization/definitions/country"
9693 },
9694 "cvv": {
9695 "$ref": "#/definitions/organization/definitions/cvv"
9696 },
9697 "expiration_month": {
9698 "$ref": "#/definitions/organization/definitions/expiration_month"
9699 },
9700 "expiration_year": {
9701 "$ref": "#/definitions/organization/definitions/expiration_year"
9702 },
9703 "first_name": {
9704 "$ref": "#/definitions/organization/definitions/first_name"
9705 },
9706 "last_name": {
9707 "$ref": "#/definitions/organization/definitions/last_name"
9708 },
9709 "other": {
9710 "$ref": "#/definitions/organization/definitions/other"
9711 },
9712 "postal_code": {
9713 "$ref": "#/definitions/organization/definitions/postal_code"
9714 },
9715 "state": {
9716 "$ref": "#/definitions/organization/definitions/state"
9717 }
9718 },
9719 "required": [
9720 "name"
9721 ],
9722 "type": [
9723 "object"
9724 ]
9725 },
9726 "targetSchema": {
9727 "$ref": "#/definitions/organization"
9728 },
9729 "title": "Create"
9730 },
9731 {
9732 "description": "Delete an existing organization.",
9733 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}",
9734 "method": "DELETE",
9735 "rel": "destroy",
9736 "targetSchema": {
9737 "$ref": "#/definitions/organization"
9738 },
9739 "title": "Delete"
9740 }
9741 ],
9742 "properties": {
9743 "id": {
9744 "$ref": "#/definitions/organization/definitions/id"
9745 },
9746 "created_at": {
9747 "$ref": "#/definitions/organization/definitions/created_at"
9748 },
9749 "credit_card_collections": {
9750 "$ref": "#/definitions/organization/definitions/credit_card_collections"
9751 },
9752 "default": {
9753 "$ref": "#/definitions/organization/definitions/default"
9754 },
9755 "membership_limit": {
9756 "$ref": "#/definitions/organization/definitions/membership_limit"
9757 },
9758 "name": {
9759 "$ref": "#/definitions/organization/definitions/name"
9760 },
9761 "provisioned_licenses": {
9762 "$ref": "#/definitions/organization/definitions/provisioned_licenses"
9763 },
9764 "role": {
9765 "$ref": "#/definitions/organization/definitions/role"
9766 },
9767 "type": {
9768 "$ref": "#/definitions/organization/definitions/type"
9769 },
9770 "updated_at": {
9771 "$ref": "#/definitions/organization/definitions/updated_at"
9772 }
9773 }
9774 },
9775 "outbound-ruleset": {
9776 "description": "An outbound-ruleset is a collection of rules that specify what hosts Dynos are allowed to communicate with. ",
9777 "$schema": "http://json-schema.org/draft-04/hyper-schema",
9778 "stability": "prototype",
9779 "strictProperties": true,
9780 "title": "Heroku Platform API - Outbound Ruleset",
9781 "type": [
9782 "object"
9783 ],
9784 "definitions": {
9785 "target": {
9786 "description": "is the target destination in CIDR notation",
9787 "example": "1.1.1.1/1",
9788 "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]))$",
9789 "readOnly": false,
9790 "type": [
9791 "string"
9792 ]
9793 },
9794 "created_at": {
9795 "description": "when outbound-ruleset was created",
9796 "example": "2012-01-01T12:00:00Z",
9797 "format": "date-time",
9798 "readOnly": true,
9799 "type": [
9800 "string"
9801 ]
9802 },
9803 "id": {
9804 "description": "unique identifier of an outbound-ruleset",
9805 "example": "01234567-89ab-cdef-0123-456789abcdef",
9806 "format": "uuid",
9807 "readOnly": true,
9808 "type": [
9809 "string"
9810 ]
9811 },
9812 "port": {
9813 "description": "an endpoint of communication in an operating system.",
9814 "example": 80,
9815 "readOnly": false,
9816 "type": [
9817 "integer"
9818 ]
9819 },
9820 "protocol": {
9821 "description": "formal standards and policies comprised of rules, procedures and formats that define communication between two or more devices over a network",
9822 "example": "tcp",
9823 "readOnly": false,
9824 "type": [
9825 "string"
9826 ]
9827 },
9828 "identity": {
9829 "anyOf": [
9830 {
9831 "$ref": "#/definitions/outbound-ruleset/definitions/id"
9832 }
9833 ]
9834 },
9835 "rule": {
9836 "description": "the combination of an IP address in CIDR notation, a from_port, to_port and protocol.",
9837 "type": [
9838 "object"
9839 ],
9840 "properties": {
9841 "target": {
9842 "$ref": "#/definitions/outbound-ruleset/definitions/target"
9843 },
9844 "from_port": {
9845 "$ref": "#/definitions/outbound-ruleset/definitions/port"
9846 },
9847 "to_port": {
9848 "$ref": "#/definitions/outbound-ruleset/definitions/port"
9849 },
9850 "protocol": {
9851 "$ref": "#/definitions/outbound-ruleset/definitions/protocol"
9852 }
9853 },
9854 "required": [
9855 "target",
9856 "from_port",
9857 "to_port",
9858 "protocol"
9859 ]
9860 }
9861 },
9862 "links": [
9863 {
9864 "description": "Current outbound ruleset for a space",
9865 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/outbound-ruleset",
9866 "method": "GET",
9867 "rel": "self",
9868 "targetSchema": {
9869 "$ref": "#/definitions/outbound-ruleset"
9870 },
9871 "title": "Current"
9872 },
9873 {
9874 "description": "Info on an existing Outbound Ruleset",
9875 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/outbound-rulesets/{(%23%2Fdefinitions%2Foutbound-ruleset%2Fdefinitions%2Fidentity)}",
9876 "method": "GET",
9877 "rel": "self",
9878 "targetSchema": {
9879 "$ref": "#/definitions/outbound-ruleset"
9880 },
9881 "title": "Info"
9882 },
9883 {
9884 "description": "List all Outbound Rulesets for a space",
9885 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/outbound-rulesets",
9886 "method": "GET",
9887 "rel": "instances",
9888 "targetSchema": {
9889 "items": {
9890 "$ref": "#/definitions/outbound-ruleset"
9891 },
9892 "type": [
9893 "array"
9894 ]
9895 },
9896 "title": "List"
9897 },
9898 {
9899 "description": "Create a new outbound ruleset",
9900 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/outbound-ruleset",
9901 "method": "PUT",
9902 "rel": "create",
9903 "schema": {
9904 "type": [
9905 "object"
9906 ],
9907 "properties": {
9908 "rules": {
9909 "type": [
9910 "array"
9911 ],
9912 "items": {
9913 "$ref": "#/definitions/outbound-ruleset/definitions/rule"
9914 }
9915 }
9916 }
9917 },
9918 "title": "Create"
9919 }
9920 ],
9921 "properties": {
9922 "id": {
9923 "$ref": "#/definitions/outbound-ruleset/definitions/id"
9924 },
9925 "space": {
9926 "description": "identity of space",
9927 "properties": {
9928 "id": {
9929 "$ref": "#/definitions/space/definitions/id"
9930 },
9931 "name": {
9932 "$ref": "#/definitions/space/definitions/name"
9933 }
9934 },
9935 "type": [
9936 "object"
9937 ]
9938 },
9939 "created_at": {
9940 "$ref": "#/definitions/outbound-ruleset/definitions/created_at"
9941 },
9942 "rules": {
9943 "type": [
9944 "array"
9945 ],
9946 "items": {
9947 "$ref": "#/definitions/outbound-ruleset/definitions/rule"
9948 }
9949 },
9950 "created_by": {
9951 "$ref": "#/definitions/account/definitions/email"
9952 }
9953 }
9954 },
9955 "password-reset": {
9956 "description": "A password reset represents a in-process password reset attempt.",
9957 "$schema": "http://json-schema.org/draft-04/hyper-schema",
9958 "stability": "production",
9959 "strictProperties": true,
9960 "title": "Heroku Platform API - PasswordReset",
9961 "type": [
9962 "object"
9963 ],
9964 "definitions": {
9965 "created_at": {
9966 "description": "when password reset was created",
9967 "example": "2012-01-01T12:00:00Z",
9968 "format": "date-time",
9969 "readOnly": true,
9970 "type": [
9971 "string"
9972 ]
9973 },
9974 "identity": {
9975 "anyOf": [
9976 {
9977 "$ref": "#/definitions/account/definitions/email"
9978 }
9979 ]
9980 },
9981 "password_confirmation": {
9982 "description": "confirmation of the new password",
9983 "example": "newpassword",
9984 "readOnly": true,
9985 "type": [
9986 "string"
9987 ]
9988 },
9989 "reset_password_token": {
9990 "description": "unique identifier of a password reset attempt",
9991 "example": "01234567-89ab-cdef-0123-456789abcdef",
9992 "format": "uuid",
9993 "readOnly": true,
9994 "type": [
9995 "string"
9996 ]
9997 }
9998 },
9999 "links": [
10000 {
10001 "description": "Reset account's password. This will send a reset password link to the user's email address.",
10002 "href": "/password-resets",
10003 "method": "POST",
10004 "rel": "self",
10005 "schema": {
10006 "properties": {
10007 "email": {
10008 "$ref": "#/definitions/account/definitions/email"
10009 }
10010 },
10011 "type": [
10012 "object"
10013 ]
10014 },
10015 "title": "Reset Password"
10016 },
10017 {
10018 "description": "Complete password reset.",
10019 "href": "/password-resets/{(%23%2Fdefinitions%2Fpassword-reset%2Fdefinitions%2Freset_password_token)}/actions/finalize",
10020 "method": "POST",
10021 "rel": "self",
10022 "schema": {
10023 "properties": {
10024 "password": {
10025 "$ref": "#/definitions/account/definitions/password"
10026 },
10027 "password_confirmation": {
10028 "$ref": "#/definitions/password-reset/definitions/password_confirmation"
10029 }
10030 },
10031 "type": [
10032 "object"
10033 ]
10034 },
10035 "title": "Complete Reset Password"
10036 }
10037 ],
10038 "properties": {
10039 "created_at": {
10040 "$ref": "#/definitions/password-reset/definitions/created_at"
10041 },
10042 "user": {
10043 "properties": {
10044 "email": {
10045 "$ref": "#/definitions/account/definitions/email"
10046 },
10047 "id": {
10048 "$ref": "#/definitions/account/definitions/id"
10049 }
10050 },
10051 "strictProperties": true,
10052 "type": [
10053 "object"
10054 ]
10055 }
10056 }
10057 },
10058 "peering-info": {
10059 "description": "[Peering Info](https://devcenter.heroku.com/articles/private-space-vpc-peering) gives you the information necessary to peer an AWS VPC to a Private Space.",
10060 "$schema": "http://json-schema.org/draft-04/hyper-schema",
10061 "stability": "prototype",
10062 "strictProperties": true,
10063 "title": "Heroku Platform API - Peering Info",
10064 "type": [
10065 "object"
10066 ],
10067 "properties": {
10068 "aws_account_id": {
10069 "$ref": "#/definitions/peering/definitions/aws_account_id"
10070 },
10071 "aws_region": {
10072 "$ref": "#/definitions/region/definitions/provider/properties/region"
10073 },
10074 "vpc_id": {
10075 "$ref": "#/definitions/peering/definitions/vpc_id"
10076 },
10077 "vpc_cidr": {
10078 "description": "The CIDR range of the Private Space VPC",
10079 "$ref": "#/definitions/peering/definitions/cidr"
10080 },
10081 "dyno_cidr_blocks": {
10082 "description": "The CIDR ranges that should be routed to the Private Space VPC.",
10083 "type": [
10084 "array"
10085 ],
10086 "items": {
10087 "$ref": "#/definitions/peering/definitions/cidr"
10088 }
10089 },
10090 "unavailable_cidr_blocks": {
10091 "description": "The CIDR ranges that you must not conflict with.",
10092 "type": [
10093 "array"
10094 ],
10095 "items": {
10096 "$ref": "#/definitions/peering/definitions/cidr"
10097 }
10098 },
10099 "space_cidr_blocks": {
10100 "description": "The CIDR ranges that should be routed to the Private Space VPC.",
10101 "type": [
10102 "array"
10103 ],
10104 "items": {
10105 "$ref": "#/definitions/peering/definitions/cidr"
10106 }
10107 }
10108 },
10109 "links": [
10110 {
10111 "description": "Provides the necessary information to establish an AWS VPC Peering with your private space.",
10112 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/peering-info",
10113 "method": "GET",
10114 "rel": "self",
10115 "targetSchema": {
10116 "$ref": "#/definitions/peering-info"
10117 },
10118 "title": "Info"
10119 }
10120 ]
10121 },
10122 "peering": {
10123 "description": "[Peering](https://devcenter.heroku.com/articles/private-space-vpc-peering) provides a way to peer your Private Space VPC to another AWS VPC.",
10124 "$schema": "http://json-schema.org/draft-04/hyper-schema",
10125 "stability": "prototype",
10126 "strictProperties": true,
10127 "title": "Heroku Platform API - Peering",
10128 "type": [
10129 "object"
10130 ],
10131 "definitions": {
10132 "aws_account_id": {
10133 "description": "The AWS account ID of your Private Space.",
10134 "example": "123456789012",
10135 "readOnly": true,
10136 "type": [
10137 "string"
10138 ]
10139 },
10140 "aws_region": {
10141 "description": "The AWS region of the peer connection.",
10142 "example": "us-east-1",
10143 "readOnly": true,
10144 "type": [
10145 "string"
10146 ]
10147 },
10148 "vpc_id": {
10149 "description": "The AWS VPC ID of the peer.",
10150 "example": "vpc-1234567890",
10151 "readOnly": true,
10152 "type": [
10153 "string"
10154 ]
10155 },
10156 "type": {
10157 "description": "The type of peering connection.",
10158 "example": "heroku-managed",
10159 "type": [
10160 "string"
10161 ],
10162 "enum": [
10163 "heroku-managed",
10164 "customer-managed",
10165 "unknown"
10166 ]
10167 },
10168 "status": {
10169 "description": "The status of the peering connection.",
10170 "example": "pending-acceptance",
10171 "enum": [
10172 "initiating-request",
10173 "pending-acceptance",
10174 "provisioning",
10175 "active",
10176 "failed",
10177 "expired",
10178 "rejected",
10179 "deleted"
10180 ],
10181 "type": [
10182 "string"
10183 ],
10184 "readOnly": true
10185 },
10186 "pcx_id": {
10187 "description": "The AWS VPC Peering Connection ID of the peering.",
10188 "example": "pcx-123456789012",
10189 "readOnly": true,
10190 "type": [
10191 "string"
10192 ]
10193 },
10194 "cidr": {
10195 "description": "An IP address and the number of significant bits that make up the routing or networking portion.",
10196 "example": "10.0.0.0/16",
10197 "type": [
10198 "string"
10199 ]
10200 },
10201 "expires": {
10202 "description": "When a peering connection will expire.",
10203 "example": "2020-01-01T12:00:00Z",
10204 "format": "date-time",
10205 "readOnly": true,
10206 "type": [
10207 "string"
10208 ]
10209 }
10210 },
10211 "properties": {
10212 "type": {
10213 "$ref": "#/definitions/peering/definitions/type"
10214 },
10215 "pcx_id": {
10216 "$ref": "#/definitions/peering/definitions/pcx_id"
10217 },
10218 "cidr_blocks": {
10219 "description": "The CIDR blocks of the peer.",
10220 "type": [
10221 "array"
10222 ],
10223 "items": {
10224 "$ref": "#/definitions/peering/definitions/cidr"
10225 }
10226 },
10227 "status": {
10228 "$ref": "#/definitions/peering/definitions/status"
10229 },
10230 "aws_vpc_id": {
10231 "$ref": "#/definitions/peering/definitions/vpc_id"
10232 },
10233 "aws_region": {
10234 "$ref": "#/definitions/peering/definitions/aws_region"
10235 },
10236 "aws_account_id": {
10237 "$ref": "#/definitions/peering/definitions/aws_account_id"
10238 },
10239 "expires": {
10240 "$ref": "#/definitions/peering/definitions/expires"
10241 }
10242 },
10243 "links": [
10244 {
10245 "description": "List peering connections of a private space.",
10246 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/peerings",
10247 "method": "GET",
10248 "rel": "instances",
10249 "targetSchema": {
10250 "items": {
10251 "$ref": "#/definitions/peering"
10252 },
10253 "type": [
10254 "array"
10255 ]
10256 },
10257 "title": "List"
10258 },
10259 {
10260 "description": "Accept a pending peering connection with a private space.",
10261 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/peerings/{(%23%2Fdefinitions%2Fpeering%2Fdefinitions%2Fpcx_id)}/actions/accept",
10262 "method": "POST",
10263 "rel": "empty",
10264 "title": "Accept"
10265 },
10266 {
10267 "description": "Destroy an active peering connection with a private space.",
10268 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/peerings/{(%23%2Fdefinitions%2Fpeering%2Fdefinitions%2Fpcx_id)}",
10269 "rel": "empty",
10270 "method": "DELETE",
10271 "title": "Destroy"
10272 },
10273 {
10274 "description": "Fetch information for existing peering connection",
10275 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/peerings/{(%23%2Fdefinitions%2Fpeering%2Fdefinitions%2Fpcx_id)}",
10276 "method": "GET",
10277 "rel": "self",
10278 "targetSchema": {
10279 "$ref": "#/definitions/peering"
10280 },
10281 "title": "Info"
10282 }
10283 ]
10284 },
10285 "organization-app-permission": {
10286 "$schema": "http://json-schema.org/draft-04/hyper-schema",
10287 "description": "Deprecated: An organization app permission is a behavior that is assigned to a user in an organization app.",
10288 "stability": "prototype",
10289 "deprecated_at": "2017-04-10",
10290 "title": "Heroku Platform API - Organization App Permission",
10291 "type": [
10292 "object"
10293 ],
10294 "definitions": {
10295 "identity": {
10296 "anyOf": [
10297 {
10298 "$ref": "#/definitions/organization-app-permission/definitions/name"
10299 }
10300 ]
10301 },
10302 "name": {
10303 "description": "The name of the app permission.",
10304 "example": "view",
10305 "readOnly": true,
10306 "type": [
10307 "string"
10308 ]
10309 },
10310 "description": {
10311 "description": "A description of what the app permission allows.",
10312 "example": "Can manage config, deploy, run commands and restart the app.",
10313 "readOnly": true,
10314 "type": [
10315 "string"
10316 ]
10317 }
10318 },
10319 "links": [
10320 {
10321 "description": "Lists permissions available to organizations.",
10322 "href": "/organizations/permissions",
10323 "method": "GET",
10324 "rel": "instances",
10325 "targetSchema": {
10326 "items": {
10327 "$ref": "#/definitions/organization-app-permission"
10328 },
10329 "type": [
10330 "array"
10331 ]
10332 },
10333 "title": "List"
10334 }
10335 ],
10336 "properties": {
10337 "name": {
10338 "$ref": "#/definitions/organization-app-permission/definitions/name"
10339 },
10340 "description": {
10341 "$ref": "#/definitions/organization-app-permission/definitions/description"
10342 }
10343 }
10344 },
10345 "pipeline-coupling": {
10346 "description": "Information about an app's coupling to a pipeline",
10347 "$schema": "http://json-schema.org/draft-04/hyper-schema",
10348 "stability": "prototype",
10349 "title": "Heroku Platform API - Pipeline Coupling",
10350 "type": [
10351 "object"
10352 ],
10353 "definitions": {
10354 "created_at": {
10355 "description": "when pipeline coupling was created",
10356 "example": "2012-01-01T12:00:00Z",
10357 "format": "date-time",
10358 "readOnly": true,
10359 "type": [
10360 "string"
10361 ]
10362 },
10363 "id": {
10364 "description": "unique identifier of pipeline coupling",
10365 "example": "01234567-89ab-cdef-0123-456789abcdef",
10366 "format": "uuid",
10367 "readOnly": true,
10368 "type": [
10369 "string"
10370 ]
10371 },
10372 "identity": {
10373 "anyOf": [
10374 {
10375 "$ref": "#/definitions/pipeline-coupling/definitions/id"
10376 }
10377 ]
10378 },
10379 "stage": {
10380 "description": "target pipeline stage",
10381 "example": "production",
10382 "enum": [
10383 "test",
10384 "review",
10385 "development",
10386 "staging",
10387 "production"
10388 ],
10389 "type": [
10390 "string"
10391 ]
10392 },
10393 "updated_at": {
10394 "description": "when pipeline coupling was updated",
10395 "example": "2012-01-01T12:00:00Z",
10396 "format": "date-time",
10397 "readOnly": true,
10398 "type": [
10399 "string"
10400 ]
10401 }
10402 },
10403 "links": [
10404 {
10405 "description": "List couplings for a pipeline",
10406 "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/pipeline-couplings",
10407 "method": "GET",
10408 "rel": "instances",
10409 "targetSchema": {
10410 "items": {
10411 "$ref": "#/definitions/pipeline-coupling"
10412 },
10413 "type": [
10414 "array"
10415 ]
10416 },
10417 "title": "List By Pipeline"
10418 },
10419 {
10420 "description": "List pipeline couplings for the current user.",
10421 "href": "/users/~/pipeline-couplings",
10422 "method": "GET",
10423 "rel": "instances",
10424 "targetSchema": {
10425 "items": {
10426 "$ref": "#/definitions/pipeline-coupling"
10427 },
10428 "type": [
10429 "array"
10430 ]
10431 },
10432 "title": "List For Current User"
10433 },
10434 {
10435 "description": "List pipeline couplings.",
10436 "href": "/pipeline-couplings",
10437 "method": "GET",
10438 "rel": "instances",
10439 "targetSchema": {
10440 "items": {
10441 "$ref": "#/definitions/pipeline-coupling"
10442 },
10443 "type": [
10444 "array"
10445 ]
10446 },
10447 "title": "List"
10448 },
10449 {
10450 "description": "Create a new pipeline coupling.",
10451 "href": "/pipeline-couplings",
10452 "method": "POST",
10453 "rel": "create",
10454 "schema": {
10455 "properties": {
10456 "app": {
10457 "$ref": "#/definitions/app/definitions/identity"
10458 },
10459 "pipeline": {
10460 "$ref": "#/definitions/pipeline/definitions/id"
10461 },
10462 "stage": {
10463 "$ref": "#/definitions/pipeline-coupling/definitions/stage"
10464 }
10465 },
10466 "required": [
10467 "app",
10468 "pipeline",
10469 "stage"
10470 ],
10471 "type": [
10472 "object"
10473 ]
10474 },
10475 "targetSchema": {
10476 "$ref": "#/definitions/pipeline-coupling"
10477 },
10478 "title": "Create"
10479 },
10480 {
10481 "description": "Info for an existing pipeline coupling.",
10482 "href": "/pipeline-couplings/{(%23%2Fdefinitions%2Fpipeline-coupling%2Fdefinitions%2Fidentity)}",
10483 "method": "GET",
10484 "rel": "self",
10485 "targetSchema": {
10486 "$ref": "#/definitions/pipeline-coupling"
10487 },
10488 "title": "Info"
10489 },
10490 {
10491 "description": "Delete an existing pipeline coupling.",
10492 "href": "/pipeline-couplings/{(%23%2Fdefinitions%2Fpipeline-coupling%2Fdefinitions%2Fidentity)}",
10493 "method": "DELETE",
10494 "rel": "delete",
10495 "targetSchema": {
10496 "$ref": "#/definitions/pipeline-coupling"
10497 },
10498 "title": "Delete"
10499 },
10500 {
10501 "description": "Update an existing pipeline coupling.",
10502 "href": "/pipeline-couplings/{(%23%2Fdefinitions%2Fpipeline-coupling%2Fdefinitions%2Fidentity)}",
10503 "method": "PATCH",
10504 "rel": "update",
10505 "schema": {
10506 "properties": {
10507 "stage": {
10508 "$ref": "#/definitions/pipeline-coupling/definitions/stage"
10509 }
10510 },
10511 "type": [
10512 "object"
10513 ]
10514 },
10515 "targetSchema": {
10516 "$ref": "#/definitions/pipeline-coupling"
10517 },
10518 "title": "Update"
10519 },
10520 {
10521 "description": "Info for an existing app pipeline coupling.",
10522 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/pipeline-couplings",
10523 "method": "GET",
10524 "rel": "self",
10525 "targetSchema": {
10526 "$ref": "#/definitions/pipeline-coupling"
10527 },
10528 "title": "Info By App"
10529 }
10530 ],
10531 "properties": {
10532 "app": {
10533 "description": "app involved in the pipeline coupling",
10534 "properties": {
10535 "id": {
10536 "$ref": "#/definitions/app/definitions/id"
10537 }
10538 },
10539 "type": [
10540 "object"
10541 ]
10542 },
10543 "created_at": {
10544 "$ref": "#/definitions/pipeline-coupling/definitions/created_at"
10545 },
10546 "id": {
10547 "$ref": "#/definitions/pipeline-coupling/definitions/id"
10548 },
10549 "pipeline": {
10550 "description": "pipeline involved in the coupling",
10551 "properties": {
10552 "id": {
10553 "$ref": "#/definitions/pipeline/definitions/id"
10554 }
10555 },
10556 "type": [
10557 "object"
10558 ]
10559 },
10560 "stage": {
10561 "$ref": "#/definitions/pipeline-coupling/definitions/stage"
10562 },
10563 "updated_at": {
10564 "$ref": "#/definitions/pipeline-coupling/definitions/updated_at"
10565 }
10566 }
10567 },
10568 "pipeline-promotion-target": {
10569 "description": "Promotion targets represent an individual app being promoted to",
10570 "$schema": "http://json-schema.org/draft-04/hyper-schema",
10571 "stability": "prototype",
10572 "strictProperties": true,
10573 "title": "Heroku Platform API - Pipeline Promotion Target",
10574 "type": [
10575 "object"
10576 ],
10577 "definitions": {
10578 "error_message": {
10579 "description": "an error message for why the promotion failed",
10580 "example": "User does not have access to that app",
10581 "type": [
10582 "null",
10583 "string"
10584 ]
10585 },
10586 "id": {
10587 "description": "unique identifier of promotion target",
10588 "example": "01234567-89ab-cdef-0123-456789abcdef",
10589 "readOnly": true,
10590 "format": "uuid",
10591 "type": [
10592 "string"
10593 ]
10594 },
10595 "identity": {
10596 "anyOf": [
10597 {
10598 "$ref": "#/definitions/pipeline-promotion-target/definitions/id"
10599 }
10600 ]
10601 },
10602 "status": {
10603 "description": "status of promotion",
10604 "example": "pending",
10605 "readOnly": true,
10606 "enum": [
10607 "pending",
10608 "succeeded",
10609 "failed"
10610 ],
10611 "type": [
10612 "string"
10613 ]
10614 }
10615 },
10616 "links": [
10617 {
10618 "description": "List promotion targets belonging to an existing promotion.",
10619 "href": "/pipeline-promotions/{(%23%2Fdefinitions%2Fpipeline-promotion%2Fdefinitions%2Fid)}/promotion-targets",
10620 "method": "GET",
10621 "rel": "instances",
10622 "targetSchema": {
10623 "items": {
10624 "$ref": "#/definitions/pipeline-promotion-target"
10625 },
10626 "type": [
10627 "array"
10628 ]
10629 },
10630 "title": "List"
10631 }
10632 ],
10633 "properties": {
10634 "app": {
10635 "description": "the app which was promoted to",
10636 "properties": {
10637 "id": {
10638 "$ref": "#/definitions/app/definitions/id"
10639 }
10640 },
10641 "strictProperties": true,
10642 "type": [
10643 "object"
10644 ]
10645 },
10646 "error_message": {
10647 "$ref": "#/definitions/pipeline-promotion-target/definitions/error_message"
10648 },
10649 "id": {
10650 "$ref": "#/definitions/pipeline-promotion-target/definitions/id"
10651 },
10652 "pipeline_promotion": {
10653 "description": "the promotion which the target belongs to",
10654 "properties": {
10655 "id": {
10656 "$ref": "#/definitions/pipeline-promotion/definitions/id"
10657 }
10658 },
10659 "strictProperties": true,
10660 "type": [
10661 "object"
10662 ]
10663 },
10664 "release": {
10665 "description": "the release which was created on the target app",
10666 "properties": {
10667 "id": {
10668 "$ref": "#/definitions/release/definitions/id"
10669 }
10670 },
10671 "type": [
10672 "object",
10673 "null"
10674 ]
10675 },
10676 "status": {
10677 "$ref": "#/definitions/pipeline-promotion-target/definitions/status"
10678 }
10679 }
10680 },
10681 "pipeline-promotion": {
10682 "description": "Promotions allow you to move code from an app in a pipeline to all targets",
10683 "$schema": "http://json-schema.org/draft-04/hyper-schema",
10684 "stability": "prototype",
10685 "strictProperties": true,
10686 "title": "Heroku Platform API - Pipeline Promotion",
10687 "type": [
10688 "object"
10689 ],
10690 "definitions": {
10691 "created_at": {
10692 "description": "when promotion was created",
10693 "example": "2012-01-01T12:00:00Z",
10694 "format": "date-time",
10695 "type": [
10696 "string"
10697 ]
10698 },
10699 "id": {
10700 "description": "unique identifier of promotion",
10701 "example": "01234567-89ab-cdef-0123-456789abcdef",
10702 "readOnly": true,
10703 "format": "uuid",
10704 "type": [
10705 "string"
10706 ]
10707 },
10708 "identity": {
10709 "anyOf": [
10710 {
10711 "$ref": "#/definitions/pipeline-promotion/definitions/id"
10712 }
10713 ]
10714 },
10715 "status": {
10716 "description": "status of promotion",
10717 "example": "pending",
10718 "readOnly": true,
10719 "enum": [
10720 "pending",
10721 "completed"
10722 ],
10723 "type": [
10724 "string"
10725 ]
10726 },
10727 "updated_at": {
10728 "description": "when promotion was updated",
10729 "example": "2012-01-01T12:00:00Z",
10730 "format": "date-time",
10731 "type": [
10732 "string",
10733 "null"
10734 ]
10735 }
10736 },
10737 "links": [
10738 {
10739 "description": "Create a new promotion.",
10740 "href": "/pipeline-promotions",
10741 "method": "POST",
10742 "rel": "create",
10743 "schema": {
10744 "properties": {
10745 "pipeline": {
10746 "description": "pipeline involved in the promotion",
10747 "properties": {
10748 "id": {
10749 "$ref": "#/definitions/pipeline/definitions/id"
10750 }
10751 },
10752 "required": [
10753 "id"
10754 ],
10755 "type": [
10756 "object"
10757 ]
10758 },
10759 "source": {
10760 "description": "the app being promoted from",
10761 "type": [
10762 "object"
10763 ],
10764 "properties": {
10765 "app": {
10766 "description": "the app which was promoted from",
10767 "properties": {
10768 "id": {
10769 "$ref": "#/definitions/app/definitions/id"
10770 }
10771 },
10772 "strictProperties": true,
10773 "type": [
10774 "object"
10775 ]
10776 }
10777 }
10778 },
10779 "targets": {
10780 "type": [
10781 "array"
10782 ],
10783 "items": {
10784 "type": [
10785 "object"
10786 ],
10787 "properties": {
10788 "app": {
10789 "description": "the app is being promoted to",
10790 "properties": {
10791 "id": {
10792 "$ref": "#/definitions/app/definitions/id"
10793 }
10794 },
10795 "strictProperties": true,
10796 "type": [
10797 "object"
10798 ]
10799 }
10800 }
10801 }
10802 }
10803 },
10804 "required": [
10805 "pipeline",
10806 "source",
10807 "targets"
10808 ],
10809 "type": [
10810 "object"
10811 ]
10812 },
10813 "title": "Create"
10814 },
10815 {
10816 "description": "Info for existing pipeline promotion.",
10817 "href": "/pipeline-promotions/{(%23%2Fdefinitions%2Fpipeline-promotion%2Fdefinitions%2Fidentity)}",
10818 "method": "GET",
10819 "rel": "self",
10820 "targetSchema": {
10821 "$ref": "#/definitions/pipeline-promotion"
10822 },
10823 "title": "Info"
10824 }
10825 ],
10826 "properties": {
10827 "created_at": {
10828 "$ref": "#/definitions/pipeline-promotion/definitions/created_at"
10829 },
10830 "id": {
10831 "$ref": "#/definitions/pipeline-promotion/definitions/id"
10832 },
10833 "pipeline": {
10834 "description": "the pipeline which the promotion belongs to",
10835 "properties": {
10836 "id": {
10837 "$ref": "#/definitions/pipeline/definitions/id"
10838 }
10839 },
10840 "strictProperties": true,
10841 "type": [
10842 "object"
10843 ]
10844 },
10845 "source": {
10846 "description": "the app being promoted from",
10847 "properties": {
10848 "app": {
10849 "description": "the app which was promoted from",
10850 "properties": {
10851 "id": {
10852 "$ref": "#/definitions/app/definitions/id"
10853 }
10854 },
10855 "strictProperties": true,
10856 "type": [
10857 "object"
10858 ]
10859 },
10860 "release": {
10861 "description": "the release used to promoted from",
10862 "properties": {
10863 "id": {
10864 "$ref": "#/definitions/release/definitions/id"
10865 }
10866 },
10867 "type": [
10868 "object"
10869 ]
10870 }
10871 },
10872 "strictProperties": true,
10873 "type": [
10874 "object"
10875 ]
10876 },
10877 "status": {
10878 "$ref": "#/definitions/pipeline-promotion/definitions/status"
10879 },
10880 "updated_at": {
10881 "$ref": "#/definitions/pipeline-promotion/definitions/updated_at"
10882 }
10883 }
10884 },
10885 "pipeline": {
10886 "description": "A pipeline allows grouping of apps into different stages.",
10887 "$schema": "http://json-schema.org/draft-04/hyper-schema",
10888 "stability": "prototype",
10889 "strictProperties": true,
10890 "title": "Heroku Platform API - Pipeline",
10891 "type": [
10892 "object"
10893 ],
10894 "definitions": {
10895 "created_at": {
10896 "description": "when pipeline was created",
10897 "example": "2012-01-01T12:00:00Z",
10898 "format": "date-time",
10899 "readOnly": true,
10900 "type": [
10901 "string"
10902 ]
10903 },
10904 "id": {
10905 "description": "unique identifier of pipeline",
10906 "example": "01234567-89ab-cdef-0123-456789abcdef",
10907 "format": "uuid",
10908 "readOnly": true,
10909 "type": [
10910 "string"
10911 ]
10912 },
10913 "identity": {
10914 "anyOf": [
10915 {
10916 "$ref": "#/definitions/pipeline/definitions/id"
10917 },
10918 {
10919 "$ref": "#/definitions/pipeline/definitions/name"
10920 }
10921 ]
10922 },
10923 "name": {
10924 "description": "name of pipeline",
10925 "example": "example",
10926 "pattern": "^[a-z][a-z0-9-]{2,29}$",
10927 "readOnly": false,
10928 "type": [
10929 "string"
10930 ]
10931 },
10932 "updated_at": {
10933 "description": "when pipeline was updated",
10934 "example": "2012-01-01T12:00:00Z",
10935 "format": "date-time",
10936 "readOnly": true,
10937 "type": [
10938 "string"
10939 ]
10940 }
10941 },
10942 "links": [
10943 {
10944 "description": "Create a new pipeline.",
10945 "href": "/pipelines",
10946 "method": "POST",
10947 "rel": "create",
10948 "schema": {
10949 "properties": {
10950 "name": {
10951 "$ref": "#/definitions/pipeline/definitions/name"
10952 }
10953 },
10954 "required": [
10955 "name"
10956 ],
10957 "type": [
10958 "object"
10959 ]
10960 },
10961 "targetSchema": {
10962 "$ref": "#/definitions/pipeline"
10963 },
10964 "title": "Create"
10965 },
10966 {
10967 "description": "Info for existing pipeline.",
10968 "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fidentity)}",
10969 "method": "GET",
10970 "rel": "self",
10971 "targetSchema": {
10972 "$ref": "#/definitions/pipeline"
10973 },
10974 "title": "Info"
10975 },
10976 {
10977 "description": "Delete an existing pipeline.",
10978 "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}",
10979 "method": "DELETE",
10980 "rel": "delete",
10981 "targetSchema": {
10982 "$ref": "#/definitions/pipeline"
10983 },
10984 "title": "Delete"
10985 },
10986 {
10987 "description": "Update an existing pipeline.",
10988 "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}",
10989 "method": "PATCH",
10990 "rel": "update",
10991 "schema": {
10992 "properties": {
10993 "name": {
10994 "$ref": "#/definitions/pipeline/definitions/name"
10995 }
10996 },
10997 "type": [
10998 "object"
10999 ]
11000 },
11001 "targetSchema": {
11002 "$ref": "#/definitions/pipeline"
11003 },
11004 "title": "Update"
11005 },
11006 {
11007 "description": "List existing pipelines.",
11008 "href": "/pipelines",
11009 "method": "GET",
11010 "rel": "instances",
11011 "targetSchema": {
11012 "type": [
11013 "array"
11014 ],
11015 "items": {
11016 "$ref": "#/definitions/pipeline"
11017 }
11018 },
11019 "title": "List"
11020 }
11021 ],
11022 "properties": {
11023 "created_at": {
11024 "$ref": "#/definitions/pipeline/definitions/created_at"
11025 },
11026 "id": {
11027 "$ref": "#/definitions/pipeline/definitions/id"
11028 },
11029 "name": {
11030 "$ref": "#/definitions/pipeline/definitions/name"
11031 },
11032 "updated_at": {
11033 "$ref": "#/definitions/pipeline/definitions/updated_at"
11034 }
11035 }
11036 },
11037 "plan": {
11038 "description": "Plans represent different configurations of add-ons that may be added to apps. Endpoints under add-on services can be accessed without authentication.",
11039 "$schema": "http://json-schema.org/draft-04/hyper-schema",
11040 "stability": "production",
11041 "strictProperties": true,
11042 "title": "Heroku Platform API - Plan",
11043 "type": [
11044 "object"
11045 ],
11046 "definitions": {
11047 "created_at": {
11048 "description": "when plan was created",
11049 "example": "2012-01-01T12:00:00Z",
11050 "format": "date-time",
11051 "readOnly": true,
11052 "type": [
11053 "string"
11054 ]
11055 },
11056 "compliance": {
11057 "description": "the compliance regimes applied to an add-on plan",
11058 "example": [
11059 "HIPAA"
11060 ],
11061 "readOnly": false,
11062 "type": [
11063 "null",
11064 "array"
11065 ],
11066 "items": {
11067 "$ref": "#/definitions/plan/definitions/regime"
11068 }
11069 },
11070 "default": {
11071 "description": "whether this plan is the default for its add-on service",
11072 "example": false,
11073 "readOnly": true,
11074 "type": [
11075 "boolean"
11076 ]
11077 },
11078 "description": {
11079 "description": "description of plan",
11080 "example": "Heroku Postgres Dev",
11081 "readOnly": true,
11082 "type": [
11083 "string"
11084 ]
11085 },
11086 "human_name": {
11087 "description": "human readable name of the add-on plan",
11088 "example": "Dev",
11089 "readOnly": true,
11090 "type": [
11091 "string"
11092 ]
11093 },
11094 "id": {
11095 "description": "unique identifier of this plan",
11096 "example": "01234567-89ab-cdef-0123-456789abcdef",
11097 "format": "uuid",
11098 "readOnly": true,
11099 "type": [
11100 "string"
11101 ]
11102 },
11103 "installable_inside_private_network": {
11104 "description": "whether this plan is installable to a Private Spaces app",
11105 "example": false,
11106 "readOnly": true,
11107 "type": [
11108 "boolean"
11109 ]
11110 },
11111 "installable_outside_private_network": {
11112 "description": "whether this plan is installable to a Common Runtime app",
11113 "example": true,
11114 "readOnly": true,
11115 "type": [
11116 "boolean"
11117 ]
11118 },
11119 "identity": {
11120 "anyOf": [
11121 {
11122 "$ref": "#/definitions/plan/definitions/id"
11123 },
11124 {
11125 "$ref": "#/definitions/plan/definitions/name"
11126 }
11127 ]
11128 },
11129 "name": {
11130 "description": "unique name of this plan",
11131 "example": "heroku-postgresql:dev",
11132 "readOnly": true,
11133 "type": [
11134 "string"
11135 ]
11136 },
11137 "regime": {
11138 "description": "compliance requirements an add-on plan must adhere to",
11139 "readOnly": true,
11140 "example": "HIPAA",
11141 "type": [
11142 "string"
11143 ],
11144 "enum": [
11145 "HIPAA",
11146 "PCI"
11147 ]
11148 },
11149 "cents": {
11150 "description": "price in cents per unit of plan",
11151 "example": 0,
11152 "readOnly": true,
11153 "type": [
11154 "integer"
11155 ]
11156 },
11157 "contract": {
11158 "description": "price is negotiated in a contract outside of monthly add-on billing",
11159 "example": false,
11160 "readOnly": true,
11161 "type": [
11162 "boolean"
11163 ]
11164 },
11165 "unit": {
11166 "description": "unit of price for plan",
11167 "example": "month",
11168 "readOnly": true,
11169 "type": [
11170 "string"
11171 ]
11172 },
11173 "space_default": {
11174 "description": "whether this plan is the default for apps in Private Spaces",
11175 "example": false,
11176 "readOnly": true,
11177 "type": [
11178 "boolean"
11179 ]
11180 },
11181 "state": {
11182 "description": "release status for plan",
11183 "example": "public",
11184 "readOnly": true,
11185 "type": [
11186 "string"
11187 ]
11188 },
11189 "updated_at": {
11190 "description": "when plan was updated",
11191 "example": "2012-01-01T12:00:00Z",
11192 "format": "date-time",
11193 "readOnly": true,
11194 "type": [
11195 "string"
11196 ]
11197 },
11198 "visible": {
11199 "description": "whether this plan is publicly visible",
11200 "example": true,
11201 "readOnly": true,
11202 "type": [
11203 "boolean"
11204 ]
11205 }
11206 },
11207 "links": [
11208 {
11209 "description": "Info for existing plan.",
11210 "href": "/plans/{(%23%2Fdefinitions%2Fplan%2Fdefinitions%2Fidentity)}",
11211 "method": "GET",
11212 "rel": "self",
11213 "targetSchema": {
11214 "$ref": "#/definitions/plan"
11215 },
11216 "title": "Info"
11217 },
11218 {
11219 "description": "Info for existing plan by Add-on.",
11220 "href": "/addon-services/{(%23%2Fdefinitions%2Fadd-on-service%2Fdefinitions%2Fidentity)}/plans/{(%23%2Fdefinitions%2Fplan%2Fdefinitions%2Fidentity)}",
11221 "method": "GET",
11222 "rel": "self",
11223 "targetSchema": {
11224 "$ref": "#/definitions/plan"
11225 },
11226 "title": "Info By Add-on"
11227 },
11228 {
11229 "description": "List existing plans by Add-on.",
11230 "href": "/addon-services/{(%23%2Fdefinitions%2Fadd-on-service%2Fdefinitions%2Fidentity)}/plans",
11231 "method": "GET",
11232 "rel": "instances",
11233 "targetSchema": {
11234 "items": {
11235 "$ref": "#/definitions/plan"
11236 },
11237 "type": [
11238 "array"
11239 ]
11240 },
11241 "title": "List By Add-on"
11242 }
11243 ],
11244 "properties": {
11245 "addon_service": {
11246 "description": "identity of add-on service",
11247 "properties": {
11248 "id": {
11249 "$ref": "#/definitions/add-on-service/definitions/id"
11250 },
11251 "name": {
11252 "$ref": "#/definitions/add-on-service/definitions/name"
11253 }
11254 },
11255 "strictProperties": true,
11256 "type": [
11257 "object"
11258 ]
11259 },
11260 "created_at": {
11261 "$ref": "#/definitions/plan/definitions/created_at"
11262 },
11263 "compliance": {
11264 "$ref": "#/definitions/plan/definitions/compliance"
11265 },
11266 "default": {
11267 "$ref": "#/definitions/plan/definitions/default"
11268 },
11269 "description": {
11270 "$ref": "#/definitions/plan/definitions/description"
11271 },
11272 "human_name": {
11273 "$ref": "#/definitions/plan/definitions/human_name"
11274 },
11275 "id": {
11276 "$ref": "#/definitions/plan/definitions/id"
11277 },
11278 "installable_inside_private_network": {
11279 "$ref": "#/definitions/plan/definitions/installable_inside_private_network"
11280 },
11281 "installable_outside_private_network": {
11282 "$ref": "#/definitions/plan/definitions/installable_outside_private_network"
11283 },
11284 "name": {
11285 "$ref": "#/definitions/plan/definitions/name"
11286 },
11287 "price": {
11288 "description": "price",
11289 "properties": {
11290 "cents": {
11291 "$ref": "#/definitions/plan/definitions/cents"
11292 },
11293 "contract": {
11294 "$ref": "#/definitions/plan/definitions/contract"
11295 },
11296 "unit": {
11297 "$ref": "#/definitions/plan/definitions/unit"
11298 }
11299 },
11300 "strictProperties": true,
11301 "type": [
11302 "object"
11303 ]
11304 },
11305 "space_default": {
11306 "$ref": "#/definitions/plan/definitions/space_default"
11307 },
11308 "state": {
11309 "$ref": "#/definitions/plan/definitions/state"
11310 },
11311 "updated_at": {
11312 "$ref": "#/definitions/plan/definitions/updated_at"
11313 },
11314 "visible": {
11315 "$ref": "#/definitions/plan/definitions/visible"
11316 }
11317 }
11318 },
11319 "rate-limit": {
11320 "description": "Rate Limit represents the number of request tokens each account holds. Requests to this endpoint do not count towards the rate limit.",
11321 "$schema": "http://json-schema.org/draft-04/hyper-schema",
11322 "stability": "production",
11323 "strictProperties": true,
11324 "title": "Heroku Platform API - Rate Limit",
11325 "type": [
11326 "object"
11327 ],
11328 "definitions": {
11329 "identity": {
11330 },
11331 "remaining": {
11332 "description": "allowed requests remaining in current interval",
11333 "example": 2399,
11334 "readOnly": true,
11335 "type": [
11336 "integer"
11337 ]
11338 }
11339 },
11340 "links": [
11341 {
11342 "description": "Info for rate limits.",
11343 "href": "/account/rate-limits",
11344 "method": "GET",
11345 "rel": "self",
11346 "targetSchema": {
11347 "$ref": "#/definitions/rate-limit"
11348 },
11349 "title": "Info"
11350 }
11351 ],
11352 "properties": {
11353 "remaining": {
11354 "$ref": "#/definitions/rate-limit/definitions/remaining"
11355 }
11356 }
11357 },
11358 "region": {
11359 "description": "A region represents a geographic location in which your application may run.",
11360 "$schema": "http://json-schema.org/draft-04/hyper-schema",
11361 "stability": "production",
11362 "strictProperties": true,
11363 "title": "Heroku Platform API - Region",
11364 "type": [
11365 "object"
11366 ],
11367 "definitions": {
11368 "country": {
11369 "description": "country where the region exists",
11370 "example": "United States",
11371 "readOnly": true,
11372 "type": [
11373 "string"
11374 ]
11375 },
11376 "created_at": {
11377 "description": "when region was created",
11378 "example": "2012-01-01T12:00:00Z",
11379 "format": "date-time",
11380 "readOnly": true,
11381 "type": [
11382 "string"
11383 ]
11384 },
11385 "description": {
11386 "description": "description of region",
11387 "example": "United States",
11388 "readOnly": true,
11389 "type": [
11390 "string"
11391 ]
11392 },
11393 "id": {
11394 "description": "unique identifier of region",
11395 "example": "01234567-89ab-cdef-0123-456789abcdef",
11396 "format": "uuid",
11397 "readOnly": true,
11398 "type": [
11399 "string"
11400 ]
11401 },
11402 "identity": {
11403 "anyOf": [
11404 {
11405 "$ref": "#/definitions/region/definitions/id"
11406 },
11407 {
11408 "$ref": "#/definitions/region/definitions/name"
11409 }
11410 ]
11411 },
11412 "locale": {
11413 "description": "area in the country where the region exists",
11414 "example": "Virginia",
11415 "readOnly": true,
11416 "type": [
11417 "string"
11418 ]
11419 },
11420 "name": {
11421 "description": "unique name of region",
11422 "example": "us",
11423 "readOnly": true,
11424 "type": [
11425 "string"
11426 ]
11427 },
11428 "private_capable": {
11429 "description": "whether or not region is available for creating a Private Space",
11430 "example": false,
11431 "readOnly": true,
11432 "type": [
11433 "boolean"
11434 ]
11435 },
11436 "provider": {
11437 "description": "provider of underlying substrate",
11438 "type": [
11439 "object"
11440 ],
11441 "properties": {
11442 "name": {
11443 "description": "name of provider",
11444 "example": "amazon-web-services",
11445 "readOnly": true,
11446 "type": [
11447 "string"
11448 ]
11449 },
11450 "region": {
11451 "description": "region name used by provider",
11452 "example": "us-east-1",
11453 "readOnly": true,
11454 "type": [
11455 "string"
11456 ],
11457 "enum": [
11458 "ap-south-1",
11459 "eu-west-1",
11460 "ap-southeast-1",
11461 "ap-southeast-2",
11462 "eu-central-1",
11463 "ap-northeast-2",
11464 "ap-northeast-1",
11465 "us-east-1",
11466 "sa-east-1",
11467 "us-west-1",
11468 "us-west-2"
11469 ]
11470 }
11471 },
11472 "readOnly": true
11473 },
11474 "updated_at": {
11475 "description": "when region was updated",
11476 "example": "2012-01-01T12:00:00Z",
11477 "format": "date-time",
11478 "readOnly": true,
11479 "type": [
11480 "string"
11481 ]
11482 }
11483 },
11484 "links": [
11485 {
11486 "description": "Info for existing region.",
11487 "href": "/regions/{(%23%2Fdefinitions%2Fregion%2Fdefinitions%2Fidentity)}",
11488 "method": "GET",
11489 "rel": "self",
11490 "targetSchema": {
11491 "$ref": "#/definitions/region"
11492 },
11493 "title": "Info"
11494 },
11495 {
11496 "description": "List existing regions.",
11497 "href": "/regions",
11498 "method": "GET",
11499 "rel": "instances",
11500 "targetSchema": {
11501 "items": {
11502 "$ref": "#/definitions/region"
11503 },
11504 "type": [
11505 "array"
11506 ]
11507 },
11508 "title": "List"
11509 }
11510 ],
11511 "properties": {
11512 "country": {
11513 "$ref": "#/definitions/region/definitions/country"
11514 },
11515 "created_at": {
11516 "$ref": "#/definitions/region/definitions/created_at"
11517 },
11518 "description": {
11519 "$ref": "#/definitions/region/definitions/description"
11520 },
11521 "id": {
11522 "$ref": "#/definitions/region/definitions/id"
11523 },
11524 "locale": {
11525 "$ref": "#/definitions/region/definitions/locale"
11526 },
11527 "name": {
11528 "$ref": "#/definitions/region/definitions/name"
11529 },
11530 "private_capable": {
11531 "$ref": "#/definitions/region/definitions/private_capable"
11532 },
11533 "provider": {
11534 "$ref": "#/definitions/region/definitions/provider"
11535 },
11536 "updated_at": {
11537 "$ref": "#/definitions/region/definitions/updated_at"
11538 }
11539 }
11540 },
11541 "release": {
11542 "description": "A release represents a combination of code, config vars and add-ons for an app on Heroku.",
11543 "$schema": "http://json-schema.org/draft-04/hyper-schema",
11544 "stability": "production",
11545 "strictProperties": true,
11546 "title": "Heroku Platform API - Release",
11547 "type": [
11548 "object"
11549 ],
11550 "definitions": {
11551 "created_at": {
11552 "description": "when release was created",
11553 "example": "2012-01-01T12:00:00Z",
11554 "format": "date-time",
11555 "readOnly": true,
11556 "type": [
11557 "string"
11558 ]
11559 },
11560 "description": {
11561 "description": "description of changes in this release",
11562 "example": "Added new feature",
11563 "readOnly": true,
11564 "type": [
11565 "string"
11566 ]
11567 },
11568 "status": {
11569 "description": "current status of the release",
11570 "enum": [
11571 "failed",
11572 "pending",
11573 "succeeded"
11574 ],
11575 "example": "succeeded",
11576 "readOnly": true,
11577 "type": [
11578 "string"
11579 ]
11580 },
11581 "id": {
11582 "description": "unique identifier of release",
11583 "example": "01234567-89ab-cdef-0123-456789abcdef",
11584 "format": "uuid",
11585 "readOnly": true,
11586 "type": [
11587 "string"
11588 ]
11589 },
11590 "identity": {
11591 "anyOf": [
11592 {
11593 "$ref": "#/definitions/release/definitions/id"
11594 },
11595 {
11596 "$ref": "#/definitions/release/definitions/version"
11597 }
11598 ]
11599 },
11600 "updated_at": {
11601 "description": "when release was updated",
11602 "example": "2012-01-01T12:00:00Z",
11603 "format": "date-time",
11604 "readOnly": true,
11605 "type": [
11606 "string"
11607 ]
11608 },
11609 "version": {
11610 "description": "unique version assigned to the release",
11611 "example": 11,
11612 "readOnly": true,
11613 "type": [
11614 "integer"
11615 ]
11616 },
11617 "current": {
11618 "description": "indicates this release as being the current one for the app",
11619 "example": true,
11620 "readOnly": true,
11621 "type": [
11622 "boolean"
11623 ]
11624 },
11625 "output_stream_url": {
11626 "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`).",
11627 "example": "https://release-output.heroku.com/streams/01234567-89ab-cdef-0123-456789abcdef",
11628 "readOnly": true,
11629 "type": [
11630 "string",
11631 "null"
11632 ]
11633 }
11634 },
11635 "links": [
11636 {
11637 "description": "Info for existing release.",
11638 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases/{(%23%2Fdefinitions%2Frelease%2Fdefinitions%2Fidentity)}",
11639 "method": "GET",
11640 "rel": "self",
11641 "targetSchema": {
11642 "$ref": "#/definitions/release"
11643 },
11644 "title": "Info"
11645 },
11646 {
11647 "description": "List existing releases.",
11648 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases",
11649 "method": "GET",
11650 "rel": "instances",
11651 "targetSchema": {
11652 "items": {
11653 "$ref": "#/definitions/release"
11654 },
11655 "type": [
11656 "array"
11657 ]
11658 },
11659 "title": "List"
11660 },
11661 {
11662 "description": "Create new release.",
11663 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases",
11664 "method": "POST",
11665 "rel": "create",
11666 "schema": {
11667 "properties": {
11668 "description": {
11669 "$ref": "#/definitions/release/definitions/description"
11670 },
11671 "slug": {
11672 "$ref": "#/definitions/slug/definitions/identity"
11673 }
11674 },
11675 "required": [
11676 "slug"
11677 ],
11678 "type": [
11679 "object"
11680 ]
11681 },
11682 "targetSchema": {
11683 "$ref": "#/definitions/release"
11684 },
11685 "title": "Create"
11686 },
11687 {
11688 "description": "Rollback to an existing release.",
11689 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases",
11690 "method": "POST",
11691 "rel": "create",
11692 "schema": {
11693 "properties": {
11694 "release": {
11695 "$ref": "#/definitions/release/definitions/id"
11696 }
11697 },
11698 "required": [
11699 "release"
11700 ],
11701 "type": [
11702 "object"
11703 ]
11704 },
11705 "targetSchema": {
11706 "$ref": "#/definitions/release"
11707 },
11708 "title": "Rollback"
11709 }
11710 ],
11711 "properties": {
11712 "addon_plan_names": {
11713 "description": "add-on plans installed on the app for this release",
11714 "type": [
11715 "array"
11716 ],
11717 "items": {
11718 "$ref": "#/definitions/plan/definitions/name"
11719 }
11720 },
11721 "app": {
11722 "description": "app involved in the release",
11723 "properties": {
11724 "name": {
11725 "$ref": "#/definitions/app/definitions/name"
11726 },
11727 "id": {
11728 "$ref": "#/definitions/app/definitions/id"
11729 }
11730 },
11731 "type": [
11732 "object"
11733 ]
11734 },
11735 "created_at": {
11736 "$ref": "#/definitions/release/definitions/created_at"
11737 },
11738 "description": {
11739 "$ref": "#/definitions/release/definitions/description"
11740 },
11741 "id": {
11742 "$ref": "#/definitions/release/definitions/id"
11743 },
11744 "updated_at": {
11745 "$ref": "#/definitions/release/definitions/updated_at"
11746 },
11747 "slug": {
11748 "description": "slug running in this release",
11749 "properties": {
11750 "id": {
11751 "$ref": "#/definitions/slug/definitions/id"
11752 }
11753 },
11754 "strictProperties": true,
11755 "type": [
11756 "object",
11757 "null"
11758 ]
11759 },
11760 "status": {
11761 "$ref": "#/definitions/release/definitions/status"
11762 },
11763 "user": {
11764 "description": "user that created the release",
11765 "properties": {
11766 "id": {
11767 "$ref": "#/definitions/account/definitions/id"
11768 },
11769 "email": {
11770 "$ref": "#/definitions/account/definitions/email"
11771 }
11772 },
11773 "strictProperties": true,
11774 "type": [
11775 "object"
11776 ]
11777 },
11778 "version": {
11779 "$ref": "#/definitions/release/definitions/version"
11780 },
11781 "current": {
11782 "$ref": "#/definitions/release/definitions/current"
11783 },
11784 "output_stream_url": {
11785 "$ref": "#/definitions/release/definitions/output_stream_url"
11786 }
11787 }
11788 },
11789 "slug": {
11790 "description": "A slug is a snapshot of your application code that is ready to run on the platform.",
11791 "$schema": "http://json-schema.org/draft-04/hyper-schema",
11792 "stability": "production",
11793 "strictProperties": true,
11794 "title": "Heroku Platform API - Slug",
11795 "type": [
11796 "object"
11797 ],
11798 "definitions": {
11799 "buildpack_provided_description": {
11800 "description": "description from buildpack of slug",
11801 "example": "Ruby/Rack",
11802 "readOnly": false,
11803 "type": [
11804 "null",
11805 "string"
11806 ]
11807 },
11808 "checksum": {
11809 "description": "an optional checksum of the slug for verifying its integrity",
11810 "example": "SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
11811 "readOnly": true,
11812 "type": [
11813 "null",
11814 "string"
11815 ]
11816 },
11817 "commit": {
11818 "description": "identification of the code with your version control system (eg: SHA of the git HEAD)",
11819 "example": "60883d9e8947a57e04dc9124f25df004866a2051",
11820 "readOnly": false,
11821 "type": [
11822 "null",
11823 "string"
11824 ]
11825 },
11826 "commit_description": {
11827 "description": "an optional description of the provided commit",
11828 "example": "fixed a bug with API documentation",
11829 "readOnly": false,
11830 "type": [
11831 "null",
11832 "string"
11833 ]
11834 },
11835 "created_at": {
11836 "description": "when slug was created",
11837 "example": "2012-01-01T12:00:00Z",
11838 "format": "date-time",
11839 "readOnly": true,
11840 "type": [
11841 "string"
11842 ]
11843 },
11844 "id": {
11845 "description": "unique identifier of slug",
11846 "example": "01234567-89ab-cdef-0123-456789abcdef",
11847 "format": "uuid",
11848 "readOnly": true,
11849 "type": [
11850 "string"
11851 ]
11852 },
11853 "identity": {
11854 "anyOf": [
11855 {
11856 "$ref": "#/definitions/slug/definitions/id"
11857 }
11858 ]
11859 },
11860 "method": {
11861 "description": "method to be used to interact with the slug blob",
11862 "example": "GET",
11863 "readOnly": true,
11864 "type": [
11865 "string"
11866 ]
11867 },
11868 "process_types": {
11869 "additionalProperties": false,
11870 "description": "hash mapping process type names to their respective command",
11871 "example": {
11872 "web": "./bin/web -p $PORT"
11873 },
11874 "patternProperties": {
11875 "^[-\\w]{1,128}$": {
11876 "type": [
11877 "string"
11878 ]
11879 }
11880 },
11881 "readOnly": false,
11882 "type": [
11883 "object"
11884 ]
11885 },
11886 "size": {
11887 "default": null,
11888 "description": "size of slug, in bytes",
11889 "example": 2048,
11890 "readOnly": true,
11891 "type": [
11892 "integer",
11893 "null"
11894 ]
11895 },
11896 "updated_at": {
11897 "description": "when slug was updated",
11898 "example": "2012-01-01T12:00:00Z",
11899 "format": "date-time",
11900 "readOnly": true,
11901 "type": [
11902 "string"
11903 ]
11904 },
11905 "url": {
11906 "description": "URL to interact with the slug blob",
11907 "example": "https://api.heroku.com/slugs/1234.tgz",
11908 "readOnly": true,
11909 "type": [
11910 "string"
11911 ]
11912 }
11913 },
11914 "links": [
11915 {
11916 "description": "Info for existing slug.",
11917 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/slugs/{(%23%2Fdefinitions%2Fslug%2Fdefinitions%2Fidentity)}",
11918 "method": "GET",
11919 "rel": "self",
11920 "targetSchema": {
11921 "$ref": "#/definitions/slug"
11922 },
11923 "title": "Info"
11924 },
11925 {
11926 "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).",
11927 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/slugs",
11928 "method": "POST",
11929 "rel": "create",
11930 "schema": {
11931 "properties": {
11932 "buildpack_provided_description": {
11933 "$ref": "#/definitions/slug/definitions/buildpack_provided_description"
11934 },
11935 "checksum": {
11936 "$ref": "#/definitions/slug/definitions/checksum"
11937 },
11938 "commit": {
11939 "$ref": "#/definitions/slug/definitions/commit"
11940 },
11941 "commit_description": {
11942 "$ref": "#/definitions/slug/definitions/commit_description"
11943 },
11944 "process_types": {
11945 "$ref": "#/definitions/slug/definitions/process_types"
11946 },
11947 "stack": {
11948 "$ref": "#/definitions/stack/definitions/identity"
11949 }
11950 },
11951 "required": [
11952 "process_types"
11953 ],
11954 "type": [
11955 "object"
11956 ]
11957 },
11958 "targetSchema": {
11959 "$ref": "#/definitions/slug",
11960 "example": {
11961 "blob": {
11962 "method": "PUT",
11963 "url": "https://api.heroku.com/slugs/1234.tgz"
11964 },
11965 "buildpack_provided_description": "Ruby/Rack",
11966 "checksum": "SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
11967 "commit": "60883d9e8947a57e04dc9124f25df004866a2051",
11968 "commit_description": "fixed a bug with API documentation",
11969 "created_at": "2012-01-01T12:00:00Z",
11970 "id": "01234567-89ab-cdef-0123-456789abcdef",
11971 "process_types": {
11972 "web": "./bin/web -p $PORT"
11973 },
11974 "size": 2048,
11975 "stack": {
11976 "id": "01234567-89ab-cdef-0123-456789abcdef",
11977 "name": "cedar-14"
11978 },
11979 "updated_at": "2012-01-01T12:00:00Z"
11980 }
11981 },
11982 "title": "Create"
11983 }
11984 ],
11985 "properties": {
11986 "blob": {
11987 "description": "pointer to the url where clients can fetch or store the actual release binary",
11988 "properties": {
11989 "method": {
11990 "$ref": "#/definitions/slug/definitions/method"
11991 },
11992 "url": {
11993 "$ref": "#/definitions/slug/definitions/url"
11994 }
11995 },
11996 "strictProperties": true,
11997 "type": [
11998 "object"
11999 ]
12000 },
12001 "buildpack_provided_description": {
12002 "$ref": "#/definitions/slug/definitions/buildpack_provided_description"
12003 },
12004 "checksum": {
12005 "$ref": "#/definitions/slug/definitions/checksum"
12006 },
12007 "commit": {
12008 "$ref": "#/definitions/slug/definitions/commit"
12009 },
12010 "commit_description": {
12011 "$ref": "#/definitions/slug/definitions/commit_description"
12012 },
12013 "created_at": {
12014 "$ref": "#/definitions/slug/definitions/created_at"
12015 },
12016 "id": {
12017 "$ref": "#/definitions/slug/definitions/id"
12018 },
12019 "process_types": {
12020 "$ref": "#/definitions/slug/definitions/process_types"
12021 },
12022 "size": {
12023 "$ref": "#/definitions/slug/definitions/size"
12024 },
12025 "stack": {
12026 "description": "identity of slug stack",
12027 "properties": {
12028 "id": {
12029 "$ref": "#/definitions/stack/definitions/id"
12030 },
12031 "name": {
12032 "$ref": "#/definitions/stack/definitions/name"
12033 }
12034 },
12035 "strictProperties": true,
12036 "type": [
12037 "object"
12038 ]
12039 },
12040 "updated_at": {
12041 "$ref": "#/definitions/slug/definitions/updated_at"
12042 }
12043 }
12044 },
12045 "sms-number": {
12046 "description": "SMS numbers are used for recovery on accounts with two-factor authentication enabled.",
12047 "$schema": "http://json-schema.org/draft-04/hyper-schema",
12048 "stability": "production",
12049 "strictProperties": true,
12050 "title": "Heroku Platform API - SMS Number",
12051 "type": [
12052 "object"
12053 ],
12054 "definitions": {
12055 "sms_number": {
12056 "$ref": "#/definitions/account/definitions/sms_number"
12057 }
12058 },
12059 "links": [
12060 {
12061 "description": "Recover an account using an SMS recovery code",
12062 "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/sms-number",
12063 "method": "GET",
12064 "rel": "self",
12065 "targetSchema": {
12066 "$ref": "#/definitions/sms-number"
12067 },
12068 "title": "SMS Number"
12069 },
12070 {
12071 "description": "Recover an account using an SMS recovery code",
12072 "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/sms-number/actions/recover",
12073 "method": "POST",
12074 "rel": "self",
12075 "targetSchema": {
12076 "$ref": "#/definitions/sms-number"
12077 },
12078 "title": "Recover"
12079 },
12080 {
12081 "description": "Confirm an SMS number change with a confirmation code",
12082 "href": "/users/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}/sms-number/actions/confirm",
12083 "method": "POST",
12084 "rel": "self",
12085 "targetSchema": {
12086 "$ref": "#/definitions/sms-number"
12087 },
12088 "title": "Confirm"
12089 }
12090 ],
12091 "properties": {
12092 "sms_number": {
12093 "$ref": "#/definitions/account/definitions/sms_number"
12094 }
12095 }
12096 },
12097 "sni-endpoint": {
12098 "description": "SNI Endpoint is a public address serving a custom SSL cert for HTTPS traffic, using the SNI TLS extension, to a Heroku app.",
12099 "$schema": "http://json-schema.org/draft-04/hyper-schema",
12100 "title": "Heroku Platform API - SNI Endpoint",
12101 "stability": "development",
12102 "strictProperties": true,
12103 "type": [
12104 "object"
12105 ],
12106 "definitions": {
12107 "certificate_chain": {
12108 "description": "raw contents of the public certificate chain (eg: .crt or .pem file)",
12109 "example": "-----BEGIN CERTIFICATE----- ...",
12110 "readOnly": false,
12111 "type": [
12112 "string"
12113 ]
12114 },
12115 "cname": {
12116 "description": "deprecated; refer to GET /apps/:id/domains for valid CNAMEs for this app",
12117 "example": "example.herokussl.com",
12118 "readOnly": false,
12119 "type": [
12120 "string"
12121 ]
12122 },
12123 "created_at": {
12124 "description": "when endpoint was created",
12125 "example": "2012-01-01T12:00:00Z",
12126 "format": "date-time",
12127 "readOnly": true,
12128 "type": [
12129 "string"
12130 ]
12131 },
12132 "id": {
12133 "description": "unique identifier of this SNI endpoint",
12134 "example": "01234567-89ab-cdef-0123-456789abcdef",
12135 "format": "uuid",
12136 "readOnly": true,
12137 "type": [
12138 "string"
12139 ]
12140 },
12141 "identity": {
12142 "anyOf": [
12143 {
12144 "$ref": "#/definitions/sni-endpoint/definitions/id"
12145 },
12146 {
12147 "$ref": "#/definitions/sni-endpoint/definitions/name"
12148 }
12149 ]
12150 },
12151 "name": {
12152 "description": "unique name for SNI endpoint",
12153 "example": "example",
12154 "pattern": "^[a-z][a-z0-9-]{2,29}$",
12155 "readOnly": true,
12156 "type": [
12157 "string"
12158 ]
12159 },
12160 "private_key": {
12161 "description": "contents of the private key (eg .key file)",
12162 "example": "-----BEGIN RSA PRIVATE KEY----- ...",
12163 "readOnly": false,
12164 "type": [
12165 "string"
12166 ]
12167 },
12168 "updated_at": {
12169 "description": "when SNI endpoint was updated",
12170 "example": "2012-01-01T12:00:00Z",
12171 "format": "date-time",
12172 "readOnly": true,
12173 "type": [
12174 "string"
12175 ]
12176 }
12177 },
12178 "links": [
12179 {
12180 "description": "Create a new SNI endpoint.",
12181 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/sni-endpoints",
12182 "method": "POST",
12183 "rel": "create",
12184 "schema": {
12185 "properties": {
12186 "certificate_chain": {
12187 "$ref": "#/definitions/sni-endpoint/definitions/certificate_chain"
12188 },
12189 "private_key": {
12190 "$ref": "#/definitions/sni-endpoint/definitions/private_key"
12191 }
12192 },
12193 "required": [
12194 "certificate_chain",
12195 "private_key"
12196 ],
12197 "type": [
12198 "object"
12199 ]
12200 },
12201 "targetSchema": {
12202 "$ref": "#/definitions/sni-endpoint"
12203 },
12204 "title": "Create"
12205 },
12206 {
12207 "description": "Delete existing SNI endpoint.",
12208 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/sni-endpoints/{(%23%2Fdefinitions%2Fsni-endpoint%2Fdefinitions%2Fidentity)}",
12209 "method": "DELETE",
12210 "rel": "destroy",
12211 "targetSchema": {
12212 "$ref": "#/definitions/sni-endpoint"
12213 },
12214 "title": "Delete"
12215 },
12216 {
12217 "description": "Info for existing SNI endpoint.",
12218 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/sni-endpoints/{(%23%2Fdefinitions%2Fsni-endpoint%2Fdefinitions%2Fidentity)}",
12219 "method": "GET",
12220 "rel": "self",
12221 "targetSchema": {
12222 "$ref": "#/definitions/sni-endpoint"
12223 },
12224 "title": "Info"
12225 },
12226 {
12227 "description": "List existing SNI endpoints.",
12228 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/sni-endpoints",
12229 "method": "GET",
12230 "rel": "instances",
12231 "targetSchema": {
12232 "items": {
12233 "$ref": "#/definitions/sni-endpoint"
12234 },
12235 "type": [
12236 "array"
12237 ]
12238 },
12239 "title": "List"
12240 },
12241 {
12242 "description": "Update an existing SNI endpoint.",
12243 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/sni-endpoints/{(%23%2Fdefinitions%2Fsni-endpoint%2Fdefinitions%2Fidentity)}",
12244 "method": "PATCH",
12245 "rel": "update",
12246 "schema": {
12247 "properties": {
12248 "certificate_chain": {
12249 "$ref": "#/definitions/sni-endpoint/definitions/certificate_chain"
12250 },
12251 "private_key": {
12252 "$ref": "#/definitions/sni-endpoint/definitions/private_key"
12253 }
12254 },
12255 "required": [
12256 "certificate_chain",
12257 "private_key"
12258 ],
12259 "type": [
12260 "object"
12261 ]
12262 },
12263 "targetSchema": {
12264 "$ref": "#/definitions/sni-endpoint"
12265 },
12266 "title": "Update"
12267 }
12268 ],
12269 "properties": {
12270 "certificate_chain": {
12271 "$ref": "#/definitions/sni-endpoint/definitions/certificate_chain"
12272 },
12273 "cname": {
12274 "$ref": "#/definitions/sni-endpoint/definitions/cname"
12275 },
12276 "created_at": {
12277 "$ref": "#/definitions/sni-endpoint/definitions/created_at"
12278 },
12279 "id": {
12280 "$ref": "#/definitions/sni-endpoint/definitions/id"
12281 },
12282 "name": {
12283 "$ref": "#/definitions/sni-endpoint/definitions/name"
12284 },
12285 "updated_at": {
12286 "$ref": "#/definitions/sni-endpoint/definitions/updated_at"
12287 }
12288 }
12289 },
12290 "source": {
12291 "description": "A source is a location for uploading and downloading an application's source code.",
12292 "$schema": "http://json-schema.org/draft-04/hyper-schema",
12293 "stability": "production",
12294 "strictProperties": true,
12295 "title": "Heroku Platform API - Source",
12296 "type": [
12297 "object"
12298 ],
12299 "definitions": {
12300 "get_url": {
12301 "description": "URL to download the source",
12302 "example": "https://api.heroku.com/sources/1234.tgz",
12303 "readOnly": true,
12304 "type": [
12305 "string"
12306 ]
12307 },
12308 "put_url": {
12309 "description": "URL to upload the source",
12310 "example": "https://api.heroku.com/sources/1234.tgz",
12311 "readOnly": true,
12312 "type": [
12313 "string"
12314 ]
12315 }
12316 },
12317 "links": [
12318 {
12319 "description": "Create URLs for uploading and downloading source.",
12320 "href": "/sources",
12321 "method": "POST",
12322 "rel": "create",
12323 "targetSchema": {
12324 "$ref": "#/definitions/source"
12325 },
12326 "title": "Create"
12327 },
12328 {
12329 "deactivate_on": "2017-08-01",
12330 "description": "Create URLs for uploading and downloading source. Deprecated in favor of `POST /sources`",
12331 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/sources",
12332 "method": "POST",
12333 "rel": "create",
12334 "targetSchema": {
12335 "$ref": "#/definitions/source"
12336 },
12337 "title": "Create - Deprecated"
12338 }
12339 ],
12340 "properties": {
12341 "source_blob": {
12342 "description": "pointer to the URL where clients can fetch or store the source",
12343 "properties": {
12344 "get_url": {
12345 "$ref": "#/definitions/source/definitions/get_url"
12346 },
12347 "put_url": {
12348 "$ref": "#/definitions/source/definitions/put_url"
12349 }
12350 },
12351 "strictProperties": true,
12352 "type": [
12353 "object"
12354 ]
12355 }
12356 }
12357 },
12358 "space-app-access": {
12359 "description": "Space access represents the permissions a particular user has on a particular space.",
12360 "$schema": "http://json-schema.org/draft-04/hyper-schema",
12361 "stability": "prototype",
12362 "title": "Heroku Platform API - Space Access",
12363 "type": [
12364 "object"
12365 ],
12366 "definitions": {
12367 "id": {
12368 "description": "unique identifier of the space a user has permissions on",
12369 "example": "01234567-89ab-cdef-0123-456789abcdef",
12370 "format": "uuid",
12371 "readOnly": true,
12372 "type": [
12373 "string"
12374 ]
12375 },
12376 "identity": {
12377 "anyOf": [
12378 {
12379 "$ref": "#/definitions/space-app-access/definitions/id"
12380 }
12381 ]
12382 }
12383 },
12384 "links": [
12385 {
12386 "description": "List permissions for a given user on a given space.",
12387 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/members/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}",
12388 "method": "GET",
12389 "rel": "self",
12390 "targetSchema": {
12391 "$ref": "#/definitions/space-app-access"
12392 },
12393 "title": "Info"
12394 },
12395 {
12396 "description": "Update an existing user's set of permissions on a space.",
12397 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/members/{(%23%2Fdefinitions%2Faccount%2Fdefinitions%2Fidentity)}",
12398 "method": "PATCH",
12399 "rel": "update",
12400 "schema": {
12401 "type": [
12402 "object"
12403 ],
12404 "required": [
12405 "permissions"
12406 ],
12407 "properties": {
12408 "permissions": {
12409 "type": [
12410 "array"
12411 ],
12412 "items": {
12413 "type": [
12414 "object"
12415 ],
12416 "properties": {
12417 "name": {
12418 "type": [
12419 "string"
12420 ]
12421 }
12422 }
12423 }
12424 }
12425 }
12426 },
12427 "targetSchema": {
12428 "$ref": "#/definitions/space-app-access"
12429 },
12430 "title": "Update"
12431 },
12432 {
12433 "description": "List all users and their permissions on a space.",
12434 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/members",
12435 "method": "GET",
12436 "rel": "instances",
12437 "targetSchema": {
12438 "items": {
12439 "$ref": "#/definitions/space-app-access"
12440 },
12441 "type": [
12442 "array"
12443 ]
12444 },
12445 "title": "List"
12446 }
12447 ],
12448 "properties": {
12449 "space": {
12450 "description": "space user belongs to",
12451 "properties": {
12452 "name": {
12453 "$ref": "#/definitions/app/definitions/name"
12454 },
12455 "id": {
12456 "$ref": "#/definitions/app/definitions/id"
12457 }
12458 },
12459 "strictProperties": true,
12460 "type": [
12461 "object"
12462 ]
12463 },
12464 "created_at": {
12465 "$ref": "#/definitions/space/definitions/created_at"
12466 },
12467 "id": {
12468 "$ref": "#/definitions/space/definitions/id"
12469 },
12470 "permissions": {
12471 "description": "user space permissions",
12472 "type": [
12473 "array"
12474 ],
12475 "items": {
12476 "type": [
12477 "object"
12478 ],
12479 "properties": {
12480 "description": {
12481 "type": [
12482 "string"
12483 ]
12484 },
12485 "name": {
12486 "type": [
12487 "string"
12488 ]
12489 }
12490 }
12491 }
12492 },
12493 "updated_at": {
12494 "$ref": "#/definitions/space/definitions/updated_at"
12495 },
12496 "user": {
12497 "description": "identity of user account",
12498 "properties": {
12499 "email": {
12500 "$ref": "#/definitions/account/definitions/email"
12501 },
12502 "id": {
12503 "$ref": "#/definitions/account/definitions/id"
12504 }
12505 },
12506 "strictProperties": true,
12507 "type": [
12508 "object"
12509 ]
12510 }
12511 }
12512 },
12513 "space-nat": {
12514 "description": "Network address translation (NAT) for stable outbound IP addresses from a space",
12515 "$schema": "http://json-schema.org/draft-04/hyper-schema",
12516 "stability": "prototype",
12517 "strictProperties": true,
12518 "title": "Heroku Platform API - Space Network Address Translation",
12519 "type": [
12520 "object"
12521 ],
12522 "definitions": {
12523 "created_at": {
12524 "description": "when network address translation for a space was created",
12525 "example": "2012-01-01T12:00:00Z",
12526 "format": "date-time",
12527 "readOnly": true,
12528 "type": [
12529 "string"
12530 ]
12531 },
12532 "ip_v4_address": {
12533 "example": "123.123.123.123",
12534 "format": "ipv4",
12535 "pattern": "^(([01]?\\d?\\d|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d?\\d|2[0-4]\\d|25[0-5])$",
12536 "type": [
12537 "string"
12538 ]
12539 },
12540 "sources": {
12541 "description": "potential IPs from which outbound network traffic will originate",
12542 "readOnly": true,
12543 "type": [
12544 "array"
12545 ],
12546 "items": {
12547 "$ref": "#/definitions/space-nat/definitions/ip_v4_address"
12548 }
12549 },
12550 "state": {
12551 "description": "availability of network address translation for a space",
12552 "enum": [
12553 "disabled",
12554 "updating",
12555 "enabled"
12556 ],
12557 "example": "enabled",
12558 "readOnly": true,
12559 "type": [
12560 "string"
12561 ]
12562 },
12563 "updated_at": {
12564 "description": "when network address translation for a space was updated",
12565 "example": "2012-01-01T12:00:00Z",
12566 "format": "date-time",
12567 "readOnly": true,
12568 "type": [
12569 "string"
12570 ]
12571 }
12572 },
12573 "links": [
12574 {
12575 "description": "Current state of network address translation for a space.",
12576 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/nat",
12577 "method": "GET",
12578 "rel": "self",
12579 "targetSchema": {
12580 "$ref": "#/definitions/space-nat"
12581 },
12582 "title": "Info"
12583 }
12584 ],
12585 "properties": {
12586 "created_at": {
12587 "$ref": "#/definitions/space-nat/definitions/created_at"
12588 },
12589 "sources": {
12590 "$ref": "#/definitions/space-nat/definitions/sources"
12591 },
12592 "state": {
12593 "$ref": "#/definitions/space-nat/definitions/state"
12594 },
12595 "updated_at": {
12596 "$ref": "#/definitions/space-nat/definitions/updated_at"
12597 }
12598 }
12599 },
12600 "space": {
12601 "description": "A space is an isolated, highly available, secure app execution environments, running in the modern VPC substrate.",
12602 "$schema": "http://json-schema.org/draft-04/hyper-schema",
12603 "stability": "prototype",
12604 "strictProperties": true,
12605 "title": "Heroku Platform API - Space",
12606 "type": [
12607 "object"
12608 ],
12609 "definitions": {
12610 "created_at": {
12611 "description": "when space was created",
12612 "example": "2012-01-01T12:00:00Z",
12613 "format": "date-time",
12614 "readOnly": true,
12615 "type": [
12616 "string"
12617 ]
12618 },
12619 "id": {
12620 "description": "unique identifier of space",
12621 "example": "01234567-89ab-cdef-0123-456789abcdef",
12622 "format": "uuid",
12623 "readOnly": true,
12624 "type": [
12625 "string"
12626 ]
12627 },
12628 "identity": {
12629 "anyOf": [
12630 {
12631 "$ref": "#/definitions/space/definitions/id"
12632 },
12633 {
12634 "$ref": "#/definitions/space/definitions/name"
12635 }
12636 ]
12637 },
12638 "name": {
12639 "description": "unique name of space",
12640 "example": "nasa",
12641 "readOnly": false,
12642 "pattern": "^[a-z0-9](?:[a-z0-9]|-(?!-))+[a-z0-9]$",
12643 "type": [
12644 "string"
12645 ]
12646 },
12647 "shield": {
12648 "description": "true if this space has shield enabled",
12649 "readOnly": true,
12650 "example": true,
12651 "type": [
12652 "boolean"
12653 ]
12654 },
12655 "state": {
12656 "description": "availability of this space",
12657 "enum": [
12658 "allocating",
12659 "allocated",
12660 "deleting"
12661 ],
12662 "example": "allocated",
12663 "readOnly": true,
12664 "type": [
12665 "string"
12666 ]
12667 },
12668 "updated_at": {
12669 "description": "when space was updated",
12670 "example": "2012-01-01T12:00:00Z",
12671 "format": "date-time",
12672 "readOnly": true,
12673 "type": [
12674 "string"
12675 ]
12676 },
12677 "cidr": {
12678 "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",
12679 "example": "172.20.20.30/16",
12680 "default": "10.0.0.0/16",
12681 "pattern": "^((?:10|172\\.(?:1[6-9]|2[0-9]|3[01])|192\\.168)\\..*.+\\/16)$",
12682 "readOnly": false,
12683 "type": [
12684 "string"
12685 ]
12686 },
12687 "data_cidr": {
12688 "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",
12689 "example": "10.2.0.0/16",
12690 "readOnly": false,
12691 "type": [
12692 "string"
12693 ]
12694 }
12695 },
12696 "links": [
12697 {
12698 "description": "List existing spaces.",
12699 "href": "/spaces",
12700 "method": "GET",
12701 "rel": "instances",
12702 "targetSchema": {
12703 "items": {
12704 "$ref": "#/definitions/space"
12705 },
12706 "type": [
12707 "array"
12708 ]
12709 },
12710 "title": "List"
12711 },
12712 {
12713 "description": "Info for existing space.",
12714 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}",
12715 "method": "GET",
12716 "rel": "self",
12717 "targetSchema": {
12718 "$ref": "#/definitions/space"
12719 },
12720 "title": "Info"
12721 },
12722 {
12723 "description": "Update an existing space.",
12724 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}",
12725 "method": "PATCH",
12726 "rel": "update",
12727 "schema": {
12728 "properties": {
12729 "name": {
12730 "$ref": "#/definitions/space/definitions/name"
12731 }
12732 },
12733 "type": [
12734 "object"
12735 ]
12736 },
12737 "targetSchema": {
12738 "$ref": "#/definitions/space"
12739 },
12740 "title": "Update"
12741 },
12742 {
12743 "description": "Delete an existing space.",
12744 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}",
12745 "method": "DELETE",
12746 "rel": "destroy",
12747 "targetSchema": {
12748 "$ref": "#/definitions/space"
12749 },
12750 "title": "Delete"
12751 },
12752 {
12753 "description": "Create a new space.",
12754 "href": "/spaces",
12755 "method": "POST",
12756 "rel": "create",
12757 "schema": {
12758 "properties": {
12759 "name": {
12760 "$ref": "#/definitions/space/definitions/name"
12761 },
12762 "team": {
12763 "$ref": "#/definitions/team/definitions/name"
12764 },
12765 "region": {
12766 "$ref": "#/definitions/region/definitions/identity"
12767 },
12768 "shield": {
12769 "$ref": "#/definitions/space/definitions/shield"
12770 },
12771 "cidr": {
12772 "$ref": "#/definitions/space/definitions/cidr"
12773 },
12774 "data_cidr": {
12775 "$ref": "#/definitions/space/definitions/data_cidr"
12776 }
12777 },
12778 "required": [
12779 "name",
12780 "team"
12781 ],
12782 "type": [
12783 "object"
12784 ]
12785 },
12786 "targetSchema": {
12787 "$ref": "#/definitions/space"
12788 },
12789 "title": "Create"
12790 }
12791 ],
12792 "properties": {
12793 "created_at": {
12794 "$ref": "#/definitions/space/definitions/created_at"
12795 },
12796 "id": {
12797 "$ref": "#/definitions/space/definitions/id"
12798 },
12799 "name": {
12800 "$ref": "#/definitions/space/definitions/name"
12801 },
12802 "organization": {
12803 "description": "organization that owns this space",
12804 "properties": {
12805 "name": {
12806 "$ref": "#/definitions/organization/definitions/name"
12807 }
12808 },
12809 "type": [
12810 "object"
12811 ]
12812 },
12813 "team": {
12814 "description": "team that owns this space",
12815 "properties": {
12816 "id": {
12817 "$ref": "#/definitions/team/definitions/id"
12818 },
12819 "name": {
12820 "$ref": "#/definitions/team/definitions/name"
12821 }
12822 },
12823 "type": [
12824 "object"
12825 ]
12826 },
12827 "region": {
12828 "description": "identity of space region",
12829 "properties": {
12830 "id": {
12831 "$ref": "#/definitions/region/definitions/id"
12832 },
12833 "name": {
12834 "$ref": "#/definitions/region/definitions/name"
12835 }
12836 },
12837 "strictProperties": true,
12838 "type": [
12839 "object"
12840 ]
12841 },
12842 "shield": {
12843 "$ref": "#/definitions/space/definitions/shield"
12844 },
12845 "state": {
12846 "$ref": "#/definitions/space/definitions/state"
12847 },
12848 "updated_at": {
12849 "$ref": "#/definitions/space/definitions/updated_at"
12850 },
12851 "cidr": {
12852 "$ref": "#/definitions/space/definitions/cidr"
12853 },
12854 "data_cidr": {
12855 "$ref": "#/definitions/space/definitions/data_cidr"
12856 }
12857 }
12858 },
12859 "ssl-endpoint": {
12860 "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.",
12861 "$schema": "http://json-schema.org/draft-04/hyper-schema",
12862 "title": "Heroku Platform API - SSL Endpoint",
12863 "stability": "production",
12864 "strictProperties": true,
12865 "type": [
12866 "object"
12867 ],
12868 "definitions": {
12869 "certificate_chain": {
12870 "description": "raw contents of the public certificate chain (eg: .crt or .pem file)",
12871 "example": "-----BEGIN CERTIFICATE----- ...",
12872 "readOnly": false,
12873 "type": [
12874 "string"
12875 ]
12876 },
12877 "cname": {
12878 "description": "canonical name record, the address to point a domain at",
12879 "example": "example.herokussl.com",
12880 "readOnly": false,
12881 "type": [
12882 "string"
12883 ]
12884 },
12885 "created_at": {
12886 "description": "when endpoint was created",
12887 "example": "2012-01-01T12:00:00Z",
12888 "format": "date-time",
12889 "readOnly": true,
12890 "type": [
12891 "string"
12892 ]
12893 },
12894 "id": {
12895 "description": "unique identifier of this SSL endpoint",
12896 "example": "01234567-89ab-cdef-0123-456789abcdef",
12897 "format": "uuid",
12898 "readOnly": true,
12899 "type": [
12900 "string"
12901 ]
12902 },
12903 "identity": {
12904 "anyOf": [
12905 {
12906 "$ref": "#/definitions/ssl-endpoint/definitions/id"
12907 },
12908 {
12909 "$ref": "#/definitions/ssl-endpoint/definitions/name"
12910 }
12911 ]
12912 },
12913 "name": {
12914 "description": "unique name for SSL endpoint",
12915 "example": "example",
12916 "pattern": "^[a-z][a-z0-9-]{2,29}$",
12917 "readOnly": true,
12918 "type": [
12919 "string"
12920 ]
12921 },
12922 "preprocess": {
12923 "default": true,
12924 "description": "allow Heroku to modify an uploaded public certificate chain if deemed advantageous by adding missing intermediaries, stripping unnecessary ones, etc.",
12925 "example": true,
12926 "readOnly": false,
12927 "type": [
12928 "boolean"
12929 ]
12930 },
12931 "private_key": {
12932 "description": "contents of the private key (eg .key file)",
12933 "example": "-----BEGIN RSA PRIVATE KEY----- ...",
12934 "readOnly": false,
12935 "type": [
12936 "string"
12937 ]
12938 },
12939 "rollback": {
12940 "default": false,
12941 "description": "indicates that a rollback should be performed",
12942 "example": false,
12943 "readOnly": false,
12944 "type": [
12945 "boolean"
12946 ]
12947 },
12948 "updated_at": {
12949 "description": "when endpoint was updated",
12950 "example": "2012-01-01T12:00:00Z",
12951 "format": "date-time",
12952 "readOnly": true,
12953 "type": [
12954 "string"
12955 ]
12956 }
12957 },
12958 "links": [
12959 {
12960 "description": "Create a new SSL endpoint.",
12961 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints",
12962 "method": "POST",
12963 "rel": "create",
12964 "schema": {
12965 "properties": {
12966 "certificate_chain": {
12967 "$ref": "#/definitions/ssl-endpoint/definitions/certificate_chain"
12968 },
12969 "preprocess": {
12970 "$ref": "#/definitions/ssl-endpoint/definitions/preprocess"
12971 },
12972 "private_key": {
12973 "$ref": "#/definitions/ssl-endpoint/definitions/private_key"
12974 }
12975 },
12976 "required": [
12977 "certificate_chain",
12978 "private_key"
12979 ],
12980 "type": [
12981 "object"
12982 ]
12983 },
12984 "targetSchema": {
12985 "$ref": "#/definitions/ssl-endpoint"
12986 },
12987 "title": "Create"
12988 },
12989 {
12990 "description": "Delete existing SSL endpoint.",
12991 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints/{(%23%2Fdefinitions%2Fssl-endpoint%2Fdefinitions%2Fidentity)}",
12992 "method": "DELETE",
12993 "rel": "destroy",
12994 "targetSchema": {
12995 "$ref": "#/definitions/ssl-endpoint"
12996 },
12997 "title": "Delete"
12998 },
12999 {
13000 "description": "Info for existing SSL endpoint.",
13001 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints/{(%23%2Fdefinitions%2Fssl-endpoint%2Fdefinitions%2Fidentity)}",
13002 "method": "GET",
13003 "rel": "self",
13004 "targetSchema": {
13005 "$ref": "#/definitions/ssl-endpoint"
13006 },
13007 "title": "Info"
13008 },
13009 {
13010 "description": "List existing SSL endpoints.",
13011 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints",
13012 "method": "GET",
13013 "rel": "instances",
13014 "targetSchema": {
13015 "items": {
13016 "$ref": "#/definitions/ssl-endpoint"
13017 },
13018 "type": [
13019 "array"
13020 ]
13021 },
13022 "title": "List"
13023 },
13024 {
13025 "description": "Update an existing SSL endpoint.",
13026 "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints/{(%23%2Fdefinitions%2Fssl-endpoint%2Fdefinitions%2Fidentity)}",
13027 "method": "PATCH",
13028 "rel": "update",
13029 "schema": {
13030 "properties": {
13031 "certificate_chain": {
13032 "$ref": "#/definitions/ssl-endpoint/definitions/certificate_chain"
13033 },
13034 "preprocess": {
13035 "$ref": "#/definitions/ssl-endpoint/definitions/preprocess"
13036 },
13037 "private_key": {
13038 "$ref": "#/definitions/ssl-endpoint/definitions/private_key"
13039 },
13040 "rollback": {
13041 "$ref": "#/definitions/ssl-endpoint/definitions/rollback"
13042 }
13043 },
13044 "type": [
13045 "object"
13046 ]
13047 },
13048 "targetSchema": {
13049 "$ref": "#/definitions/ssl-endpoint"
13050 },
13051 "title": "Update"
13052 }
13053 ],
13054 "properties": {
13055 "app": {
13056 "description": "application associated with this ssl-endpoint",
13057 "type": [
13058 "object"
13059 ],
13060 "properties": {
13061 "id": {
13062 "$ref": "#/definitions/app/definitions/id"
13063 },
13064 "name": {
13065 "$ref": "#/definitions/app/definitions/name"
13066 }
13067 },
13068 "strictProperties": true
13069 },
13070 "certificate_chain": {
13071 "$ref": "#/definitions/ssl-endpoint/definitions/certificate_chain"
13072 },
13073 "cname": {
13074 "$ref": "#/definitions/ssl-endpoint/definitions/cname"
13075 },
13076 "created_at": {
13077 "$ref": "#/definitions/ssl-endpoint/definitions/created_at"
13078 },
13079 "id": {
13080 "$ref": "#/definitions/ssl-endpoint/definitions/id"
13081 },
13082 "name": {
13083 "$ref": "#/definitions/ssl-endpoint/definitions/name"
13084 },
13085 "updated_at": {
13086 "$ref": "#/definitions/ssl-endpoint/definitions/updated_at"
13087 }
13088 }
13089 },
13090 "stack": {
13091 "description": "Stacks are the different application execution environments available in the Heroku platform.",
13092 "$schema": "http://json-schema.org/draft-04/hyper-schema",
13093 "stability": "production",
13094 "strictProperties": true,
13095 "title": "Heroku Platform API - Stack",
13096 "type": [
13097 "object"
13098 ],
13099 "definitions": {
13100 "created_at": {
13101 "description": "when stack was introduced",
13102 "example": "2012-01-01T12:00:00Z",
13103 "format": "date-time",
13104 "readOnly": true,
13105 "type": [
13106 "string"
13107 ]
13108 },
13109 "default": {
13110 "description": "indicates this stack is the default for new apps",
13111 "example": true,
13112 "readOnly": true,
13113 "type": [
13114 "boolean"
13115 ]
13116 },
13117 "id": {
13118 "description": "unique identifier of stack",
13119 "example": "01234567-89ab-cdef-0123-456789abcdef",
13120 "format": "uuid",
13121 "readOnly": true,
13122 "type": [
13123 "string"
13124 ]
13125 },
13126 "identity": {
13127 "anyOf": [
13128 {
13129 "$ref": "#/definitions/stack/definitions/name"
13130 },
13131 {
13132 "$ref": "#/definitions/stack/definitions/id"
13133 }
13134 ]
13135 },
13136 "name": {
13137 "description": "unique name of stack",
13138 "example": "cedar-14",
13139 "readOnly": true,
13140 "type": [
13141 "string"
13142 ]
13143 },
13144 "state": {
13145 "description": "availability of this stack: beta, deprecated or public",
13146 "example": "public",
13147 "readOnly": true,
13148 "type": [
13149 "string"
13150 ]
13151 },
13152 "updated_at": {
13153 "description": "when stack was last modified",
13154 "example": "2012-01-01T12:00:00Z",
13155 "format": "date-time",
13156 "readOnly": true,
13157 "type": [
13158 "string"
13159 ]
13160 }
13161 },
13162 "links": [
13163 {
13164 "description": "Stack info.",
13165 "href": "/stacks/{(%23%2Fdefinitions%2Fstack%2Fdefinitions%2Fidentity)}",
13166 "method": "GET",
13167 "rel": "self",
13168 "targetSchema": {
13169 "$ref": "#/definitions/stack"
13170 },
13171 "title": "Info"
13172 },
13173 {
13174 "description": "List available stacks.",
13175 "href": "/stacks",
13176 "method": "GET",
13177 "rel": "instances",
13178 "targetSchema": {
13179 "items": {
13180 "$ref": "#/definitions/stack"
13181 },
13182 "type": [
13183 "array"
13184 ]
13185 },
13186 "title": "List"
13187 }
13188 ],
13189 "properties": {
13190 "default": {
13191 "$ref": "#/definitions/stack/definitions/default"
13192 },
13193 "created_at": {
13194 "$ref": "#/definitions/stack/definitions/created_at"
13195 },
13196 "id": {
13197 "$ref": "#/definitions/stack/definitions/id"
13198 },
13199 "name": {
13200 "$ref": "#/definitions/stack/definitions/name"
13201 },
13202 "state": {
13203 "$ref": "#/definitions/stack/definitions/state"
13204 },
13205 "updated_at": {
13206 "$ref": "#/definitions/stack/definitions/updated_at"
13207 }
13208 }
13209 },
13210 "team-app-collaborator": {
13211 "description": "A team collaborator represents an account that has been given access to a team app on Heroku.",
13212 "$schema": "http://json-schema.org/draft-04/hyper-schema",
13213 "stability": "development",
13214 "title": "Heroku Platform API - Team App Collaborator",
13215 "type": [
13216 "object"
13217 ],
13218 "definitions": {
13219 "identity": {
13220 "anyOf": [
13221 {
13222 "$ref": "#/definitions/collaborator/definitions/email"
13223 }
13224 ]
13225 }
13226 },
13227 "links": [
13228 {
13229 "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-app-permissions) according to their role in the team.",
13230 "href": "/teams/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators",
13231 "method": "POST",
13232 "rel": "create",
13233 "schema": {
13234 "properties": {
13235 "permissions": {
13236 "type": [
13237 "array"
13238 ],
13239 "items": {
13240 "$ref": "#/definitions/team-app-permission/definitions/name"
13241 },
13242 "description": "An array of permissions to give to the collaborator."
13243 },
13244 "silent": {
13245 "$ref": "#/definitions/collaborator/definitions/silent"
13246 },
13247 "user": {
13248 "$ref": "#/definitions/account/definitions/identity"
13249 }
13250 },
13251 "required": [
13252 "user"
13253 ],
13254 "type": [
13255 "object"
13256 ]
13257 },
13258 "targetSchema": {
13259 "$ref": "#/definitions/team-app-collaborator"
13260 },
13261 "title": "Create"
13262 },
13263 {
13264 "description": "Delete an existing collaborator from a team app.",
13265 "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Fteam-app-collaborator%2Fdefinitions%2Fidentity)}",
13266 "method": "DELETE",
13267 "rel": "destroy",
13268 "targetSchema": {
13269 "$ref": "#/definitions/team-app-collaborator"
13270 },
13271 "title": "Delete"
13272 },
13273 {
13274 "description": "Info for a collaborator on a team app.",
13275 "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Fteam-app-collaborator%2Fdefinitions%2Fidentity)}",
13276 "method": "GET",
13277 "rel": "self",
13278 "targetSchema": {
13279 "$ref": "#/definitions/team-app-collaborator"
13280 },
13281 "title": "Info"
13282 },
13283 {
13284 "description": "Update an existing collaborator from a team app.",
13285 "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Fteam-app-collaborator%2Fdefinitions%2Fidentity)}",
13286 "method": "PATCH",
13287 "rel": "update",
13288 "schema": {
13289 "properties": {
13290 "permissions": {
13291 "type": [
13292 "array"
13293 ],
13294 "items": {
13295 "$ref": "#/definitions/team-app-permission/definitions/name"
13296 },
13297 "description": "An array of permissions to give to the collaborator."
13298 }
13299 },
13300 "required": [
13301 "permissions"
13302 ],
13303 "type": [
13304 "object"
13305 ]
13306 },
13307 "targetSchema": {
13308 "$ref": "#/definitions/team-app-collaborator"
13309 },
13310 "title": "Update"
13311 },
13312 {
13313 "description": "List collaborators on a team app.",
13314 "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}/collaborators",
13315 "method": "GET",
13316 "rel": "instances",
13317 "targetSchema": {
13318 "items": {
13319 "$ref": "#/definitions/team-app-collaborator"
13320 },
13321 "type": [
13322 "array"
13323 ]
13324 },
13325 "title": "List"
13326 }
13327 ],
13328 "properties": {
13329 "app": {
13330 "description": "app collaborator belongs to",
13331 "properties": {
13332 "name": {
13333 "$ref": "#/definitions/app/definitions/name"
13334 },
13335 "id": {
13336 "$ref": "#/definitions/app/definitions/id"
13337 }
13338 },
13339 "strictProperties": true,
13340 "type": [
13341 "object"
13342 ]
13343 },
13344 "created_at": {
13345 "$ref": "#/definitions/collaborator/definitions/created_at"
13346 },
13347 "id": {
13348 "$ref": "#/definitions/collaborator/definitions/id"
13349 },
13350 "permissions": {
13351 "type": [
13352 "array"
13353 ],
13354 "items": {
13355 "$ref": "#/definitions/team-app-permission"
13356 },
13357 "description": "array of permissions for the collaborator (only applicable if the app is on a team)"
13358 },
13359 "role": {
13360 "$ref": "#/definitions/team/definitions/role"
13361 },
13362 "updated_at": {
13363 "$ref": "#/definitions/collaborator/definitions/updated_at"
13364 },
13365 "user": {
13366 "description": "identity of collaborated account",
13367 "properties": {
13368 "email": {
13369 "$ref": "#/definitions/account/definitions/email"
13370 },
13371 "federated": {
13372 "$ref": "#/definitions/account/definitions/federated"
13373 },
13374 "id": {
13375 "$ref": "#/definitions/account/definitions/id"
13376 }
13377 },
13378 "strictProperties": true,
13379 "type": [
13380 "object"
13381 ]
13382 }
13383 }
13384 },
13385 "team-app-permission": {
13386 "$schema": "http://json-schema.org/draft-04/hyper-schema",
13387 "description": "A team app permission is a behavior that is assigned to a user in a team app.",
13388 "stability": "prototype",
13389 "title": "Heroku Platform API - Team App Permission",
13390 "type": [
13391 "object"
13392 ],
13393 "definitions": {
13394 "identity": {
13395 "anyOf": [
13396 {
13397 "$ref": "#/definitions/team-app-permission/definitions/name"
13398 }
13399 ]
13400 },
13401 "name": {
13402 "description": "The name of the app permission.",
13403 "example": "view",
13404 "readOnly": true,
13405 "type": [
13406 "string"
13407 ]
13408 },
13409 "description": {
13410 "description": "A description of what the app permission allows.",
13411 "example": "Can manage config, deploy, run commands and restart the app.",
13412 "readOnly": true,
13413 "type": [
13414 "string"
13415 ]
13416 }
13417 },
13418 "links": [
13419 {
13420 "description": "Lists permissions available to teams.",
13421 "href": "/teams/permissions",
13422 "method": "GET",
13423 "rel": "instances",
13424 "targetSchema": {
13425 "items": {
13426 "$ref": "#/definitions/team-app-permission"
13427 },
13428 "type": [
13429 "array"
13430 ]
13431 },
13432 "title": "List"
13433 }
13434 ],
13435 "properties": {
13436 "name": {
13437 "$ref": "#/definitions/team-app-permission/definitions/name"
13438 },
13439 "description": {
13440 "$ref": "#/definitions/team-app-permission/definitions/description"
13441 }
13442 }
13443 },
13444 "team-app": {
13445 "$schema": "http://json-schema.org/draft-04/hyper-schema",
13446 "description": "A team app encapsulates the team specific functionality of Heroku apps.",
13447 "stability": "development",
13448 "title": "Heroku Platform API - Team App",
13449 "type": [
13450 "object"
13451 ],
13452 "definitions": {
13453 "locked": {
13454 "default": false,
13455 "description": "are other team members forbidden from joining this app.",
13456 "example": false,
13457 "type": [
13458 "boolean"
13459 ]
13460 },
13461 "identity": {
13462 "anyOf": [
13463 {
13464 "$ref": "#/definitions/app/definitions/name"
13465 }
13466 ]
13467 },
13468 "internal_routing": {
13469 "default": false,
13470 "description": "describes whether a Private Spaces app is externally routable or not",
13471 "example": false,
13472 "readOnly": false,
13473 "type": [
13474 "boolean",
13475 "null"
13476 ]
13477 },
13478 "joined": {
13479 "default": false,
13480 "description": "is the current member a collaborator on this app.",
13481 "example": false,
13482 "type": [
13483 "boolean"
13484 ]
13485 },
13486 "personal": {
13487 "default": false,
13488 "description": "force creation of the app in the user account even if a default team is set.",
13489 "example": false,
13490 "type": [
13491 "boolean"
13492 ]
13493 }
13494 },
13495 "links": [
13496 {
13497 "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.",
13498 "href": "/teams/apps",
13499 "method": "POST",
13500 "rel": "create",
13501 "schema": {
13502 "properties": {
13503 "locked": {
13504 "$ref": "#/definitions/team-app/definitions/locked"
13505 },
13506 "name": {
13507 "$ref": "#/definitions/app/definitions/name"
13508 },
13509 "team": {
13510 "$ref": "#/definitions/team/definitions/name"
13511 },
13512 "personal": {
13513 "$ref": "#/definitions/team-app/definitions/personal"
13514 },
13515 "region": {
13516 "$ref": "#/definitions/region/definitions/name"
13517 },
13518 "space": {
13519 "$ref": "#/definitions/space/definitions/name"
13520 },
13521 "stack": {
13522 "$ref": "#/definitions/stack/definitions/name"
13523 },
13524 "internal_routing": {
13525 "$ref": "#/definitions/team-app/definitions/internal_routing"
13526 }
13527 },
13528 "type": [
13529 "object"
13530 ]
13531 },
13532 "title": "Create"
13533 },
13534 {
13535 "description": "Info for a team app.",
13536 "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}",
13537 "method": "GET",
13538 "rel": "self",
13539 "title": "Info"
13540 },
13541 {
13542 "description": "Lock or unlock a team app.",
13543 "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}",
13544 "method": "PATCH",
13545 "rel": "update",
13546 "schema": {
13547 "properties": {
13548 "locked": {
13549 "$ref": "#/definitions/team-app/definitions/locked"
13550 }
13551 },
13552 "required": [
13553 "locked"
13554 ],
13555 "type": [
13556 "object"
13557 ]
13558 },
13559 "targetSchema": {
13560 "$ref": "#/definitions/team-app"
13561 },
13562 "title": "Update Locked"
13563 },
13564 {
13565 "description": "Transfer an existing team app to another Heroku account.",
13566 "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}",
13567 "method": "PATCH",
13568 "rel": "update",
13569 "schema": {
13570 "properties": {
13571 "owner": {
13572 "$ref": "#/definitions/account/definitions/identity"
13573 }
13574 },
13575 "required": [
13576 "owner"
13577 ],
13578 "type": [
13579 "object"
13580 ]
13581 },
13582 "title": "Transfer to Account"
13583 },
13584 {
13585 "description": "Transfer an existing team app to another team.",
13586 "href": "/teams/apps/{(%23%2Fdefinitions%2Fteam-app%2Fdefinitions%2Fidentity)}",
13587 "method": "PATCH",
13588 "rel": "update",
13589 "schema": {
13590 "properties": {
13591 "owner": {
13592 "$ref": "#/definitions/team/definitions/name"
13593 }
13594 },
13595 "required": [
13596 "owner"
13597 ],
13598 "type": [
13599 "object"
13600 ]
13601 },
13602 "targetSchema": {
13603 "$ref": "#/definitions/team-app"
13604 },
13605 "title": "Transfer to Team"
13606 },
13607 {
13608 "description": "List team apps.",
13609 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/apps",
13610 "method": "GET",
13611 "rel": "instances",
13612 "targetSchema": {
13613 "items": {
13614 "$ref": "#/definitions/team-app"
13615 },
13616 "type": [
13617 "array"
13618 ]
13619 },
13620 "title": "List By Team"
13621 }
13622 ],
13623 "properties": {
13624 "archived_at": {
13625 "$ref": "#/definitions/app/definitions/archived_at"
13626 },
13627 "buildpack_provided_description": {
13628 "$ref": "#/definitions/app/definitions/buildpack_provided_description"
13629 },
13630 "build_stack": {
13631 "description": "identity of the stack that will be used for new builds",
13632 "properties": {
13633 "id": {
13634 "$ref": "#/definitions/stack/definitions/id"
13635 },
13636 "name": {
13637 "$ref": "#/definitions/stack/definitions/name"
13638 }
13639 },
13640 "type": [
13641 "object"
13642 ]
13643 },
13644 "created_at": {
13645 "$ref": "#/definitions/app/definitions/created_at"
13646 },
13647 "git_url": {
13648 "$ref": "#/definitions/app/definitions/git_url"
13649 },
13650 "id": {
13651 "$ref": "#/definitions/app/definitions/id"
13652 },
13653 "internal_routing": {
13654 "$ref": "#/definitions/team-app/definitions/internal_routing"
13655 },
13656 "joined": {
13657 "$ref": "#/definitions/team-app/definitions/joined"
13658 },
13659 "locked": {
13660 "$ref": "#/definitions/team-app/definitions/locked"
13661 },
13662 "maintenance": {
13663 "$ref": "#/definitions/app/definitions/maintenance"
13664 },
13665 "name": {
13666 "$ref": "#/definitions/app/definitions/name"
13667 },
13668 "team": {
13669 "description": "team that owns this app",
13670 "properties": {
13671 "name": {
13672 "$ref": "#/definitions/team/definitions/name"
13673 }
13674 },
13675 "type": [
13676 "null",
13677 "object"
13678 ]
13679 },
13680 "owner": {
13681 "description": "identity of app owner",
13682 "properties": {
13683 "email": {
13684 "$ref": "#/definitions/account/definitions/email"
13685 },
13686 "id": {
13687 "$ref": "#/definitions/account/definitions/id"
13688 }
13689 },
13690 "type": [
13691 "null",
13692 "object"
13693 ]
13694 },
13695 "region": {
13696 "description": "identity of app region",
13697 "properties": {
13698 "id": {
13699 "$ref": "#/definitions/region/definitions/id"
13700 },
13701 "name": {
13702 "$ref": "#/definitions/region/definitions/name"
13703 }
13704 },
13705 "type": [
13706 "object"
13707 ]
13708 },
13709 "released_at": {
13710 "$ref": "#/definitions/app/definitions/released_at"
13711 },
13712 "repo_size": {
13713 "$ref": "#/definitions/app/definitions/repo_size"
13714 },
13715 "slug_size": {
13716 "$ref": "#/definitions/app/definitions/slug_size"
13717 },
13718 "space": {
13719 "description": "identity of space",
13720 "properties": {
13721 "id": {
13722 "$ref": "#/definitions/space/definitions/id"
13723 },
13724 "name": {
13725 "$ref": "#/definitions/space/definitions/name"
13726 }
13727 },
13728 "type": [
13729 "null",
13730 "object"
13731 ]
13732 },
13733 "stack": {
13734 "description": "identity of app stack",
13735 "properties": {
13736 "id": {
13737 "$ref": "#/definitions/stack/definitions/id"
13738 },
13739 "name": {
13740 "$ref": "#/definitions/stack/definitions/name"
13741 }
13742 },
13743 "type": [
13744 "object"
13745 ]
13746 },
13747 "updated_at": {
13748 "$ref": "#/definitions/app/definitions/updated_at"
13749 },
13750 "web_url": {
13751 "$ref": "#/definitions/app/definitions/web_url"
13752 }
13753 }
13754 },
13755 "team-feature": {
13756 "description": "A team feature represents a feature enabled on a team account.",
13757 "$schema": "http://json-schema.org/draft-04/hyper-schema",
13758 "stability": "development",
13759 "strictProperties": true,
13760 "title": "Heroku Platform API - Team Feature",
13761 "type": [
13762 "object"
13763 ],
13764 "definitions": {
13765 "created_at": {
13766 "description": "when team feature was created",
13767 "example": "2012-01-01T12:00:00Z",
13768 "format": "date-time",
13769 "readOnly": true,
13770 "type": [
13771 "string"
13772 ]
13773 },
13774 "description": {
13775 "description": "description of team feature",
13776 "example": "Causes account to example.",
13777 "readOnly": true,
13778 "type": [
13779 "string"
13780 ]
13781 },
13782 "doc_url": {
13783 "description": "documentation URL of team feature",
13784 "example": "http://devcenter.heroku.com/articles/example",
13785 "readOnly": true,
13786 "type": [
13787 "string"
13788 ]
13789 },
13790 "enabled": {
13791 "description": "whether or not team feature has been enabled",
13792 "example": true,
13793 "readOnly": false,
13794 "type": [
13795 "boolean"
13796 ]
13797 },
13798 "id": {
13799 "description": "unique identifier of team feature",
13800 "example": "01234567-89ab-cdef-0123-456789abcdef",
13801 "format": "uuid",
13802 "readOnly": true,
13803 "type": [
13804 "string"
13805 ]
13806 },
13807 "identity": {
13808 "anyOf": [
13809 {
13810 "$ref": "#/definitions/team-feature/definitions/id"
13811 },
13812 {
13813 "$ref": "#/definitions/team-feature/definitions/name"
13814 }
13815 ]
13816 },
13817 "name": {
13818 "description": "unique name of team feature",
13819 "example": "name",
13820 "readOnly": true,
13821 "type": [
13822 "string"
13823 ]
13824 },
13825 "state": {
13826 "description": "state of team feature",
13827 "example": "public",
13828 "readOnly": true,
13829 "type": [
13830 "string"
13831 ]
13832 },
13833 "updated_at": {
13834 "description": "when team feature was updated",
13835 "example": "2012-01-01T12:00:00Z",
13836 "format": "date-time",
13837 "readOnly": true,
13838 "type": [
13839 "string"
13840 ]
13841 },
13842 "display_name": {
13843 "description": "user readable feature name",
13844 "example": "My Feature",
13845 "readOnly": true,
13846 "type": [
13847 "string"
13848 ]
13849 },
13850 "feedback_email": {
13851 "description": "e-mail to send feedback about the feature",
13852 "example": "feedback@heroku.com",
13853 "readOnly": true,
13854 "type": [
13855 "string"
13856 ]
13857 }
13858 },
13859 "links": [
13860 {
13861 "description": "Info for an existing team feature.",
13862 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/features/{(%23%2Fdefinitions%2Fteam-feature%2Fdefinitions%2Fidentity)}",
13863 "method": "GET",
13864 "rel": "self",
13865 "targetSchema": {
13866 "$ref": "#/definitions/team-feature"
13867 },
13868 "title": "Info"
13869 },
13870 {
13871 "description": "List existing team features.",
13872 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/features",
13873 "method": "GET",
13874 "rel": "instances",
13875 "targetSchema": {
13876 "items": {
13877 "$ref": "#/definitions/team-feature"
13878 },
13879 "type": [
13880 "array"
13881 ]
13882 },
13883 "title": "List"
13884 }
13885 ],
13886 "properties": {
13887 "created_at": {
13888 "$ref": "#/definitions/team-feature/definitions/created_at"
13889 },
13890 "description": {
13891 "$ref": "#/definitions/team-feature/definitions/description"
13892 },
13893 "doc_url": {
13894 "$ref": "#/definitions/team-feature/definitions/doc_url"
13895 },
13896 "enabled": {
13897 "$ref": "#/definitions/team-feature/definitions/enabled"
13898 },
13899 "id": {
13900 "$ref": "#/definitions/team-feature/definitions/id"
13901 },
13902 "name": {
13903 "$ref": "#/definitions/team-feature/definitions/name"
13904 },
13905 "state": {
13906 "$ref": "#/definitions/team-feature/definitions/state"
13907 },
13908 "updated_at": {
13909 "$ref": "#/definitions/team-feature/definitions/updated_at"
13910 },
13911 "display_name": {
13912 "$ref": "#/definitions/team-feature/definitions/display_name"
13913 },
13914 "feedback_email": {
13915 "$ref": "#/definitions/team-feature/definitions/feedback_email"
13916 }
13917 }
13918 },
13919 "team-invitation": {
13920 "description": "A team invitation represents an invite to a team.",
13921 "$schema": "http://json-schema.org/draft-04/hyper-schema",
13922 "stability": "development",
13923 "strictProperties": true,
13924 "title": "Heroku Platform API - Team Invitation",
13925 "type": [
13926 "object"
13927 ],
13928 "definitions": {
13929 "created_at": {
13930 "description": "when invitation was created",
13931 "example": "2012-01-01T12:00:00Z",
13932 "format": "date-time",
13933 "readOnly": true,
13934 "type": [
13935 "string"
13936 ]
13937 },
13938 "identity": {
13939 "anyOf": [
13940 {
13941 "$ref": "#/definitions/team-invitation/definitions/id"
13942 }
13943 ]
13944 },
13945 "id": {
13946 "description": "unique identifier of an invitation",
13947 "example": "01234567-89ab-cdef-0123-456789abcdef",
13948 "format": "uuid",
13949 "readOnly": true,
13950 "type": [
13951 "string"
13952 ]
13953 },
13954 "token": {
13955 "description": "special token for invitation",
13956 "example": "614ae25aa2d4802096cd7c18625b526c",
13957 "readOnly": true,
13958 "type": [
13959 "string"
13960 ]
13961 },
13962 "updated_at": {
13963 "description": "when invitation was updated",
13964 "example": "2012-01-01T12:00:00Z",
13965 "format": "date-time",
13966 "readOnly": true,
13967 "type": [
13968 "string"
13969 ]
13970 }
13971 },
13972 "links": [
13973 {
13974 "description": "Get a list of a team's Identity Providers",
13975 "title": "List",
13976 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fname)}/invitations",
13977 "method": "GET",
13978 "rel": "instances",
13979 "targetSchema": {
13980 "items": {
13981 "$ref": "#/definitions/team-invitation"
13982 },
13983 "type": [
13984 "array"
13985 ]
13986 }
13987 },
13988 {
13989 "description": "Create Team Invitation",
13990 "title": "Create",
13991 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/invitations",
13992 "method": "PUT",
13993 "rel": "update",
13994 "schema": {
13995 "properties": {
13996 "email": {
13997 "$ref": "#/definitions/account/definitions/email"
13998 },
13999 "role": {
14000 "$ref": "#/definitions/team/definitions/role"
14001 }
14002 },
14003 "required": [
14004 "email",
14005 "role"
14006 ],
14007 "type": [
14008 "object"
14009 ]
14010 }
14011 },
14012 {
14013 "description": "Revoke a team invitation.",
14014 "title": "Revoke",
14015 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/invitations/{(%23%2Fdefinitions%2Fteam-invitation%2Fdefinitions%2Fidentity)}",
14016 "method": "DELETE",
14017 "rel": "self"
14018 },
14019 {
14020 "description": "Get an invitation by its token",
14021 "title": "Get",
14022 "href": "/teams/invitations/{(%23%2Fdefinitions%2Fteam-invitation%2Fdefinitions%2Ftoken)}",
14023 "method": "GET",
14024 "rel": "instances",
14025 "targetSchema": {
14026 "$ref": "#/definitions/team-invitation"
14027 }
14028 },
14029 {
14030 "description": "Accept Team Invitation",
14031 "title": "Accept",
14032 "href": "/teams/invitations/{(%23%2Fdefinitions%2Fteam-invitation%2Fdefinitions%2Ftoken)}/accept",
14033 "method": "POST",
14034 "rel": "create",
14035 "targetSchema": {
14036 "$ref": "#/definitions/team-member"
14037 }
14038 }
14039 ],
14040 "properties": {
14041 "created_at": {
14042 "$ref": "#/definitions/team-invitation/definitions/created_at"
14043 },
14044 "id": {
14045 "$ref": "#/definitions/team-invitation/definitions/id"
14046 },
14047 "invited_by": {
14048 "properties": {
14049 "email": {
14050 "$ref": "#/definitions/account/definitions/email"
14051 },
14052 "id": {
14053 "$ref": "#/definitions/account/definitions/id"
14054 },
14055 "name": {
14056 "$ref": "#/definitions/account/definitions/name"
14057 }
14058 },
14059 "strictProperties": true,
14060 "type": [
14061 "object"
14062 ]
14063 },
14064 "team": {
14065 "properties": {
14066 "id": {
14067 "$ref": "#/definitions/team/definitions/id"
14068 },
14069 "name": {
14070 "$ref": "#/definitions/team/definitions/name"
14071 }
14072 },
14073 "strictProperties": true,
14074 "type": [
14075 "object"
14076 ]
14077 },
14078 "role": {
14079 "$ref": "#/definitions/team/definitions/role"
14080 },
14081 "updated_at": {
14082 "$ref": "#/definitions/team-invitation/definitions/updated_at"
14083 },
14084 "user": {
14085 "properties": {
14086 "email": {
14087 "$ref": "#/definitions/account/definitions/email"
14088 },
14089 "id": {
14090 "$ref": "#/definitions/account/definitions/id"
14091 },
14092 "name": {
14093 "$ref": "#/definitions/account/definitions/name"
14094 }
14095 },
14096 "strictProperties": true,
14097 "type": [
14098 "object"
14099 ]
14100 }
14101 }
14102 },
14103 "team-invoice": {
14104 "$schema": "http://json-schema.org/draft-04/hyper-schema",
14105 "description": "A Team Invoice is an itemized bill of goods for a team which includes pricing and charges.",
14106 "stability": "development",
14107 "strictProperties": true,
14108 "title": "Heroku Platform API - Team Invoice",
14109 "type": [
14110 "object"
14111 ],
14112 "definitions": {
14113 "addons_total": {
14114 "description": "total add-ons charges in on this invoice",
14115 "example": 25000,
14116 "readOnly": true,
14117 "type": [
14118 "integer"
14119 ]
14120 },
14121 "database_total": {
14122 "description": "total database charges on this invoice",
14123 "example": 25000,
14124 "readOnly": true,
14125 "type": [
14126 "integer"
14127 ]
14128 },
14129 "charges_total": {
14130 "description": "total charges on this invoice",
14131 "example": 0,
14132 "readOnly": true,
14133 "type": [
14134 "integer"
14135 ]
14136 },
14137 "created_at": {
14138 "description": "when invoice was created",
14139 "example": "2012-01-01T12:00:00Z",
14140 "format": "date-time",
14141 "readOnly": true,
14142 "type": [
14143 "string"
14144 ]
14145 },
14146 "credits_total": {
14147 "description": "total credits on this invoice",
14148 "example": 100000,
14149 "readOnly": true,
14150 "type": [
14151 "integer"
14152 ]
14153 },
14154 "dyno_units": {
14155 "description": "total amount of dyno units consumed across dyno types.",
14156 "example": 1.92,
14157 "readOnly": true,
14158 "type": [
14159 "number"
14160 ]
14161 },
14162 "id": {
14163 "description": "unique identifier of this invoice",
14164 "example": "01234567-89ab-cdef-0123-456789abcdef",
14165 "format": "uuid",
14166 "readOnly": true,
14167 "type": [
14168 "string"
14169 ]
14170 },
14171 "identity": {
14172 "anyOf": [
14173 {
14174 "$ref": "#/definitions/team-invoice/definitions/number"
14175 }
14176 ]
14177 },
14178 "number": {
14179 "description": "human readable invoice number",
14180 "example": 9403943,
14181 "readOnly": true,
14182 "type": [
14183 "integer"
14184 ]
14185 },
14186 "payment_status": {
14187 "description": "status of the invoice payment",
14188 "example": "Paid",
14189 "readOnly": true,
14190 "type": [
14191 "string"
14192 ]
14193 },
14194 "platform_total": {
14195 "description": "total platform charges on this invoice",
14196 "example": 50000,
14197 "readOnly": true,
14198 "type": [
14199 "integer"
14200 ]
14201 },
14202 "period_end": {
14203 "description": "the ending date that the invoice covers",
14204 "example": "01/31/2014",
14205 "readOnly": true,
14206 "type": [
14207 "string"
14208 ]
14209 },
14210 "period_start": {
14211 "description": "the starting date that this invoice covers",
14212 "example": "01/01/2014",
14213 "readOnly": true,
14214 "type": [
14215 "string"
14216 ]
14217 },
14218 "state": {
14219 "description": "payment status for this invoice (pending, successful, failed)",
14220 "example": 1,
14221 "readOnly": true,
14222 "type": [
14223 "integer"
14224 ]
14225 },
14226 "total": {
14227 "description": "combined total of charges and credits on this invoice",
14228 "example": 100000,
14229 "readOnly": true,
14230 "type": [
14231 "integer"
14232 ]
14233 },
14234 "updated_at": {
14235 "description": "when invoice was updated",
14236 "example": "2012-01-01T12:00:00Z",
14237 "format": "date-time",
14238 "readOnly": true,
14239 "type": [
14240 "string"
14241 ]
14242 },
14243 "weighted_dyno_hours": {
14244 "description": "The total amount of hours consumed across dyno types.",
14245 "example": 1488,
14246 "readOnly": true,
14247 "type": [
14248 "number"
14249 ]
14250 }
14251 },
14252 "links": [
14253 {
14254 "description": "Info for existing invoice.",
14255 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/invoices/{(%23%2Fdefinitions%2Fteam-invoice%2Fdefinitions%2Fidentity)}",
14256 "method": "GET",
14257 "rel": "self",
14258 "targetSchema": {
14259 "$ref": "#/definitions/team-invoice"
14260 },
14261 "title": "Info"
14262 },
14263 {
14264 "description": "List existing invoices.",
14265 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/invoices",
14266 "method": "GET",
14267 "rel": "instances",
14268 "targetSchema": {
14269 "items": {
14270 "$ref": "#/definitions/team-invoice"
14271 },
14272 "type": [
14273 "array"
14274 ]
14275 },
14276 "title": "List"
14277 }
14278 ],
14279 "properties": {
14280 "addons_total": {
14281 "$ref": "#/definitions/team-invoice/definitions/addons_total"
14282 },
14283 "database_total": {
14284 "$ref": "#/definitions/team-invoice/definitions/database_total"
14285 },
14286 "charges_total": {
14287 "$ref": "#/definitions/team-invoice/definitions/charges_total"
14288 },
14289 "created_at": {
14290 "$ref": "#/definitions/team-invoice/definitions/created_at"
14291 },
14292 "credits_total": {
14293 "$ref": "#/definitions/team-invoice/definitions/credits_total"
14294 },
14295 "dyno_units": {
14296 "$ref": "#/definitions/team-invoice/definitions/dyno_units"
14297 },
14298 "id": {
14299 "$ref": "#/definitions/team-invoice/definitions/id"
14300 },
14301 "number": {
14302 "$ref": "#/definitions/team-invoice/definitions/number"
14303 },
14304 "payment_status": {
14305 "$ref": "#/definitions/team-invoice/definitions/payment_status"
14306 },
14307 "period_end": {
14308 "$ref": "#/definitions/team-invoice/definitions/period_end"
14309 },
14310 "period_start": {
14311 "$ref": "#/definitions/team-invoice/definitions/period_start"
14312 },
14313 "platform_total": {
14314 "$ref": "#/definitions/team-invoice/definitions/platform_total"
14315 },
14316 "state": {
14317 "$ref": "#/definitions/team-invoice/definitions/state"
14318 },
14319 "total": {
14320 "$ref": "#/definitions/team-invoice/definitions/total"
14321 },
14322 "updated_at": {
14323 "$ref": "#/definitions/team-invoice/definitions/updated_at"
14324 },
14325 "weighted_dyno_hours": {
14326 "$ref": "#/definitions/team-invoice/definitions/weighted_dyno_hours"
14327 }
14328 }
14329 },
14330 "team-member": {
14331 "$schema": "http://json-schema.org/draft-04/hyper-schema",
14332 "description": "A team member is an individual with access to a team.",
14333 "stability": "development",
14334 "additionalProperties": false,
14335 "required": [
14336 "created_at",
14337 "email",
14338 "federated",
14339 "updated_at"
14340 ],
14341 "title": "Heroku Platform API - Team Member",
14342 "type": [
14343 "object"
14344 ],
14345 "definitions": {
14346 "created_at": {
14347 "description": "when the membership record was created",
14348 "example": "2012-01-01T12:00:00Z",
14349 "format": "date-time",
14350 "readOnly": true,
14351 "type": [
14352 "string"
14353 ]
14354 },
14355 "email": {
14356 "description": "email address of the team member",
14357 "example": "someone@example.org",
14358 "readOnly": true,
14359 "type": [
14360 "string"
14361 ]
14362 },
14363 "federated": {
14364 "description": "whether the user is federated and belongs to an Identity Provider",
14365 "example": false,
14366 "readOnly": true,
14367 "type": [
14368 "boolean"
14369 ]
14370 },
14371 "id": {
14372 "description": "unique identifier of the team member",
14373 "example": "01234567-89ab-cdef-0123-456789abcdef",
14374 "format": "uuid",
14375 "readOnly": true,
14376 "type": [
14377 "string"
14378 ]
14379 },
14380 "identity": {
14381 "anyOf": [
14382 {
14383 "$ref": "#/definitions/team-member/definitions/email"
14384 },
14385 {
14386 "$ref": "#/definitions/team-member/definitions/id"
14387 }
14388 ]
14389 },
14390 "name": {
14391 "description": "full name of the team member",
14392 "example": "Tina Edmonds",
14393 "readOnly": true,
14394 "type": [
14395 "string",
14396 "null"
14397 ]
14398 },
14399 "two_factor_authentication": {
14400 "description": "whether the Enterprise team member has two factor authentication enabled",
14401 "example": true,
14402 "readOnly": true,
14403 "type": [
14404 "boolean"
14405 ]
14406 },
14407 "updated_at": {
14408 "description": "when the membership record was updated",
14409 "example": "2012-01-01T12:00:00Z",
14410 "format": "date-time",
14411 "readOnly": true,
14412 "type": [
14413 "string"
14414 ]
14415 }
14416 },
14417 "links": [
14418 {
14419 "description": "Create a new team member, or update their role.",
14420 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/members",
14421 "method": "PUT",
14422 "rel": "create",
14423 "schema": {
14424 "properties": {
14425 "email": {
14426 "$ref": "#/definitions/team-member/definitions/email"
14427 },
14428 "federated": {
14429 "$ref": "#/definitions/team-member/definitions/federated"
14430 },
14431 "role": {
14432 "$ref": "#/definitions/team/definitions/role"
14433 }
14434 },
14435 "required": [
14436 "email",
14437 "role"
14438 ],
14439 "type": [
14440 "object"
14441 ]
14442 },
14443 "targetSchema": {
14444 "$ref": "#/definitions/team-member"
14445 },
14446 "title": "Create or Update"
14447 },
14448 {
14449 "description": "Create a new team member.",
14450 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/members",
14451 "method": "POST",
14452 "rel": "create",
14453 "schema": {
14454 "properties": {
14455 "email": {
14456 "$ref": "#/definitions/team-member/definitions/email"
14457 },
14458 "federated": {
14459 "$ref": "#/definitions/team-member/definitions/federated"
14460 },
14461 "role": {
14462 "$ref": "#/definitions/team/definitions/role"
14463 }
14464 },
14465 "required": [
14466 "email",
14467 "role"
14468 ],
14469 "type": [
14470 "object"
14471 ]
14472 },
14473 "targetSchema": {
14474 "$ref": "#/definitions/team-member"
14475 },
14476 "title": "Create"
14477 },
14478 {
14479 "description": "Update a team member.",
14480 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/members",
14481 "method": "PATCH",
14482 "rel": "update",
14483 "schema": {
14484 "properties": {
14485 "email": {
14486 "$ref": "#/definitions/team-member/definitions/email"
14487 },
14488 "federated": {
14489 "$ref": "#/definitions/team-member/definitions/federated"
14490 },
14491 "role": {
14492 "$ref": "#/definitions/team/definitions/role"
14493 }
14494 },
14495 "required": [
14496 "email",
14497 "role"
14498 ],
14499 "type": [
14500 "object"
14501 ]
14502 },
14503 "targetSchema": {
14504 "$ref": "#/definitions/team-member"
14505 },
14506 "title": "Update"
14507 },
14508 {
14509 "description": "Remove a member from the team.",
14510 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/members/{(%23%2Fdefinitions%2Fteam-member%2Fdefinitions%2Fidentity)}",
14511 "method": "DELETE",
14512 "rel": "destroy",
14513 "targetSchema": {
14514 "$ref": "#/definitions/team-member"
14515 },
14516 "title": "Delete"
14517 },
14518 {
14519 "description": "List members of the team.",
14520 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/members",
14521 "method": "GET",
14522 "ranges": [
14523 "email"
14524 ],
14525 "rel": "instances",
14526 "targetSchema": {
14527 "items": {
14528 "$ref": "#/definitions/team-member"
14529 },
14530 "type": [
14531 "array"
14532 ]
14533 },
14534 "title": "List"
14535 },
14536 {
14537 "description": "List the apps of a team member.",
14538 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/members/{(%23%2Fdefinitions%2Fteam-member%2Fdefinitions%2Fidentity)}/apps",
14539 "method": "GET",
14540 "rel": "instances",
14541 "targetSchema": {
14542 "items": {
14543 "$ref": "#/definitions/team-app"
14544 },
14545 "type": [
14546 "array"
14547 ]
14548 },
14549 "title": "List By Member"
14550 }
14551 ],
14552 "properties": {
14553 "created_at": {
14554 "$ref": "#/definitions/team-member/definitions/created_at"
14555 },
14556 "email": {
14557 "$ref": "#/definitions/team-member/definitions/email"
14558 },
14559 "federated": {
14560 "$ref": "#/definitions/team-member/definitions/federated"
14561 },
14562 "id": {
14563 "$ref": "#/definitions/team-member/definitions/id"
14564 },
14565 "role": {
14566 "$ref": "#/definitions/team/definitions/role"
14567 },
14568 "two_factor_authentication": {
14569 "$ref": "#/definitions/team-member/definitions/two_factor_authentication"
14570 },
14571 "updated_at": {
14572 "$ref": "#/definitions/team-member/definitions/updated_at"
14573 },
14574 "user": {
14575 "description": "user information for the membership",
14576 "properties": {
14577 "email": {
14578 "$ref": "#/definitions/account/definitions/email"
14579 },
14580 "id": {
14581 "$ref": "#/definitions/account/definitions/id"
14582 },
14583 "name": {
14584 "$ref": "#/definitions/account/definitions/name"
14585 }
14586 },
14587 "strictProperties": true,
14588 "type": [
14589 "object"
14590 ]
14591 }
14592 }
14593 },
14594 "team-preferences": {
14595 "description": "Tracks a Team's Preferences",
14596 "$schema": "http://json-schema.org/draft-04/hyper-schema",
14597 "stability": "development",
14598 "strictProperties": true,
14599 "title": "Heroku Platform API - Team Preferences",
14600 "type": [
14601 "object"
14602 ],
14603 "definitions": {
14604 "default-permission": {
14605 "description": "The default permission used when adding new members to the team",
14606 "example": "member",
14607 "readOnly": false,
14608 "enum": [
14609 "admin",
14610 "member",
14611 "viewer",
14612 null
14613 ],
14614 "type": [
14615 "null",
14616 "string"
14617 ]
14618 },
14619 "identity": {
14620 "$ref": "#/definitions/team/definitions/identity"
14621 },
14622 "whitelisting-enabled": {
14623 "description": "Whether whitelisting rules should be applied to add-on installations",
14624 "example": true,
14625 "readOnly": false,
14626 "type": [
14627 "boolean",
14628 "null"
14629 ]
14630 }
14631 },
14632 "links": [
14633 {
14634 "description": "Retrieve Team Preferences",
14635 "href": "/teams/{(%23%2Fdefinitions%2Fteam-preferences%2Fdefinitions%2Fidentity)}/preferences",
14636 "method": "GET",
14637 "rel": "self",
14638 "targetSchema": {
14639 "$ref": "#/definitions/team-preferences"
14640 },
14641 "title": "List"
14642 },
14643 {
14644 "description": "Update Team Preferences",
14645 "href": "/teams/{(%23%2Fdefinitions%2Fteam-preferences%2Fdefinitions%2Fidentity)}/preferences",
14646 "method": "PATCH",
14647 "rel": "update",
14648 "schema": {
14649 "type": [
14650 "object"
14651 ],
14652 "properties": {
14653 "whitelisting-enabled": {
14654 "$ref": "#/definitions/team-preferences/definitions/whitelisting-enabled"
14655 }
14656 }
14657 },
14658 "targetSchema": {
14659 "$ref": "#/definitions/team-preferences"
14660 },
14661 "title": "Update"
14662 }
14663 ],
14664 "properties": {
14665 "default-permission": {
14666 "$ref": "#/definitions/team-preferences/definitions/default-permission"
14667 },
14668 "whitelisting-enabled": {
14669 "$ref": "#/definitions/team-preferences/definitions/whitelisting-enabled"
14670 }
14671 }
14672 },
14673 "team": {
14674 "$schema": "http://json-schema.org/draft-04/hyper-schema",
14675 "description": "Teams allow you to manage access to a shared group of applications and other resources.",
14676 "stability": "development",
14677 "strictProperties": true,
14678 "title": "Heroku Platform API - Team",
14679 "type": [
14680 "object"
14681 ],
14682 "definitions": {
14683 "created_at": {
14684 "description": "when the team was created",
14685 "example": "2012-01-01T12:00:00Z",
14686 "format": "date-time",
14687 "readOnly": true,
14688 "type": [
14689 "string"
14690 ]
14691 },
14692 "credit_card_collections": {
14693 "description": "whether charges incurred by the team are paid by credit card.",
14694 "example": true,
14695 "readOnly": true,
14696 "type": [
14697 "boolean"
14698 ]
14699 },
14700 "default": {
14701 "description": "whether to use this team when none is specified",
14702 "example": true,
14703 "readOnly": false,
14704 "type": [
14705 "boolean"
14706 ]
14707 },
14708 "id": {
14709 "description": "unique identifier of team",
14710 "example": "01234567-89ab-cdef-0123-456789abcdef",
14711 "format": "uuid",
14712 "readOnly": true,
14713 "type": [
14714 "string"
14715 ]
14716 },
14717 "identity": {
14718 "anyOf": [
14719 {
14720 "$ref": "#/definitions/team/definitions/name"
14721 },
14722 {
14723 "$ref": "#/definitions/team/definitions/id"
14724 }
14725 ]
14726 },
14727 "device_data": {
14728 "type": [
14729 "string",
14730 "null"
14731 ],
14732 "description": "Device data string generated by the client",
14733 "example": "VGhpcyBpcyBhIGdvb2QgZGF5IHRvIGRpZQ=="
14734 },
14735 "nonce": {
14736 "type": [
14737 "string",
14738 "null"
14739 ],
14740 "description": "Nonce generated by Braintree hosted fields form",
14741 "example": "VGhpcyBpcyBhIGdvb2QgZGF5IHRvIGRpZQ=="
14742 },
14743 "address_1": {
14744 "type": [
14745 "string"
14746 ],
14747 "description": "street address line 1",
14748 "example": "40 Hickory Lane"
14749 },
14750 "address_2": {
14751 "type": [
14752 "string",
14753 "null"
14754 ],
14755 "description": "street address line 2",
14756 "example": "Suite 103"
14757 },
14758 "card_number": {
14759 "type": [
14760 "string",
14761 "null"
14762 ],
14763 "description": "encrypted card number of payment method",
14764 "example": "encrypted-card-number"
14765 },
14766 "city": {
14767 "type": [
14768 "string"
14769 ],
14770 "description": "city",
14771 "example": "San Francisco"
14772 },
14773 "country": {
14774 "type": [
14775 "string"
14776 ],
14777 "description": "country",
14778 "example": "US"
14779 },
14780 "cvv": {
14781 "type": [
14782 "string",
14783 "null"
14784 ],
14785 "description": "card verification value",
14786 "example": "123"
14787 },
14788 "expiration_month": {
14789 "type": [
14790 "string",
14791 "null"
14792 ],
14793 "description": "expiration month",
14794 "example": "11"
14795 },
14796 "expiration_year": {
14797 "type": [
14798 "string",
14799 "null"
14800 ],
14801 "description": "expiration year",
14802 "example": "2014"
14803 },
14804 "first_name": {
14805 "type": [
14806 "string"
14807 ],
14808 "description": "the first name for payment method",
14809 "example": "Jason"
14810 },
14811 "last_name": {
14812 "type": [
14813 "string"
14814 ],
14815 "description": "the last name for payment method",
14816 "example": "Walker"
14817 },
14818 "other": {
14819 "type": [
14820 "string",
14821 "null"
14822 ],
14823 "description": "metadata",
14824 "example": "Additional information for payment method"
14825 },
14826 "postal_code": {
14827 "type": [
14828 "string"
14829 ],
14830 "description": "postal code",
14831 "example": "90210"
14832 },
14833 "state": {
14834 "type": [
14835 "string"
14836 ],
14837 "description": "state",
14838 "example": "CA"
14839 },
14840 "membership_limit": {
14841 "description": "upper limit of members allowed in a team.",
14842 "example": 25,
14843 "readOnly": true,
14844 "type": [
14845 "number",
14846 "null"
14847 ]
14848 },
14849 "name": {
14850 "description": "unique name of team",
14851 "example": "example",
14852 "readOnly": true,
14853 "type": [
14854 "string"
14855 ]
14856 },
14857 "provisioned_licenses": {
14858 "description": "whether the team is provisioned licenses by salesforce.",
14859 "example": true,
14860 "readOnly": true,
14861 "type": [
14862 "boolean"
14863 ]
14864 },
14865 "role": {
14866 "description": "role in the team",
14867 "enum": [
14868 "admin",
14869 "collaborator",
14870 "member",
14871 "owner",
14872 null
14873 ],
14874 "example": "admin",
14875 "readOnly": true,
14876 "type": [
14877 "null",
14878 "string"
14879 ]
14880 },
14881 "type": {
14882 "description": "type of team.",
14883 "example": "team",
14884 "enum": [
14885 "enterprise",
14886 "team"
14887 ],
14888 "readOnly": true,
14889 "type": [
14890 "string"
14891 ]
14892 },
14893 "updated_at": {
14894 "description": "when the team was updated",
14895 "example": "2012-01-01T12:00:00Z",
14896 "format": "date-time",
14897 "readOnly": true,
14898 "type": [
14899 "string"
14900 ]
14901 }
14902 },
14903 "links": [
14904 {
14905 "description": "List teams in which you are a member.",
14906 "href": "/teams",
14907 "method": "GET",
14908 "rel": "instances",
14909 "targetSchema": {
14910 "items": {
14911 "$ref": "#/definitions/team"
14912 },
14913 "type": [
14914 "array"
14915 ]
14916 },
14917 "title": "List"
14918 },
14919 {
14920 "description": "Info for a team.",
14921 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}",
14922 "method": "GET",
14923 "rel": "self",
14924 "title": "Info"
14925 },
14926 {
14927 "description": "Update team properties.",
14928 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}",
14929 "method": "PATCH",
14930 "rel": "update",
14931 "schema": {
14932 "properties": {
14933 "default": {
14934 "$ref": "#/definitions/team/definitions/default"
14935 },
14936 "name": {
14937 "$ref": "#/definitions/team/definitions/name"
14938 }
14939 },
14940 "type": [
14941 "object"
14942 ]
14943 },
14944 "targetSchema": {
14945 "$ref": "#/definitions/team"
14946 },
14947 "title": "Update"
14948 },
14949 {
14950 "description": "Create a new team.",
14951 "href": "/teams",
14952 "method": "POST",
14953 "rel": "create",
14954 "schema": {
14955 "properties": {
14956 "name": {
14957 "$ref": "#/definitions/team/definitions/name"
14958 },
14959 "address_1": {
14960 "$ref": "#/definitions/team/definitions/address_1"
14961 },
14962 "address_2": {
14963 "$ref": "#/definitions/team/definitions/address_2"
14964 },
14965 "card_number": {
14966 "$ref": "#/definitions/team/definitions/card_number"
14967 },
14968 "city": {
14969 "$ref": "#/definitions/team/definitions/city"
14970 },
14971 "country": {
14972 "$ref": "#/definitions/team/definitions/country"
14973 },
14974 "cvv": {
14975 "$ref": "#/definitions/team/definitions/cvv"
14976 },
14977 "expiration_month": {
14978 "$ref": "#/definitions/team/definitions/expiration_month"
14979 },
14980 "expiration_year": {
14981 "$ref": "#/definitions/team/definitions/expiration_year"
14982 },
14983 "first_name": {
14984 "$ref": "#/definitions/team/definitions/first_name"
14985 },
14986 "last_name": {
14987 "$ref": "#/definitions/team/definitions/last_name"
14988 },
14989 "other": {
14990 "$ref": "#/definitions/team/definitions/other"
14991 },
14992 "postal_code": {
14993 "$ref": "#/definitions/team/definitions/postal_code"
14994 },
14995 "state": {
14996 "$ref": "#/definitions/team/definitions/state"
14997 },
14998 "nonce": {
14999 "$ref": "#/definitions/team/definitions/nonce"
15000 },
15001 "device_data": {
15002 "$ref": "#/definitions/team/definitions/device_data"
15003 }
15004 },
15005 "required": [
15006 "name"
15007 ],
15008 "type": [
15009 "object"
15010 ]
15011 },
15012 "targetSchema": {
15013 "$ref": "#/definitions/team"
15014 },
15015 "title": "Create"
15016 },
15017 {
15018 "description": "Delete an existing team.",
15019 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}",
15020 "method": "DELETE",
15021 "rel": "destroy",
15022 "targetSchema": {
15023 "$ref": "#/definitions/team"
15024 },
15025 "title": "Delete"
15026 }
15027 ],
15028 "properties": {
15029 "id": {
15030 "$ref": "#/definitions/team/definitions/id"
15031 },
15032 "created_at": {
15033 "$ref": "#/definitions/team/definitions/created_at"
15034 },
15035 "credit_card_collections": {
15036 "$ref": "#/definitions/team/definitions/credit_card_collections"
15037 },
15038 "default": {
15039 "$ref": "#/definitions/team/definitions/default"
15040 },
15041 "membership_limit": {
15042 "$ref": "#/definitions/team/definitions/membership_limit"
15043 },
15044 "name": {
15045 "$ref": "#/definitions/team/definitions/name"
15046 },
15047 "provisioned_licenses": {
15048 "$ref": "#/definitions/team/definitions/provisioned_licenses"
15049 },
15050 "role": {
15051 "$ref": "#/definitions/team/definitions/role"
15052 },
15053 "type": {
15054 "$ref": "#/definitions/team/definitions/type"
15055 },
15056 "updated_at": {
15057 "$ref": "#/definitions/team/definitions/updated_at"
15058 }
15059 }
15060 },
15061 "test-case": {
15062 "$schema": "http://json-schema.org/draft-04/hyper-schema",
15063 "title": "Test Case",
15064 "description": "A single test case belonging to a test run",
15065 "stability": "prototype",
15066 "strictProperties": true,
15067 "type": [
15068 "object"
15069 ],
15070 "definitions": {
15071 "id": {
15072 "description": "unique identifier of a test case",
15073 "readOnly": true,
15074 "format": "uuid",
15075 "type": [
15076 "string"
15077 ]
15078 },
15079 "description": {
15080 "description": "description of the test case",
15081 "type": [
15082 "string"
15083 ]
15084 },
15085 "diagnostic": {
15086 "description": "meta information about the test case",
15087 "type": [
15088 "string"
15089 ]
15090 },
15091 "directive": {
15092 "description": "special note about the test case e.g. skipped, todo",
15093 "type": [
15094 "string"
15095 ]
15096 },
15097 "passed": {
15098 "description": "whether the test case was successful",
15099 "type": [
15100 "boolean"
15101 ]
15102 },
15103 "number": {
15104 "description": "the test number",
15105 "type": [
15106 "integer"
15107 ]
15108 },
15109 "identity": {
15110 "anyOf": [
15111 {
15112 "$ref": "#/definitions/test-case/definitions/id"
15113 }
15114 ]
15115 },
15116 "created_at": {
15117 "description": "when test case was created",
15118 "format": "date-time",
15119 "readOnly": true,
15120 "type": [
15121 "string"
15122 ]
15123 },
15124 "updated_at": {
15125 "description": "when test case was updated",
15126 "format": "date-time",
15127 "readOnly": true,
15128 "type": [
15129 "string"
15130 ]
15131 }
15132 },
15133 "links": [
15134 {
15135 "description": "List test cases",
15136 "href": "/test-runs/{(%23%2Fdefinitions%2Ftest-run%2Fdefinitions%2Fid)}/test-cases",
15137 "method": "GET",
15138 "rel": "instances",
15139 "targetSchema": {
15140 "items": {
15141 "$ref": "#/definitions/test-case"
15142 }
15143 },
15144 "type": [
15145 "array"
15146 ],
15147 "title": "List"
15148 }
15149 ],
15150 "properties": {
15151 "id": {
15152 "$ref": "#/definitions/test-case/definitions/id"
15153 },
15154 "created_at": {
15155 "$ref": "#/definitions/test-case/definitions/created_at"
15156 },
15157 "updated_at": {
15158 "$ref": "#/definitions/test-case/definitions/updated_at"
15159 },
15160 "description": {
15161 "$ref": "#/definitions/test-case/definitions/description"
15162 },
15163 "diagnostic": {
15164 "$ref": "#/definitions/test-case/definitions/diagnostic"
15165 },
15166 "directive": {
15167 "$ref": "#/definitions/test-case/definitions/directive"
15168 },
15169 "passed": {
15170 "$ref": "#/definitions/test-case/definitions/passed"
15171 },
15172 "number": {
15173 "$ref": "#/definitions/test-case/definitions/number"
15174 },
15175 "test_node": {
15176 "description": "the test node which executed this test case",
15177 "properties": {
15178 "id": {
15179 "$ref": "#/definitions/test-node/definitions/identity"
15180 }
15181 },
15182 "type": [
15183 "object"
15184 ]
15185 },
15186 "test_run": {
15187 "description": "the test run which owns this test case",
15188 "properties": {
15189 "id": {
15190 "$ref": "#/definitions/test-run/definitions/identity"
15191 }
15192 },
15193 "type": [
15194 "object"
15195 ]
15196 }
15197 }
15198 },
15199 "test-node": {
15200 "$schema": "http://json-schema.org/draft-04/hyper-schema",
15201 "title": "Test Node",
15202 "description": "A single test node belonging to a test run",
15203 "stability": "prototype",
15204 "strictProperties": true,
15205 "type": [
15206 "object"
15207 ],
15208 "definitions": {
15209 "id": {
15210 "description": "unique identifier of a test node",
15211 "example": "01234567-89ab-cdef-0123-456789abcdef",
15212 "format": "uuid",
15213 "readOnly": true,
15214 "type": [
15215 "string"
15216 ]
15217 },
15218 "attach_url": {
15219 "description": "a URL to stream output from for debug runs or null for non-debug runs",
15220 "example": "rendezvous://rendezvous.runtime.heroku.com:5000/{rendezvous-id}",
15221 "readOnly": true,
15222 "type": [
15223 "string",
15224 "null"
15225 ]
15226 },
15227 "created_at": {
15228 "description": "when test node was created",
15229 "format": "date-time",
15230 "readOnly": true,
15231 "type": [
15232 "string"
15233 ]
15234 },
15235 "error_status": {
15236 "description": "the status of the test run when the error occured",
15237 "type": [
15238 "string",
15239 "null"
15240 ]
15241 },
15242 "exit_code": {
15243 "description": "the exit code of the test script",
15244 "type": [
15245 "integer",
15246 "null"
15247 ]
15248 },
15249 "identity": {
15250 "anyOf": [
15251 {
15252 "$ref": "#/definitions/test-node/definitions/id"
15253 }
15254 ]
15255 },
15256 "index": {
15257 "description": "The index of the test node",
15258 "type": [
15259 "integer"
15260 ]
15261 },
15262 "message": {
15263 "description": "human friendly message indicating reason for an error",
15264 "type": [
15265 "string",
15266 "null"
15267 ]
15268 },
15269 "output_stream_url": {
15270 "description": "the streaming output for the test node",
15271 "example": "https://example.com/output.log",
15272 "type": [
15273 "string"
15274 ]
15275 },
15276 "setup_stream_url": {
15277 "description": "the streaming test setup output for the test node",
15278 "example": "https://example.com/test-setup.log",
15279 "type": [
15280 "string"
15281 ]
15282 },
15283 "status": {
15284 "description": "current state of the test run",
15285 "enum": [
15286 "pending",
15287 "cancelled",
15288 "creating",
15289 "building",
15290 "running",
15291 "succeeded",
15292 "failed",
15293 "errored",
15294 "debugging"
15295 ],
15296 "readOnly": true,
15297 "type": [
15298 "string"
15299 ]
15300 },
15301 "updated_at": {
15302 "description": "when test node was updated",
15303 "format": "date-time",
15304 "readOnly": true,
15305 "type": [
15306 "string"
15307 ]
15308 }
15309 },
15310 "links": [
15311 {
15312 "description": "List test nodes",
15313 "href": "/test-runs/{(%23%2Fdefinitions%2Ftest-run%2Fdefinitions%2Fidentity)}/test-nodes",
15314 "method": "GET",
15315 "rel": "instances",
15316 "targetSchema": {
15317 "items": {
15318 "$ref": "#/definitions/test-node"
15319 }
15320 },
15321 "type": [
15322 "array"
15323 ],
15324 "title": "List"
15325 }
15326 ],
15327 "properties": {
15328 "created_at": {
15329 "$ref": "#/definitions/test-node/definitions/created_at"
15330 },
15331 "dyno": {
15332 "description": "the dyno which belongs to this test node",
15333 "properties": {
15334 "id": {
15335 "$ref": "#/definitions/dyno/definitions/identity"
15336 },
15337 "attach_url": {
15338 "$ref": "#/definitions/test-node/definitions/attach_url"
15339 }
15340 },
15341 "type": [
15342 "object",
15343 "null"
15344 ]
15345 },
15346 "error_status": {
15347 "$ref": "#/definitions/test-node/definitions/error_status"
15348 },
15349 "exit_code": {
15350 "$ref": "#/definitions/test-node/definitions/exit_code"
15351 },
15352 "id": {
15353 "$ref": "#/definitions/test-node/definitions/identity"
15354 },
15355 "index": {
15356 "$ref": "#/definitions/test-node/definitions/index"
15357 },
15358 "message": {
15359 "$ref": "#/definitions/test-node/definitions/message"
15360 },
15361 "output_stream_url": {
15362 "$ref": "#/definitions/test-node/definitions/output_stream_url"
15363 },
15364 "pipeline": {
15365 "description": "the pipeline which owns this test node",
15366 "properties": {
15367 "id": {
15368 "$ref": "#/definitions/pipeline/definitions/identity"
15369 }
15370 },
15371 "type": [
15372 "object"
15373 ]
15374 },
15375 "setup_stream_url": {
15376 "$ref": "#/definitions/test-node/definitions/setup_stream_url"
15377 },
15378 "status": {
15379 "$ref": "#/definitions/test-node/definitions/status"
15380 },
15381 "updated_at": {
15382 "$ref": "#/definitions/test-node/definitions/updated_at"
15383 },
15384 "test_run": {
15385 "description": "the test run which owns this test node",
15386 "properties": {
15387 "id": {
15388 "$ref": "#/definitions/test-run/definitions/identity"
15389 }
15390 },
15391 "type": [
15392 "object"
15393 ]
15394 }
15395 }
15396 },
15397 "test-run": {
15398 "$schema": "http://json-schema.org/draft-04/hyper-schema",
15399 "title": "Test Run",
15400 "description": "An execution or trial of one or more tests",
15401 "stability": "prototype",
15402 "strictProperties": true,
15403 "type": [
15404 "object"
15405 ],
15406 "definitions": {
15407 "actor_email": {
15408 "description": "the email of the actor triggering the test run",
15409 "type": [
15410 "string"
15411 ],
15412 "format": "email"
15413 },
15414 "clear_cache": {
15415 "description": "whether the test was run with an empty cache",
15416 "type": [
15417 "boolean",
15418 "null"
15419 ]
15420 },
15421 "commit_branch": {
15422 "description": "the branch of the repository that the test run concerns",
15423 "type": [
15424 "string"
15425 ]
15426 },
15427 "commit_message": {
15428 "description": "the message for the commit under test",
15429 "type": [
15430 "string"
15431 ]
15432 },
15433 "commit_sha": {
15434 "description": "the SHA hash of the commit under test",
15435 "type": [
15436 "string"
15437 ]
15438 },
15439 "debug": {
15440 "description": "whether the test run was started for interactive debugging",
15441 "type": [
15442 "boolean"
15443 ]
15444 },
15445 "app_setup": {
15446 "description": "the app setup for the test run",
15447 "type": [
15448 "null",
15449 "object"
15450 ]
15451 },
15452 "id": {
15453 "description": "unique identifier of a test run",
15454 "readOnly": true,
15455 "format": "uuid",
15456 "type": [
15457 "string"
15458 ]
15459 },
15460 "identity": {
15461 "anyOf": [
15462 {
15463 "$ref": "#/definitions/test-run/definitions/id"
15464 }
15465 ]
15466 },
15467 "created_at": {
15468 "description": "when test run was created",
15469 "format": "date-time",
15470 "readOnly": true,
15471 "type": [
15472 "string"
15473 ]
15474 },
15475 "message": {
15476 "description": "human friendly message indicating reason for an error",
15477 "type": [
15478 "string",
15479 "null"
15480 ]
15481 },
15482 "number": {
15483 "description": "the auto incrementing test run number",
15484 "type": [
15485 "integer"
15486 ]
15487 },
15488 "source_blob_url": {
15489 "description": "The download location for the source code to be tested",
15490 "type": [
15491 "string"
15492 ]
15493 },
15494 "status": {
15495 "description": "current state of the test run",
15496 "enum": [
15497 "pending",
15498 "cancelled",
15499 "creating",
15500 "building",
15501 "running",
15502 "succeeded",
15503 "failed",
15504 "errored",
15505 "debugging"
15506 ],
15507 "readOnly": true,
15508 "type": [
15509 "string"
15510 ]
15511 },
15512 "updated_at": {
15513 "description": "when test-run was updated",
15514 "format": "date-time",
15515 "readOnly": true,
15516 "type": [
15517 "string"
15518 ]
15519 },
15520 "warning_message": {
15521 "description": "human friently warning emitted during the test run",
15522 "type": [
15523 "string",
15524 "null"
15525 ]
15526 }
15527 },
15528 "links": [
15529 {
15530 "description": "Create a new test-run.",
15531 "href": "/test-runs",
15532 "method": "POST",
15533 "rel": "create",
15534 "schema": {
15535 "properties": {
15536 "commit_branch": {
15537 "$ref": "#/definitions/test-run/definitions/commit_branch"
15538 },
15539 "commit_message": {
15540 "$ref": "#/definitions/test-run/definitions/commit_message"
15541 },
15542 "commit_sha": {
15543 "$ref": "#/definitions/test-run/definitions/commit_sha"
15544 },
15545 "debug": {
15546 "$ref": "#/definitions/test-run/definitions/debug"
15547 },
15548 "organization": {
15549 "$ref": "#/definitions/organization/definitions/identity"
15550 },
15551 "pipeline": {
15552 "$ref": "#/definitions/pipeline/definitions/identity"
15553 },
15554 "source_blob_url": {
15555 "$ref": "#/definitions/test-run/definitions/source_blob_url"
15556 }
15557 },
15558 "required": [
15559 "commit_branch",
15560 "commit_message",
15561 "commit_sha",
15562 "pipeline",
15563 "source_blob_url"
15564 ],
15565 "type": [
15566 "object"
15567 ]
15568 },
15569 "title": "Create"
15570 },
15571 {
15572 "description": "Info for existing test-run.",
15573 "href": "/test-runs/{(%23%2Fdefinitions%2Ftest-run%2Fdefinitions%2Fid)}",
15574 "method": "GET",
15575 "rel": "self",
15576 "title": "Info"
15577 },
15578 {
15579 "description": "List existing test-runs for a pipeline.",
15580 "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/test-runs",
15581 "method": "GET",
15582 "rel": "instances",
15583 "targetSchema": {
15584 "items": {
15585 "$ref": "#/definitions/test-run"
15586 }
15587 },
15588 "type": [
15589 "array"
15590 ],
15591 "title": "List"
15592 },
15593 {
15594 "description": "Info for existing test-run by Pipeline",
15595 "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/test-runs/{(%23%2Fdefinitions%2Ftest-run%2Fdefinitions%2Fnumber)}",
15596 "method": "GET",
15597 "rel": "self",
15598 "title": "Info By Pipeline"
15599 },
15600 {
15601 "description": "Update a test-run's status.",
15602 "href": "/test-runs/{(%23%2Fdefinitions%2Ftest-run%2Fdefinitions%2Fnumber)}",
15603 "method": "PATCH",
15604 "rel": "self",
15605 "title": "Update",
15606 "schema": {
15607 "properties": {
15608 "status": {
15609 "$ref": "#/definitions/test-run/definitions/status"
15610 },
15611 "message": {
15612 "$ref": "#/definitions/test-run/definitions/message"
15613 }
15614 },
15615 "required": [
15616 "status",
15617 "message"
15618 ],
15619 "type": [
15620 "object"
15621 ]
15622 }
15623 }
15624 ],
15625 "properties": {
15626 "actor_email": {
15627 "$ref": "#/definitions/test-run/definitions/actor_email"
15628 },
15629 "clear_cache": {
15630 "$ref": "#/definitions/test-run/definitions/clear_cache"
15631 },
15632 "commit_branch": {
15633 "$ref": "#/definitions/test-run/definitions/commit_branch"
15634 },
15635 "commit_message": {
15636 "$ref": "#/definitions/test-run/definitions/commit_message"
15637 },
15638 "commit_sha": {
15639 "$ref": "#/definitions/test-run/definitions/commit_sha"
15640 },
15641 "debug": {
15642 "$ref": "#/definitions/test-run/definitions/debug"
15643 },
15644 "app_setup": {
15645 "$ref": "#/definitions/test-run/definitions/app_setup"
15646 },
15647 "created_at": {
15648 "$ref": "#/definitions/test-run/definitions/created_at"
15649 },
15650 "dyno": {
15651 "description": "the type of dynos used for this test-run",
15652 "properties": {
15653 "size": {
15654 "$ref": "#/definitions/dyno/definitions/size"
15655 }
15656 },
15657 "type": [
15658 "null",
15659 "object"
15660 ]
15661 },
15662 "id": {
15663 "$ref": "#/definitions/test-run/definitions/id"
15664 },
15665 "message": {
15666 "$ref": "#/definitions/test-run/definitions/message"
15667 },
15668 "number": {
15669 "$ref": "#/definitions/test-run/definitions/number"
15670 },
15671 "organization": {
15672 "description": "the organization that owns this test-run",
15673 "properties": {
15674 "name": {
15675 "$ref": "#/definitions/organization/definitions/name"
15676 }
15677 },
15678 "type": [
15679 "null",
15680 "object"
15681 ]
15682 },
15683 "pipeline": {
15684 "description": "the pipeline which owns this test-run",
15685 "properties": {
15686 "id": {
15687 "$ref": "#/definitions/pipeline/definitions/identity"
15688 }
15689 },
15690 "type": [
15691 "object"
15692 ]
15693 },
15694 "status": {
15695 "$ref": "#/definitions/test-run/definitions/status"
15696 },
15697 "source_blob_url": {
15698 "$ref": "#/definitions/test-run/definitions/source_blob_url"
15699 },
15700 "updated_at": {
15701 "$ref": "#/definitions/test-run/definitions/updated_at"
15702 },
15703 "user": {
15704 "$ref": "#/definitions/account"
15705 },
15706 "warning_message": {
15707 "$ref": "#/definitions/test-run/definitions/warning_message"
15708 }
15709 }
15710 },
15711 "user-preferences": {
15712 "description": "Tracks a user's preferences and message dismissals",
15713 "$schema": "http://json-schema.org/draft-04/hyper-schema",
15714 "stability": "production",
15715 "strictProperties": true,
15716 "title": "Heroku Platform API - User Preferences",
15717 "type": [
15718 "object"
15719 ],
15720 "definitions": {
15721 "identity": {
15722 "anyOf": [
15723 {
15724 "$ref": "#/definitions/user-preferences/definitions/self"
15725 }
15726 ]
15727 },
15728 "self": {
15729 "description": "Implicit reference to currently authorized user",
15730 "enum": [
15731 "~"
15732 ],
15733 "example": "~",
15734 "readOnly": true,
15735 "type": [
15736 "string"
15737 ]
15738 },
15739 "timezone": {
15740 "description": "User's default timezone",
15741 "example": "UTC",
15742 "readOnly": false,
15743 "type": [
15744 "string",
15745 "null"
15746 ]
15747 },
15748 "default-organization": {
15749 "description": "User's default organization",
15750 "example": "sushi-inc",
15751 "readOnly": false,
15752 "type": [
15753 "string",
15754 "null"
15755 ]
15756 },
15757 "dismissed-github-banner": {
15758 "description": "Whether the user has dismissed the GitHub link banner",
15759 "example": true,
15760 "readOnly": false,
15761 "type": [
15762 "boolean",
15763 "null"
15764 ]
15765 },
15766 "dismissed-getting-started": {
15767 "description": "Whether the user has dismissed the getting started banner",
15768 "example": true,
15769 "readOnly": false,
15770 "type": [
15771 "boolean",
15772 "null"
15773 ]
15774 },
15775 "dismissed-org-access-controls": {
15776 "description": "Whether the user has dismissed the Organization Access Controls banner",
15777 "example": true,
15778 "readOnly": false,
15779 "type": [
15780 "boolean",
15781 "null"
15782 ]
15783 },
15784 "dismissed-org-wizard-notification": {
15785 "description": "Whether the user has dismissed the Organization Wizard",
15786 "example": true,
15787 "readOnly": false,
15788 "type": [
15789 "boolean",
15790 "null"
15791 ]
15792 },
15793 "dismissed-pipelines-banner": {
15794 "description": "Whether the user has dismissed the Pipelines banner",
15795 "example": true,
15796 "readOnly": false,
15797 "type": [
15798 "boolean",
15799 "null"
15800 ]
15801 },
15802 "dismissed-pipelines-github-banner": {
15803 "description": "Whether the user has dismissed the GitHub banner on a pipeline overview",
15804 "example": true,
15805 "readOnly": false,
15806 "type": [
15807 "boolean",
15808 "null"
15809 ]
15810 },
15811 "dismissed-pipelines-github-banners": {
15812 "description": "Which pipeline uuids the user has dismissed the GitHub banner for",
15813 "example": [
15814 "96c68759-f310-4910-9867-e0b062064098"
15815 ],
15816 "readOnly": false,
15817 "type": [
15818 "null",
15819 "array"
15820 ],
15821 "items": {
15822 "$ref": "#/definitions/pipeline/definitions/id"
15823 }
15824 },
15825 "dismissed-sms-banner": {
15826 "description": "Whether the user has dismissed the 2FA SMS banner",
15827 "example": true,
15828 "readOnly": false,
15829 "type": [
15830 "boolean",
15831 "null"
15832 ]
15833 }
15834 },
15835 "links": [
15836 {
15837 "description": "Retrieve User Preferences",
15838 "href": "/users/{(%23%2Fdefinitions%2Fuser-preferences%2Fdefinitions%2Fidentity)}/preferences",
15839 "method": "GET",
15840 "rel": "self",
15841 "targetSchema": {
15842 "$ref": "#/definitions/user-preferences"
15843 },
15844 "title": "List"
15845 },
15846 {
15847 "description": "Update User Preferences",
15848 "href": "/users/{(%23%2Fdefinitions%2Fuser-preferences%2Fdefinitions%2Fidentity)}/preferences",
15849 "method": "PATCH",
15850 "rel": "update",
15851 "schema": {
15852 "type": [
15853 "object"
15854 ],
15855 "properties": {
15856 "timezone": {
15857 "$ref": "#/definitions/user-preferences/definitions/timezone"
15858 },
15859 "default-organization": {
15860 "$ref": "#/definitions/user-preferences/definitions/default-organization"
15861 },
15862 "dismissed-github-banner": {
15863 "$ref": "#/definitions/user-preferences/definitions/dismissed-github-banner"
15864 },
15865 "dismissed-getting-started": {
15866 "$ref": "#/definitions/user-preferences/definitions/dismissed-getting-started"
15867 },
15868 "dismissed-org-access-controls": {
15869 "$ref": "#/definitions/user-preferences/definitions/dismissed-org-access-controls"
15870 },
15871 "dismissed-org-wizard-notification": {
15872 "$ref": "#/definitions/user-preferences/definitions/dismissed-org-wizard-notification"
15873 },
15874 "dismissed-pipelines-banner": {
15875 "$ref": "#/definitions/user-preferences/definitions/dismissed-pipelines-banner"
15876 },
15877 "dismissed-pipelines-github-banner": {
15878 "$ref": "#/definitions/user-preferences/definitions/dismissed-pipelines-github-banner"
15879 },
15880 "dismissed-pipelines-github-banners": {
15881 "$ref": "#/definitions/user-preferences/definitions/dismissed-pipelines-github-banners"
15882 },
15883 "dismissed-sms-banner": {
15884 "$ref": "#/definitions/user-preferences/definitions/dismissed-sms-banner"
15885 }
15886 }
15887 },
15888 "targetSchema": {
15889 "$ref": "#/definitions/user-preferences"
15890 },
15891 "title": "Update"
15892 }
15893 ],
15894 "properties": {
15895 "timezone": {
15896 "$ref": "#/definitions/user-preferences/definitions/timezone"
15897 },
15898 "default-organization": {
15899 "$ref": "#/definitions/user-preferences/definitions/default-organization"
15900 },
15901 "dismissed-github-banner": {
15902 "$ref": "#/definitions/user-preferences/definitions/dismissed-github-banner"
15903 },
15904 "dismissed-getting-started": {
15905 "$ref": "#/definitions/user-preferences/definitions/dismissed-getting-started"
15906 },
15907 "dismissed-org-access-controls": {
15908 "$ref": "#/definitions/user-preferences/definitions/dismissed-org-access-controls"
15909 },
15910 "dismissed-org-wizard-notification": {
15911 "$ref": "#/definitions/user-preferences/definitions/dismissed-org-wizard-notification"
15912 },
15913 "dismissed-pipelines-banner": {
15914 "$ref": "#/definitions/user-preferences/definitions/dismissed-pipelines-banner"
15915 },
15916 "dismissed-pipelines-github-banner": {
15917 "$ref": "#/definitions/user-preferences/definitions/dismissed-pipelines-github-banner"
15918 },
15919 "dismissed-pipelines-github-banners": {
15920 "$ref": "#/definitions/user-preferences/definitions/dismissed-pipelines-github-banners"
15921 },
15922 "dismissed-sms-banner": {
15923 "$ref": "#/definitions/user-preferences/definitions/dismissed-sms-banner"
15924 }
15925 }
15926 },
15927 "vpn-connection": {
15928 "description": "[VPN](https://devcenter.heroku.com/articles/private-spaces-vpn?preview=1) provides a way to connect your Private Spaces to your network via VPN.",
15929 "$schema": "http://json-schema.org/draft-04/hyper-schema",
15930 "stability": "production",
15931 "strictProperties": true,
15932 "title": "Heroku Platform API - Private Spaces VPN",
15933 "type": [
15934 "object"
15935 ],
15936 "definitions": {
15937 "name": {
15938 "description": "VPN Name",
15939 "example": "office",
15940 "type": [
15941 "string"
15942 ]
15943 },
15944 "public_ip": {
15945 "description": "Public IP of VPN customer gateway",
15946 "example": "35.161.69.30",
15947 "type": [
15948 "string"
15949 ]
15950 },
15951 "routable_cidrs": {
15952 "description": "Routable CIDRs of VPN",
15953 "type": [
15954 "array"
15955 ],
15956 "items": {
15957 "example": "172.16.0.0/16",
15958 "type": [
15959 "string"
15960 ]
15961 }
15962 },
15963 "id": {
15964 "description": "VPN ID",
15965 "example": "123456789012",
15966 "readOnly": true,
15967 "type": [
15968 "string"
15969 ]
15970 },
15971 "identity": {
15972 "anyOf": [
15973 {
15974 "$ref": "#/definitions/vpn-connection/definitions/id"
15975 },
15976 {
15977 "$ref": "#/definitions/vpn-connection/definitions/name"
15978 }
15979 ]
15980 },
15981 "space_cidr_block": {
15982 "description": "CIDR Block of the Private Space",
15983 "example": "10.0.0.0/16",
15984 "readOnly": true,
15985 "type": [
15986 "string"
15987 ]
15988 },
15989 "ike_version": {
15990 "description": "IKE Version",
15991 "example": 1,
15992 "readOnly": true,
15993 "type": [
15994 "integer"
15995 ]
15996 },
15997 "tunnel": {
15998 "description": "Tunnel info",
15999 "readOnly": true,
16000 "type": [
16001 "object"
16002 ],
16003 "properties": {
16004 "last_status_change": {
16005 "description": "Timestamp of last status changed",
16006 "example": "2016-10-25T22:09:05Z",
16007 "type": [
16008 "string"
16009 ]
16010 },
16011 "ip": {
16012 "description": "Public IP address for the tunnel",
16013 "example": "52.44.146.197",
16014 "type": [
16015 "string"
16016 ]
16017 },
16018 "customer_ip": {
16019 "description": "Public IP address for the customer side of the tunnel",
16020 "example": "52.44.146.197",
16021 "type": [
16022 "string"
16023 ]
16024 },
16025 "pre_shared_key": {
16026 "description": "Pre-shared key",
16027 "example": "secret",
16028 "type": [
16029 "string"
16030 ]
16031 },
16032 "status": {
16033 "description": "Status of the tunnel",
16034 "enum": [
16035 "UP",
16036 "DOWN"
16037 ],
16038 "example": "UP",
16039 "type": [
16040 "string"
16041 ]
16042 },
16043 "status_message": {
16044 "description": "Details of the status",
16045 "example": "status message",
16046 "type": [
16047 "string"
16048 ]
16049 }
16050 }
16051 },
16052 "status": {
16053 "description": "Status of the VPN",
16054 "enum": [
16055 "pending",
16056 "provisioning",
16057 "active",
16058 "deprovisioning",
16059 "failed"
16060 ],
16061 "example": "active",
16062 "readOnly": true,
16063 "type": [
16064 "string"
16065 ]
16066 },
16067 "status_message": {
16068 "description": "Details of the status",
16069 "example": "supplied CIDR block already in use",
16070 "readOnly": true,
16071 "type": [
16072 "string"
16073 ]
16074 }
16075 },
16076 "properties": {
16077 "id": {
16078 "$ref": "#/definitions/vpn-connection/definitions/id"
16079 },
16080 "name": {
16081 "$ref": "#/definitions/vpn-connection/definitions/name"
16082 },
16083 "public_ip": {
16084 "$ref": "#/definitions/vpn-connection/definitions/public_ip"
16085 },
16086 "routable_cidrs": {
16087 "$ref": "#/definitions/vpn-connection/definitions/routable_cidrs"
16088 },
16089 "space_cidr_block": {
16090 "$ref": "#/definitions/vpn-connection/definitions/space_cidr_block"
16091 },
16092 "tunnels": {
16093 "items": {
16094 "$ref": "#/definitions/vpn-connection/definitions/tunnel"
16095 },
16096 "type": [
16097 "array"
16098 ]
16099 },
16100 "ike_version": {
16101 "$ref": "#/definitions/vpn-connection/definitions/ike_version"
16102 },
16103 "status": {
16104 "$ref": "#/definitions/vpn-connection/definitions/status"
16105 },
16106 "status_message": {
16107 "$ref": "#/definitions/vpn-connection/definitions/status_message"
16108 }
16109 },
16110 "links": [
16111 {
16112 "description": "Create a new VPN connection in a private space.",
16113 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/vpn-connections",
16114 "rel": "create",
16115 "schema": {
16116 "properties": {
16117 "name": {
16118 "$ref": "#/definitions/vpn-connection/definitions/name"
16119 },
16120 "public_ip": {
16121 "$ref": "#/definitions/vpn-connection/definitions/public_ip"
16122 },
16123 "routable_cidrs": {
16124 "$ref": "#/definitions/vpn-connection/definitions/routable_cidrs"
16125 }
16126 },
16127 "required": [
16128 "name",
16129 "public_ip",
16130 "routable_cidrs"
16131 ],
16132 "type": [
16133 "object"
16134 ]
16135 },
16136 "targetSchema": {
16137 "$ref": "#/definitions/vpn-connection"
16138 },
16139 "method": "POST",
16140 "title": "Create"
16141 },
16142 {
16143 "description": "Destroy existing VPN Connection",
16144 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/vpn-connections/{(%23%2Fdefinitions%2Fvpn-connection%2Fdefinitions%2Fidentity)}",
16145 "rel": "empty",
16146 "method": "DELETE",
16147 "title": "Destroy"
16148 },
16149 {
16150 "description": "List VPN connections for a space.",
16151 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/vpn-connections",
16152 "method": "GET",
16153 "rel": "instances",
16154 "targetSchema": {
16155 "items": {
16156 "$ref": "#/definitions/vpn-connection"
16157 },
16158 "type": [
16159 "array"
16160 ]
16161 },
16162 "title": "List"
16163 },
16164 {
16165 "description": "Info for an existing vpn-connection.",
16166 "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/vpn-connections/{(%23%2Fdefinitions%2Fvpn-connection%2Fdefinitions%2Fidentity)}",
16167 "method": "GET",
16168 "rel": "self",
16169 "targetSchema": {
16170 "$ref": "#/definitions/vpn-connection"
16171 },
16172 "title": "Info"
16173 }
16174 ]
16175 },
16176 "whitelisted-add-on-service": {
16177 "description": "Entities that have been whitelisted to be used by an Organization",
16178 "$schema": "http://json-schema.org/draft-04/hyper-schema",
16179 "stability": "prototype",
16180 "strictProperties": true,
16181 "title": "Heroku Platform API - Whitelisted Entity",
16182 "type": [
16183 "object"
16184 ],
16185 "definitions": {
16186 "added_at": {
16187 "description": "when the add-on service was whitelisted",
16188 "example": "2012-01-01T12:00:00Z",
16189 "format": "date-time",
16190 "readOnly": true,
16191 "type": [
16192 "string"
16193 ]
16194 },
16195 "added_by": {
16196 "description": "the user which whitelisted the Add-on Service",
16197 "properties": {
16198 "email": {
16199 "$ref": "#/definitions/account/definitions/email",
16200 "type": [
16201 "string",
16202 "null"
16203 ]
16204 },
16205 "id": {
16206 "$ref": "#/definitions/account/definitions/id",
16207 "type": [
16208 "string",
16209 "null"
16210 ]
16211 }
16212 },
16213 "readOnly": true,
16214 "type": [
16215 "object"
16216 ]
16217 },
16218 "addon_service": {
16219 "description": "the Add-on Service whitelisted for use",
16220 "properties": {
16221 "id": {
16222 "$ref": "#/definitions/add-on-service/definitions/id"
16223 },
16224 "name": {
16225 "$ref": "#/definitions/add-on-service/definitions/name"
16226 },
16227 "human_name": {
16228 "$ref": "#/definitions/add-on-service/definitions/human_name"
16229 }
16230 },
16231 "readOnly": true,
16232 "type": [
16233 "object"
16234 ]
16235 },
16236 "id": {
16237 "description": "unique identifier for this whitelisting entity",
16238 "example": "01234567-89ab-cdef-0123-456789abcdef",
16239 "format": "uuid",
16240 "readOnly": true,
16241 "type": [
16242 "string"
16243 ]
16244 },
16245 "identity": {
16246 "anyOf": [
16247 {
16248 "$ref": "#/definitions/whitelisted-add-on-service/definitions/id"
16249 },
16250 {
16251 "$ref": "#/definitions/add-on-service/definitions/name"
16252 }
16253 ]
16254 }
16255 },
16256 "links": [
16257 {
16258 "description": "List all whitelisted Add-on Services for an Organization",
16259 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/whitelisted-addon-services",
16260 "method": "GET",
16261 "rel": "instances",
16262 "targetSchema": {
16263 "items": {
16264 "$ref": "#/definitions/whitelisted-add-on-service"
16265 },
16266 "type": [
16267 "array"
16268 ]
16269 },
16270 "title": "List By Organization"
16271 },
16272 {
16273 "description": "Whitelist an Add-on Service",
16274 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/whitelisted-addon-services",
16275 "method": "POST",
16276 "rel": "create",
16277 "schema": {
16278 "type": [
16279 "object"
16280 ],
16281 "properties": {
16282 "addon_service": {
16283 "description": "name of the Add-on to whitelist",
16284 "example": "heroku-postgresql",
16285 "type": [
16286 "string"
16287 ]
16288 }
16289 }
16290 },
16291 "targetSchema": {
16292 "items": {
16293 "$ref": "#/definitions/whitelisted-add-on-service"
16294 },
16295 "type": [
16296 "array"
16297 ]
16298 },
16299 "title": "Create By Organization"
16300 },
16301 {
16302 "description": "Remove a whitelisted entity",
16303 "href": "/organizations/{(%23%2Fdefinitions%2Forganization%2Fdefinitions%2Fidentity)}/whitelisted-addon-services/{(%23%2Fdefinitions%2Fwhitelisted-add-on-service%2Fdefinitions%2Fidentity)}",
16304 "method": "DELETE",
16305 "rel": "destroy",
16306 "targetSchema": {
16307 "$ref": "#/definitions/whitelisted-add-on-service"
16308 },
16309 "title": "Delete By Organization"
16310 },
16311 {
16312 "description": "List all whitelisted Add-on Services for a Team",
16313 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/whitelisted-addon-services",
16314 "method": "GET",
16315 "rel": "instances",
16316 "targetSchema": {
16317 "items": {
16318 "$ref": "#/definitions/whitelisted-add-on-service"
16319 },
16320 "type": [
16321 "array"
16322 ]
16323 },
16324 "title": "List By Team"
16325 },
16326 {
16327 "description": "Whitelist an Add-on Service",
16328 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/whitelisted-addon-services",
16329 "method": "POST",
16330 "rel": "create",
16331 "schema": {
16332 "type": [
16333 "object"
16334 ],
16335 "properties": {
16336 "addon_service": {
16337 "description": "name of the Add-on to whitelist",
16338 "example": "heroku-postgresql",
16339 "type": [
16340 "string"
16341 ]
16342 }
16343 }
16344 },
16345 "targetSchema": {
16346 "items": {
16347 "$ref": "#/definitions/whitelisted-add-on-service"
16348 },
16349 "type": [
16350 "array"
16351 ]
16352 },
16353 "title": "Create By Team"
16354 },
16355 {
16356 "description": "Remove a whitelisted entity",
16357 "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/whitelisted-addon-services/{(%23%2Fdefinitions%2Fwhitelisted-add-on-service%2Fdefinitions%2Fidentity)}",
16358 "method": "DELETE",
16359 "rel": "destroy",
16360 "targetSchema": {
16361 "$ref": "#/definitions/whitelisted-add-on-service"
16362 },
16363 "title": "Delete By Team"
16364 }
16365 ],
16366 "properties": {
16367 "added_at": {
16368 "$ref": "#/definitions/whitelisted-add-on-service/definitions/added_at"
16369 },
16370 "added_by": {
16371 "$ref": "#/definitions/whitelisted-add-on-service/definitions/added_by"
16372 },
16373 "addon_service": {
16374 "$ref": "#/definitions/whitelisted-add-on-service/definitions/addon_service"
16375 },
16376 "id": {
16377 "$ref": "#/definitions/whitelisted-add-on-service/definitions/id"
16378 }
16379 }
16380 }
16381 },
16382 "properties": {
16383 "account-feature": {
16384 "$ref": "#/definitions/account-feature"
16385 },
16386 "account": {
16387 "$ref": "#/definitions/account"
16388 },
16389 "add-on-action": {
16390 "$ref": "#/definitions/add-on-action"
16391 },
16392 "add-on-attachment": {
16393 "$ref": "#/definitions/add-on-attachment"
16394 },
16395 "add-on-config": {
16396 "$ref": "#/definitions/add-on-config"
16397 },
16398 "add-on-plan-action": {
16399 "$ref": "#/definitions/add-on-plan-action"
16400 },
16401 "add-on-region-capability": {
16402 "$ref": "#/definitions/add-on-region-capability"
16403 },
16404 "add-on-service": {
16405 "$ref": "#/definitions/add-on-service"
16406 },
16407 "add-on-webhook-delivery": {
16408 "$ref": "#/definitions/add-on-webhook-delivery"
16409 },
16410 "add-on-webhook-event": {
16411 "$ref": "#/definitions/add-on-webhook-event"
16412 },
16413 "add-on-webhook": {
16414 "$ref": "#/definitions/add-on-webhook"
16415 },
16416 "add-on": {
16417 "$ref": "#/definitions/add-on"
16418 },
16419 "app-feature": {
16420 "$ref": "#/definitions/app-feature"
16421 },
16422 "app-formation-set": {
16423 "$ref": "#/definitions/app-formation-set"
16424 },
16425 "app-setup": {
16426 "$ref": "#/definitions/app-setup"
16427 },
16428 "app-transfer": {
16429 "$ref": "#/definitions/app-transfer"
16430 },
16431 "app-webhook-delivery": {
16432 "$ref": "#/definitions/app-webhook-delivery"
16433 },
16434 "app-webhook-event": {
16435 "$ref": "#/definitions/app-webhook-event"
16436 },
16437 "app-webhook": {
16438 "$ref": "#/definitions/app-webhook"
16439 },
16440 "app": {
16441 "$ref": "#/definitions/app"
16442 },
16443 "build-result": {
16444 "$ref": "#/definitions/build-result"
16445 },
16446 "build": {
16447 "$ref": "#/definitions/build"
16448 },
16449 "buildpack-installation": {
16450 "$ref": "#/definitions/buildpack-installation"
16451 },
16452 "collaborator": {
16453 "$ref": "#/definitions/collaborator"
16454 },
16455 "config-var": {
16456 "$ref": "#/definitions/config-var"
16457 },
16458 "credit": {
16459 "$ref": "#/definitions/credit"
16460 },
16461 "domain": {
16462 "$ref": "#/definitions/domain"
16463 },
16464 "dyno-size": {
16465 "$ref": "#/definitions/dyno-size"
16466 },
16467 "dyno": {
16468 "$ref": "#/definitions/dyno"
16469 },
16470 "filter-apps": {
16471 "$ref": "#/definitions/filter-apps"
16472 },
16473 "formation": {
16474 "$ref": "#/definitions/formation"
16475 },
16476 "identity-provider": {
16477 "$ref": "#/definitions/identity-provider"
16478 },
16479 "inbound-ruleset": {
16480 "$ref": "#/definitions/inbound-ruleset"
16481 },
16482 "invoice-address": {
16483 "$ref": "#/definitions/invoice-address"
16484 },
16485 "invoice": {
16486 "$ref": "#/definitions/invoice"
16487 },
16488 "key": {
16489 "$ref": "#/definitions/key"
16490 },
16491 "log-drain": {
16492 "$ref": "#/definitions/log-drain"
16493 },
16494 "log-session": {
16495 "$ref": "#/definitions/log-session"
16496 },
16497 "oauth-authorization": {
16498 "$ref": "#/definitions/oauth-authorization"
16499 },
16500 "oauth-client": {
16501 "$ref": "#/definitions/oauth-client"
16502 },
16503 "oauth-grant": {
16504 "$ref": "#/definitions/oauth-grant"
16505 },
16506 "oauth-token": {
16507 "$ref": "#/definitions/oauth-token"
16508 },
16509 "organization-add-on": {
16510 "$ref": "#/definitions/organization-add-on"
16511 },
16512 "organization-app-collaborator": {
16513 "$ref": "#/definitions/organization-app-collaborator"
16514 },
16515 "organization-app": {
16516 "$ref": "#/definitions/organization-app"
16517 },
16518 "organization-feature": {
16519 "$ref": "#/definitions/organization-feature"
16520 },
16521 "organization-invitation": {
16522 "$ref": "#/definitions/organization-invitation"
16523 },
16524 "organization-invoice": {
16525 "$ref": "#/definitions/organization-invoice"
16526 },
16527 "organization-member": {
16528 "$ref": "#/definitions/organization-member"
16529 },
16530 "organization-preferences": {
16531 "$ref": "#/definitions/organization-preferences"
16532 },
16533 "organization": {
16534 "$ref": "#/definitions/organization"
16535 },
16536 "outbound-ruleset": {
16537 "$ref": "#/definitions/outbound-ruleset"
16538 },
16539 "password-reset": {
16540 "$ref": "#/definitions/password-reset"
16541 },
16542 "peering-info": {
16543 "$ref": "#/definitions/peering-info"
16544 },
16545 "peering": {
16546 "$ref": "#/definitions/peering"
16547 },
16548 "organization-app-permission": {
16549 "$ref": "#/definitions/organization-app-permission"
16550 },
16551 "pipeline-coupling": {
16552 "$ref": "#/definitions/pipeline-coupling"
16553 },
16554 "pipeline-promotion-target": {
16555 "$ref": "#/definitions/pipeline-promotion-target"
16556 },
16557 "pipeline-promotion": {
16558 "$ref": "#/definitions/pipeline-promotion"
16559 },
16560 "pipeline": {
16561 "$ref": "#/definitions/pipeline"
16562 },
16563 "plan": {
16564 "$ref": "#/definitions/plan"
16565 },
16566 "rate-limit": {
16567 "$ref": "#/definitions/rate-limit"
16568 },
16569 "region": {
16570 "$ref": "#/definitions/region"
16571 },
16572 "release": {
16573 "$ref": "#/definitions/release"
16574 },
16575 "slug": {
16576 "$ref": "#/definitions/slug"
16577 },
16578 "sms-number": {
16579 "$ref": "#/definitions/sms-number"
16580 },
16581 "sni-endpoint": {
16582 "$ref": "#/definitions/sni-endpoint"
16583 },
16584 "source": {
16585 "$ref": "#/definitions/source"
16586 },
16587 "space-app-access": {
16588 "$ref": "#/definitions/space-app-access"
16589 },
16590 "space-nat": {
16591 "$ref": "#/definitions/space-nat"
16592 },
16593 "space": {
16594 "$ref": "#/definitions/space"
16595 },
16596 "ssl-endpoint": {
16597 "$ref": "#/definitions/ssl-endpoint"
16598 },
16599 "stack": {
16600 "$ref": "#/definitions/stack"
16601 },
16602 "team-app-collaborator": {
16603 "$ref": "#/definitions/team-app-collaborator"
16604 },
16605 "team-app-permission": {
16606 "$ref": "#/definitions/team-app-permission"
16607 },
16608 "team-app": {
16609 "$ref": "#/definitions/team-app"
16610 },
16611 "team-feature": {
16612 "$ref": "#/definitions/team-feature"
16613 },
16614 "team-invitation": {
16615 "$ref": "#/definitions/team-invitation"
16616 },
16617 "team-invoice": {
16618 "$ref": "#/definitions/team-invoice"
16619 },
16620 "team-member": {
16621 "$ref": "#/definitions/team-member"
16622 },
16623 "team-preferences": {
16624 "$ref": "#/definitions/team-preferences"
16625 },
16626 "team": {
16627 "$ref": "#/definitions/team"
16628 },
16629 "test-case": {
16630 "$ref": "#/definitions/test-case"
16631 },
16632 "test-node": {
16633 "$ref": "#/definitions/test-node"
16634 },
16635 "test-run": {
16636 "$ref": "#/definitions/test-run"
16637 },
16638 "user-preferences": {
16639 "$ref": "#/definitions/user-preferences"
16640 },
16641 "vpn-connection": {
16642 "$ref": "#/definitions/vpn-connection"
16643 },
16644 "whitelisted-add-on-service": {
16645 "$ref": "#/definitions/whitelisted-add-on-service"
16646 }
16647 },
16648 "description": "The platform API empowers developers to automate, extend and combine Heroku with other services.",
16649 "id": "http://api.heroku.com/schema#",
16650 "links": [
16651 {
16652 "href": "https://api.heroku.com",
16653 "rel": "self",
16654 "title": "Index"
16655 },
16656 {
16657 "href": "/schema",
16658 "method": "GET",
16659 "rel": "self",
16660 "title": "Schema",
16661 "targetSchema": {
16662 "additionalProperties": true
16663 }
16664 }
16665 ],
16666 "title": "Heroku Platform API"
16667 }
0 package heroku
1
2 import (
3 "encoding/json"
4 "errors"
5 "fmt"
6 "log"
7 "net/http"
8 "net/http/httputil"
9 "strings"
10
11 "github.com/pborman/uuid"
12 )
13
14 var DefaultTransport = &Transport{}
15
16 var DefaultClient = &http.Client{
17 Transport: DefaultTransport,
18 }
19
20 type Transport struct {
21 // Username is the HTTP basic auth username for API calls made by this Client.
22 Username string
23
24 // Password is the HTTP basic auth password for API calls made by this Client.
25 Password string
26
27 // BearerToken is a bearer token to authorize the request with. If this is
28 // set, the basic auth credentials will be ignored.
29 BearerToken string
30
31 // UserAgent to be provided in API requests. Set to DefaultUserAgent if not
32 // specified.
33 UserAgent string
34
35 // Debug mode can be used to dump the full request and response to stdout.
36 Debug bool
37
38 // AdditionalHeaders are extra headers to add to each HTTP request sent by
39 // this Client.
40 AdditionalHeaders http.Header
41
42 // Transport is the HTTP transport to use when making requests.
43 // It will default to http.DefaultTransport if nil.
44 Transport http.RoundTripper
45 }
46
47 // Forward CancelRequest to underlying Transport
48 func (t *Transport) CancelRequest(req *http.Request) {
49 type canceler interface {
50 CancelRequest(*http.Request)
51 }
52 tr, ok := t.Transport.(canceler)
53 if !ok {
54 log.Printf("heroku: Client Transport of type %T doesn't support CancelRequest; Timeout not supported\n", t.Transport)
55 return
56 }
57 tr.CancelRequest(req)
58 }
59
60 func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
61 if t.Transport == nil {
62 t.Transport = http.DefaultTransport
63 }
64
65 // Making a copy of the Request so that
66 // we don't modify the Request we were given.
67 req = cloneRequest(req)
68
69 if t.UserAgent != "" {
70 req.Header.Set("User-Agent", t.UserAgent)
71 }
72
73 req.Header.Set("Accept", "application/vnd.heroku+json; version=3")
74 req.Header.Set("Request-Id", uuid.New())
75
76 if t.BearerToken != "" {
77 req.Header.Add("Authorization", "Bearer "+t.BearerToken)
78 } else if t.Username != "" || t.Password != "" {
79 req.SetBasicAuth(t.Username, t.Password)
80 }
81
82 for k, v := range t.AdditionalHeaders {
83 req.Header[k] = v
84 }
85
86 if t.Debug {
87 dump, err := httputil.DumpRequestOut(req, true)
88 if err != nil {
89 log.Println(err)
90 } else {
91 log.Printf("%s", dump)
92 }
93 }
94
95 resp, err := t.Transport.RoundTrip(req)
96 if err != nil {
97 if resp != nil {
98 resp.Body.Close()
99 }
100 return nil, err
101 }
102
103 if t.Debug {
104 dump, err := httputil.DumpResponse(resp, true)
105 if err != nil {
106 log.Println(err)
107 } else {
108 log.Printf("%s", dump)
109 }
110 }
111
112 if err = checkResponse(resp); err != nil {
113 if resp != nil {
114 resp.Body.Close()
115 }
116 return nil, err
117 }
118
119 return resp, nil
120 }
121
122 type Error struct {
123 error
124 ID string
125 URL string
126 // StatusCode is the HTTP status code returned from the remote server.
127 StatusCode int
128 }
129
130 func checkResponse(resp *http.Response) error {
131 if resp.StatusCode/100 != 2 { // 200, 201, 202, etc
132 var e struct {
133 Message string
134 ID string
135 URL string `json:"url"`
136 }
137 err := json.NewDecoder(resp.Body).Decode(&e)
138 if err != nil {
139 return fmt.Errorf("encountered an error : %s", resp.Status)
140 }
141 return Error{error: errors.New(e.Message), ID: e.ID, URL: e.URL, StatusCode: resp.StatusCode}
142 }
143 if msg := resp.Header.Get("X-Heroku-Warning"); msg != "" {
144 log.Println(strings.TrimSpace(msg))
145 }
146 return nil
147 }
148
149 // cloneRequest returns a clone of the provided *http.Request.
150 func cloneRequest(req *http.Request) *http.Request {
151 // shallow copy of the struct
152 clone := new(http.Request)
153 *clone = *req
154 // deep copy of the Header
155 clone.Header = make(http.Header)
156 for k, s := range req.Header {
157 clone.Header[k] = s
158 }
159 return clone
160 }