platform-api 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 30650e1cb768ab40187de984a7758f1d4a7baf8e
4
+ data.tar.gz: 9986413c179ffb63979212fb2782cc76c6cc9d1f
5
+ SHA512:
6
+ metadata.gz: 343e26b799e139a176862bf955ee1bf1210dd87d474b41b686b229f6597c13b99cd070045b992ecc7d2623dda0e9625b33dde70463c9286170f84e6ac0899efa
7
+ data.tar.gz: 3ab6ce2a3c17a5e23dd3a2a3ccc371e16d635fb34d3438daa3d10ad9a2550496aa7010fd98e0aa31c01b0ded08bff896621f2cbf80fc9fc144075b5214fea569
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ pkg/
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'https://rubygems.org'
2
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,27 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ platform-api (0.0.2)
5
+ heroics
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ excon (0.32.0)
11
+ heroics (0.0.3)
12
+ excon
13
+ moneta
14
+ multi_json
15
+ netrc
16
+ moneta (0.7.20)
17
+ multi_json (1.9.0)
18
+ netrc (0.7.7)
19
+ rake (10.1.1)
20
+
21
+ PLATFORMS
22
+ ruby
23
+
24
+ DEPENDENCIES
25
+ bundler (~> 1.3)
26
+ platform-api!
27
+ rake
data/README.md ADDED
@@ -0,0 +1,261 @@
1
+ # Platform API
2
+
3
+ Ruby HTTP client for the Heroku API.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```
10
+ gem 'platform-api'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ ```
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+
21
+ ```
22
+ $ gem install platform-api
23
+ ```
24
+
25
+ ## Usage guide
26
+
27
+ The best place to start using the Heroku API is the [Platform API Reference](https://devcenter.heroku.com/articles/platform-api-reference).
28
+ It has detailed descriptions of the HTTP API, including general information
29
+ about authentication, caching, object identifiers, rate limits, etc. It also
30
+ includes detailed information about each supported resource and the actions
31
+ available for them.
32
+
33
+ The table of contents lists all the resources that are supported, such as App,
34
+ Add-on, Config Vars, Formation, etc. Each resource includes detailed
35
+ information about the support actions. For example, the [Formation](https://devcenter.heroku.com/articles/platform-api-reference#formation)
36
+ resource has [Info](https://devcenter.heroku.com/articles/platform-api-reference#formation-info), [List](https://devcenter.heroku.com/articles/platform-api-reference#formation-list), [Batch update](https://devcenter.heroku.com/articles/platform-api-reference#formation-batch-update), and [Update](https://devcenter.heroku.com/articles/platform-api-reference#formation-update) actions.
37
+
38
+ You can easily map any resource and its related action client methods. The
39
+ formation actions above are accessed as `client.formation.info`,
40
+ `client.formation.list`, `client.formation.batch_update` and
41
+ `client.formation.update`. When the URL for one of these actions includes
42
+ parameters they should be passed as arguments to the method. When the request
43
+ expects a request payload it should be passed as a Ruby Hash in the final
44
+ argument to the method.
45
+
46
+ For example, to get information about the `web` formation on the `sushi` app
47
+ you'd invoke `client.formation.info('sushi', 'web')` and it would return a
48
+ Ruby object that matches the one given in the [response example](https://devcenter.heroku.com/articles/platform-api-reference#formation-info).
49
+
50
+ Once you get used to these basic patterns using the client is quite easy
51
+ because it maps directly to the documentation. Below we'll go through some
52
+ more detailed examples to give a better idea about how it works.
53
+
54
+ ### Handling errors
55
+
56
+ The client uses [Excon](https://github.com/geemus/excon) under the hood and
57
+ raises `Excon::Error` exceptions when errors occur. You can catch specific
58
+ [Excon error types](https://github.com/geemus/excon/blob/master/lib/excon/errors.rb) if you want.
59
+
60
+ ### A real world example
61
+
62
+ Let's go through an example of creating an app and using the API to work with
63
+ it. The first thing you need is a client that's setup with your username and
64
+ API token. You can find your API token by clicking the *Show API Key* on your
65
+ [account page](https://dashboard.heroku.com/account).
66
+
67
+ ```ruby
68
+ require 'platform-api'
69
+ client = PlatformAPI.connect('username', 'token')
70
+ ```
71
+
72
+ Now let's create an app:
73
+
74
+ ```ruby
75
+ client.app.create
76
+ => {"id"=>22979756,
77
+ "name"=>"floating-retreat-4255",
78
+ "dynos"=>0,
79
+ "workers"=>0,
80
+ "repo_size"=>nil,
81
+ "slug_size"=>nil,
82
+ "stack"=>"cedar",
83
+ "requested_stack"=>nil,
84
+ "create_status"=>"complete",
85
+ "repo_migrate_status"=>"complete",
86
+ "owner_delinquent"=>false,
87
+ "owner_email"=>"jkakar@heroku.com",
88
+ "owner_name"=>nil,
89
+ "domain_name"=>
90
+ {"id"=>nil,
91
+ "app_id"=>22979756,
92
+ "domain"=>"floating-retreat-4255.herokuapp.com",
93
+ "base_domain"=>"herokuapp.com",
94
+ "created_at"=>nil,
95
+ "default"=>true,
96
+ "updated_at"=>nil},
97
+ "web_url"=>"http://floating-retreat-4255.herokuapp.com/",
98
+ "git_url"=>"git@heroku.com:floating-retreat-4255.git",
99
+ "buildpack_provided_description"=>nil,
100
+ "region"=>"us",
101
+ "created_at"=>"2014/03/12 16:44:09 -0700",
102
+ "archived_at"=>nil,
103
+ "released_at"=>"2014/03/12 16:44:10 -0700",
104
+ "updated_at"=>"2014/03/12 16:44:10 -0700"}
105
+ ```
106
+
107
+ We can read the same information back with the `info` method.
108
+
109
+ ```ruby
110
+ client.app.info('floating-retreat-4255')
111
+ => {"id"=>22979756,
112
+ "name"=>"floating-retreat-4255",
113
+ "dynos"=>0,
114
+ "workers"=>0,
115
+ "repo_size"=>nil,
116
+ "slug_size"=>nil,
117
+ "stack"=>"cedar",
118
+ "requested_stack"=>nil,
119
+ "create_status"=>"complete",
120
+ "repo_migrate_status"=>"complete",
121
+ "owner_delinquent"=>false,
122
+ "owner_email"=>"jkakar@heroku.com",
123
+ "owner_name"=>nil,
124
+ "domain_name"=>
125
+ {"id"=>nil,
126
+ "app_id"=>22979756,
127
+ "domain"=>"floating-retreat-4255.herokuapp.com",
128
+ "base_domain"=>"herokuapp.com",
129
+ "created_at"=>nil,
130
+ "default"=>true,
131
+ "updated_at"=>nil},
132
+ "web_url"=>"http://floating-retreat-4255.herokuapp.com/",
133
+ "git_url"=>"git@heroku.com:floating-retreat-4255.git",
134
+ "buildpack_provided_description"=>nil,
135
+ "region"=>"us",
136
+ "created_at"=>"2014/03/12 16:44:09 -0700",
137
+ "archived_at"=>nil,
138
+ "released_at"=>"2014/03/12 16:44:12 -0700",
139
+ "updated_at"=>"2014/03/12 16:44:12 -0700"}
140
+ ```
141
+
142
+ Let's add a Heroku PostgreSQL database to our app now:
143
+
144
+ ```ruby
145
+ client.addon.create('floating-retreat-4255', {'plan' => 'heroku-postgresql:dev'})
146
+ => {"config_vars"=>["HEROKU_POSTGRESQL_COBALT_URL"],
147
+ "created_at"=>"2014-03-13T00:28:55Z",
148
+ "id"=>"79a0c826-06be-4dcd-8bb5-f2c1b1bc2beb",
149
+ "name"=>"heroku-postgresql-cobalt",
150
+ "plan"=>
151
+ {"id"=>"95a1ce4c-c651-45dc-aaee-79b4603e76b7",
152
+ "name"=>"heroku-postgresql:dev"},
153
+ "provider_id"=>"resource5924903@heroku.com",
154
+ "updated_at"=>"2014-03-13T00:28:55Z"}
155
+ ```
156
+
157
+ Excellent! That will have added a config var which we can now see:
158
+
159
+ ```ruby
160
+ client.config_var.info('floating-retreat-4255')
161
+ => client.config_var.info('floating-retreat-4255')
162
+ {"HEROKU_POSTGRESQL_COBALT_URL"=>"postgres://<redacted>"}
163
+ ```
164
+
165
+ And there we go, we have the config var. Let's set an additional config var,
166
+ which will also demonstrate an request that needs a payload:
167
+
168
+ ```ruby
169
+ client.config_var.update('floating-retreat-4255', {'MYAPP' => 'ROCKS'})
170
+ => {"HEROKU_POSTGRESQL_COBALT_URL"=>"postgres://<redacted>",
171
+ "MYAPP"=>"ROCKS"}
172
+ ```
173
+
174
+ As you can see, any action that needs a request body takes it as a plain Ruby
175
+ object, as the final parameter of the method call.
176
+
177
+ Let's continue by deploying a sample app. We'll use the
178
+ [Geosockets](https://github.com/heroku-examples/geosockets) example app:
179
+
180
+ ```bash
181
+ $ git clone https://github.com/heroku-examples/geosockets.git
182
+ Cloning into 'geosockets'...
183
+ remote: Reusing existing pack: 489, done.
184
+ remote: Total 489 (delta 0), reused 0 (delta 0)
185
+ Receiving objects: 100% (489/489), 1.95 MiB | 1.14 MiB/s, done.
186
+ Resolving deltas: 100% (244/244), done.
187
+ Checking connectivity... done.
188
+ $ cd geosockets
189
+ $ git remote add heroku git@heroku.com:floating-retreat-4255.git
190
+ $ heroku labs:enable websockets
191
+ $ heroku addons:add openredis:micro # $10/month
192
+ Adding openredis:micro on floating-retreat-4255... done, v10 ($10/mo)
193
+ Use `heroku addons:docs openredis` to view documentation.
194
+ $ git push heroku master
195
+ Initializing repository, done.
196
+ Counting objects: 489, done.
197
+ Delta compression using up to 4 threads.
198
+ Compressing objects: 100% (229/229), done.
199
+ Writing objects: 100% (489/489), 1.95 MiB | 243.00 KiB/s, done.
200
+ Total 489 (delta 244), reused 489 (delta 244)
201
+ 8< snip 8<
202
+ ```
203
+
204
+ We can now use the API to see our `web` process running:
205
+
206
+ ```ruby
207
+ client.formation.list('floating-retreat-4255')
208
+ => [{"command"=>"coffee index.coffee",
209
+ "created_at"=>"2014-03-13T04:13:37Z",
210
+ "id"=>"f682b260-8089-4e18-b792-688cc02bf923",
211
+ "type"=>"web",
212
+ "quantity"=>1,
213
+ "size"=>"1X",
214
+ "updated_at"=>"2014-03-13T04:13:37Z"}]
215
+ ```
216
+
217
+ Let's change `web` process to run on a 2X dyno:
218
+
219
+ ```ruby
220
+ client.formation.batch_update('floating-retreat-4255', {"updates" => [{"process" => "web", "quantity" => 1, "size" => "2X"}]})
221
+ => [{"command"=>"coffee index.coffee",
222
+ "created_at"=>"2014-03-13T04:13:37Z",
223
+ "id"=>"f682b260-8089-4e18-b792-688cc02bf923",
224
+ "type"=>"web",
225
+ "quantity"=>1,
226
+ "size"=>"2X",
227
+ "updated_at"=>"2014-03-13T04:22:15Z"}]
228
+ ```
229
+
230
+ We could have included a number of different kinds of processes in the last
231
+ command. We can use the singular update action to modify a single formation
232
+ type:
233
+
234
+ ```ruby
235
+ client.formation.update('floating-retreat-4255', 'web', {"size" => "1X"})
236
+ => {"command"=>"coffee index.coffee",
237
+ "created_at"=>"2014-03-13T04:13:37Z",
238
+ "id"=>"f682b260-8089-4e18-b792-688cc02bf923",
239
+ "type"=>"web",
240
+ "quantity"=>1,
241
+ "size"=>"1X",
242
+ "updated_at"=>"2014-03-13T04:24:46Z"}
243
+ ```
244
+
245
+ Hopefully this has given you a taste of how the client works. If you have
246
+ questions please feel free to file issues.
247
+
248
+ ### Debugging
249
+
250
+ Sometimes it helps to see more information about the requests flying by. You
251
+ can start your program or an `irb` session with the `EXCON_DEBUG=1`
252
+ environment variable to cause request and response data to be written to
253
+ `STDERR`.
254
+
255
+ ## Contributing
256
+
257
+ 1. [Fork the repository](https://github.com/heroku/platform-api/fork).
258
+ 2. Create your feature branch: `git checkout -b my-new-feature`
259
+ 3. Commit your changes: `git commit -am 'Add some feature'`
260
+ 4. Push to the branch: `git push origin my-new-feature`
261
+ 5. Create new pull request.
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,8 @@
1
+ require 'heroics'
2
+
3
+ # Ruby HTTP client for the Heroku API.
4
+ module PlatformAPI
5
+ end
6
+
7
+ require 'platform-api/client'
8
+ require 'platform-api/version'
@@ -0,0 +1,12 @@
1
+ module PlatformAPI
2
+ # Get a client configured with the specified username and token.
3
+ def self.connect(username, token)
4
+ url = "https://#{username}:#{token}@api.heroku.com"
5
+ default_headers = {'Accept' => 'application/vnd.heroku+json; version=3'}
6
+ cache = Moneta.new(:File, dir: "#{Dir.home}/.heroku/platform-api")
7
+ options = {default_headers: default_headers, cache: cache}
8
+ schema_json = File.read("#{File.dirname(__FILE__)}/schema.json")
9
+ schema = Heroics::Schema.new(MultiJson.decode(schema_json))
10
+ Heroics.client_from_schema(schema, url, options)
11
+ end
12
+ end
@@ -0,0 +1,3927 @@
1
+ {
2
+ "description": "The platform API empowers developers to automate, extend and combine Heroku with other services.",
3
+ "definitions": {
4
+ "account-feature": {
5
+ "description": "An account feature represents a Heroku labs capability that can be enabled or disabled for an account on Heroku.",
6
+ "id": "schema/account-feature",
7
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
8
+ "stability": "development",
9
+ "title": "Heroku Platform API - Account Feature",
10
+ "type": [
11
+ "object"
12
+ ],
13
+ "definitions": {
14
+ "created_at": {
15
+ "description": "when account feature was created",
16
+ "example": "2012-01-01T12:00:00Z",
17
+ "format": "date-time",
18
+ "readOnly": true,
19
+ "type": [
20
+ "string"
21
+ ]
22
+ },
23
+ "description": {
24
+ "description": "description of account feature",
25
+ "example": "Causes account to example.",
26
+ "readOnly": true,
27
+ "type": [
28
+ "string"
29
+ ]
30
+ },
31
+ "doc_url": {
32
+ "description": "documentation URL of account feature",
33
+ "example": "http://devcenter.heroku.com/articles/example",
34
+ "readOnly": true,
35
+ "type": [
36
+ "string"
37
+ ]
38
+ },
39
+ "enabled": {
40
+ "description": "whether or not account feature has been enabled",
41
+ "example": true,
42
+ "type": [
43
+ "boolean"
44
+ ]
45
+ },
46
+ "id": {
47
+ "description": "unique identifier of account feature",
48
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
49
+ "format": "uuid",
50
+ "readOnly": true,
51
+ "type": [
52
+ "string"
53
+ ]
54
+ },
55
+ "identity": {
56
+ "anyOf": [
57
+ {
58
+ "$ref": "#/definitions/account-feature/definitions/id"
59
+ },
60
+ {
61
+ "$ref": "#/definitions/account-feature/definitions/name"
62
+ }
63
+ ]
64
+ },
65
+ "name": {
66
+ "description": "unique name of account feature",
67
+ "example": "name",
68
+ "readOnly": true,
69
+ "type": [
70
+ "string"
71
+ ]
72
+ },
73
+ "state": {
74
+ "description": "state of account feature",
75
+ "example": "public",
76
+ "readOnly": true,
77
+ "type": [
78
+ "string"
79
+ ]
80
+ },
81
+ "updated_at": {
82
+ "description": "when account feature was updated",
83
+ "example": "2012-01-01T12:00:00Z",
84
+ "format": "date-time",
85
+ "readOnly": true,
86
+ "type": [
87
+ "string"
88
+ ]
89
+ }
90
+ },
91
+ "links": [
92
+ {
93
+ "description": "Info for an existing account feature.",
94
+ "href": "/account/features/{(%23%2Fdefinitions%2Faccount-feature%2Fdefinitions%2Fidentity)}",
95
+ "method": "GET",
96
+ "rel": "self",
97
+ "title": "Info"
98
+ },
99
+ {
100
+ "description": "List existing account features.",
101
+ "href": "/account/features",
102
+ "method": "GET",
103
+ "rel": "instances",
104
+ "title": "List"
105
+ },
106
+ {
107
+ "description": "Update an existing account feature.",
108
+ "href": "/account/features/{(%23%2Fdefinitions%2Faccount-feature%2Fdefinitions%2Fidentity)}",
109
+ "method": "PATCH",
110
+ "rel": "update",
111
+ "schema": {
112
+ "properties": {
113
+ "enabled": {
114
+ "$ref": "#/definitions/account-feature/definitions/enabled"
115
+ }
116
+ },
117
+ "required": [
118
+ "enabled"
119
+ ]
120
+ },
121
+ "title": "Update"
122
+ }
123
+ ],
124
+ "properties": {
125
+ "created_at": {
126
+ "$ref": "#/definitions/account-feature/definitions/created_at"
127
+ },
128
+ "description": {
129
+ "$ref": "#/definitions/account-feature/definitions/description"
130
+ },
131
+ "doc_url": {
132
+ "$ref": "#/definitions/account-feature/definitions/doc_url"
133
+ },
134
+ "enabled": {
135
+ "$ref": "#/definitions/account-feature/definitions/enabled"
136
+ },
137
+ "id": {
138
+ "$ref": "#/definitions/account-feature/definitions/id"
139
+ },
140
+ "name": {
141
+ "$ref": "#/definitions/account-feature/definitions/name"
142
+ },
143
+ "state": {
144
+ "$ref": "#/definitions/account-feature/definitions/state"
145
+ },
146
+ "updated_at": {
147
+ "$ref": "#/definitions/account-feature/definitions/updated_at"
148
+ }
149
+ }
150
+ },
151
+ "account": {
152
+ "description": "An account represents an individual signed up to use the Heroku platform.",
153
+ "id": "schema/account",
154
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
155
+ "stability": "production",
156
+ "title": "Heroku Platform API - Account",
157
+ "type": [
158
+ "object"
159
+ ],
160
+ "definitions": {
161
+ "allow_tracking": {
162
+ "default": true,
163
+ "description": "whether to allow third party web activity tracking",
164
+ "example": true,
165
+ "type": [
166
+ "boolean"
167
+ ]
168
+ },
169
+ "beta": {
170
+ "default": false,
171
+ "description": "whether allowed to utilize beta Heroku features",
172
+ "example": false,
173
+ "type": [
174
+ "boolean"
175
+ ]
176
+ },
177
+ "created_at": {
178
+ "description": "when account was created",
179
+ "example": "2012-01-01T12:00:00Z",
180
+ "format": "date-time",
181
+ "readOnly": true,
182
+ "type": [
183
+ "string"
184
+ ]
185
+ },
186
+ "email": {
187
+ "description": "unique email address of account",
188
+ "example": "username@example.com",
189
+ "format": "email",
190
+ "type": [
191
+ "string"
192
+ ]
193
+ },
194
+ "id": {
195
+ "description": "unique identifier of an account",
196
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
197
+ "format": "uuid",
198
+ "readOnly": true,
199
+ "type": [
200
+ "string"
201
+ ]
202
+ },
203
+ "identity": {
204
+ "anyOf": [
205
+ {
206
+ "$ref": "#/definitions/account/definitions/email"
207
+ },
208
+ {
209
+ "$ref": "#/definitions/account/definitions/id"
210
+ }
211
+ ]
212
+ },
213
+ "last_login": {
214
+ "description": "when account last authorized with Heroku",
215
+ "example": "2012-01-01T12:00:00Z",
216
+ "format": "date-time",
217
+ "readOnly": true,
218
+ "type": [
219
+ "string"
220
+ ]
221
+ },
222
+ "name": {
223
+ "description": "full name of the account owner",
224
+ "example": "Tina Edmonds",
225
+ "readOnly": false,
226
+ "type": [
227
+ "string"
228
+ ]
229
+ },
230
+ "new_password": {
231
+ "description": "the new password for the account when changing the password",
232
+ "example": "newpassword",
233
+ "readOnly": true,
234
+ "type": [
235
+ "string"
236
+ ]
237
+ },
238
+ "password": {
239
+ "description": "current password on the account",
240
+ "example": "currentpassword",
241
+ "readOnly": true,
242
+ "type": [
243
+ "string"
244
+ ]
245
+ },
246
+ "updated_at": {
247
+ "description": "when account was updated",
248
+ "example": "2012-01-01T12:00:00Z",
249
+ "format": "date-time",
250
+ "readOnly": true,
251
+ "type": [
252
+ "string"
253
+ ]
254
+ },
255
+ "verified": {
256
+ "default": false,
257
+ "description": "whether account has been verified with billing information",
258
+ "example": false,
259
+ "type": [
260
+ "boolean"
261
+ ]
262
+ }
263
+ },
264
+ "links": [
265
+ {
266
+ "description": "Info for account.",
267
+ "href": "/account",
268
+ "method": "GET",
269
+ "rel": "self",
270
+ "title": "Info"
271
+ },
272
+ {
273
+ "description": "Update account.",
274
+ "href": "/account",
275
+ "method": "PATCH",
276
+ "rel": "update",
277
+ "schema": {
278
+ "properties": {
279
+ "allow_tracking": {
280
+ "$ref": "#/definitions/account/definitions/allow_tracking"
281
+ },
282
+ "beta": {
283
+ "$ref": "#/definitions/account/definitions/beta"
284
+ },
285
+ "name": {
286
+ "$ref": "#/definitions/account/definitions/name"
287
+ },
288
+ "password": {
289
+ "$ref": "#/definitions/account/definitions/password"
290
+ }
291
+ },
292
+ "required": [
293
+ "password"
294
+ ]
295
+ },
296
+ "title": "Update"
297
+ },
298
+ {
299
+ "description": "Change Email for account.",
300
+ "href": "/account",
301
+ "method": "PATCH",
302
+ "rel": "update",
303
+ "schema": {
304
+ "properties": {
305
+ "email": {
306
+ "$ref": "#/definitions/account/definitions/email"
307
+ },
308
+ "password": {
309
+ "$ref": "#/definitions/account/definitions/password"
310
+ }
311
+ },
312
+ "required": [
313
+ "password",
314
+ "email"
315
+ ]
316
+ },
317
+ "title": "Change Email"
318
+ },
319
+ {
320
+ "description": "Change Password for account.",
321
+ "href": "/account",
322
+ "method": "PATCH",
323
+ "rel": "update",
324
+ "schema": {
325
+ "properties": {
326
+ "new_password": {
327
+ "$ref": "#/definitions/account/definitions/new_password"
328
+ },
329
+ "password": {
330
+ "$ref": "#/definitions/account/definitions/password"
331
+ }
332
+ },
333
+ "required": [
334
+ "new_password",
335
+ "password"
336
+ ]
337
+ },
338
+ "title": "Change Password"
339
+ }
340
+ ],
341
+ "properties": {
342
+ "allow_tracking": {
343
+ "$ref": "#/definitions/account/definitions/allow_tracking"
344
+ },
345
+ "beta": {
346
+ "$ref": "#/definitions/account/definitions/beta"
347
+ },
348
+ "created_at": {
349
+ "$ref": "#/definitions/account/definitions/created_at"
350
+ },
351
+ "email": {
352
+ "$ref": "#/definitions/account/definitions/email"
353
+ },
354
+ "id": {
355
+ "$ref": "#/definitions/account/definitions/id"
356
+ },
357
+ "last_login": {
358
+ "$ref": "#/definitions/account/definitions/last_login"
359
+ },
360
+ "updated_at": {
361
+ "$ref": "#/definitions/account/definitions/updated_at"
362
+ },
363
+ "verified": {
364
+ "$ref": "#/definitions/account/definitions/verified"
365
+ }
366
+ }
367
+ },
368
+ "addon-service": {
369
+ "description": "Add-on services represent add-ons that may be provisioned for apps.",
370
+ "id": "schema/addon-service",
371
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
372
+ "stability": "development",
373
+ "title": "Heroku Platform API - Add-on Service",
374
+ "type": [
375
+ "object"
376
+ ],
377
+ "definitions": {
378
+ "created_at": {
379
+ "description": "when addon-service was created",
380
+ "example": "2012-01-01T12:00:00Z",
381
+ "format": "date-time",
382
+ "readOnly": true,
383
+ "type": [
384
+ "string"
385
+ ]
386
+ },
387
+ "id": {
388
+ "description": "unique identifier of this addon-service",
389
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
390
+ "format": "uuid",
391
+ "readOnly": true,
392
+ "type": [
393
+ "string"
394
+ ]
395
+ },
396
+ "identity": {
397
+ "anyOf": [
398
+ {
399
+ "$ref": "#/definitions/addon-service/definitions/id"
400
+ },
401
+ {
402
+ "$ref": "#/definitions/addon-service/definitions/name"
403
+ }
404
+ ]
405
+ },
406
+ "name": {
407
+ "description": "unique name of this addon-service",
408
+ "example": "heroku-postgresql",
409
+ "readOnly": true,
410
+ "type": [
411
+ "string"
412
+ ]
413
+ },
414
+ "updated_at": {
415
+ "description": "when addon-service was updated",
416
+ "example": "2012-01-01T12:00:00Z",
417
+ "format": "date-time",
418
+ "readOnly": true,
419
+ "type": [
420
+ "string"
421
+ ]
422
+ }
423
+ },
424
+ "links": [
425
+ {
426
+ "description": "Info for existing addon-service.",
427
+ "href": "/addon-services/{(%23%2Fdefinitions%2Faddon-service%2Fdefinitions%2Fidentity)}",
428
+ "method": "GET",
429
+ "rel": "self",
430
+ "title": "Info"
431
+ },
432
+ {
433
+ "description": "List existing addon-services.",
434
+ "href": "/addon-services",
435
+ "method": "GET",
436
+ "rel": "instances",
437
+ "title": "List"
438
+ }
439
+ ],
440
+ "properties": {
441
+ "created_at": {
442
+ "$ref": "#/definitions/addon-service/definitions/created_at"
443
+ },
444
+ "id": {
445
+ "$ref": "#/definitions/addon-service/definitions/id"
446
+ },
447
+ "name": {
448
+ "$ref": "#/definitions/addon-service/definitions/name"
449
+ },
450
+ "updated_at": {
451
+ "$ref": "#/definitions/addon-service/definitions/updated_at"
452
+ }
453
+ }
454
+ },
455
+ "addon": {
456
+ "description": "Add-ons represent add-ons that have been provisioned for an app.",
457
+ "id": "schema/addon",
458
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
459
+ "stability": "production",
460
+ "title": "Heroku Platform API - Add-on",
461
+ "type": [
462
+ "object"
463
+ ],
464
+ "definitions": {
465
+ "config_vars": {
466
+ "description": "config vars associated with this application",
467
+ "example": [
468
+ "FOO",
469
+ "BAZ"
470
+ ],
471
+ "items": {
472
+ "type": "string"
473
+ },
474
+ "readOnly": true,
475
+ "type": [
476
+ "array"
477
+ ]
478
+ },
479
+ "created_at": {
480
+ "description": "when add-on was updated",
481
+ "example": "2012-01-01T12:00:00Z",
482
+ "format": "date-time",
483
+ "readOnly": true,
484
+ "type": [
485
+ "string"
486
+ ]
487
+ },
488
+ "id": {
489
+ "description": "unique identifier of add-on",
490
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
491
+ "format": "uuid",
492
+ "readOnly": true,
493
+ "type": [
494
+ "string"
495
+ ]
496
+ },
497
+ "identity": {
498
+ "anyOf": [
499
+ {
500
+ "$ref": "#/definitions/addon/definitions/id"
501
+ },
502
+ {
503
+ "$ref": "#/definitions/addon/definitions/name"
504
+ }
505
+ ]
506
+ },
507
+ "name": {
508
+ "description": "name of the add-on unique within its app",
509
+ "example": "heroku-postgresql-teal",
510
+ "pattern": "^[a-z][a-z0-9-]+$",
511
+ "type": [
512
+ "string"
513
+ ]
514
+ },
515
+ "provider_id": {
516
+ "description": "id of this add-on with its provider",
517
+ "example": "app123@heroku.com",
518
+ "type": [
519
+ "string"
520
+ ]
521
+ },
522
+ "updated_at": {
523
+ "description": "when add-on was updated",
524
+ "example": "2012-01-01T12:00:00Z",
525
+ "format": "date-time",
526
+ "readOnly": true,
527
+ "type": [
528
+ "string"
529
+ ]
530
+ }
531
+ },
532
+ "links": [
533
+ {
534
+ "description": "Create a new add-on.",
535
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons",
536
+ "method": "POST",
537
+ "rel": "create",
538
+ "schema": {
539
+ "properties": {
540
+ "config": {
541
+ "additionalProperties": false,
542
+ "description": "custom add-on provisioning options",
543
+ "example": {
544
+ "db-version": "1.2.3"
545
+ },
546
+ "patternProperties": {
547
+ "^\\w+$": {
548
+ "type": [
549
+ "string"
550
+ ]
551
+ }
552
+ },
553
+ "type": [
554
+ "object"
555
+ ]
556
+ },
557
+ "plan": {
558
+ "$ref": "#/definitions/plan/definitions/identity"
559
+ }
560
+ },
561
+ "required": [
562
+ "plan"
563
+ ]
564
+ },
565
+ "title": "Create"
566
+ },
567
+ {
568
+ "description": "Delete an existing add-on.",
569
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons/{(%23%2Fdefinitions%2Faddon%2Fdefinitions%2Fidentity)}",
570
+ "method": "DELETE",
571
+ "rel": "destroy",
572
+ "title": "Delete"
573
+ },
574
+ {
575
+ "description": "Info for an existing add-on.",
576
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons/{(%23%2Fdefinitions%2Faddon%2Fdefinitions%2Fidentity)}",
577
+ "method": "GET",
578
+ "rel": "self",
579
+ "title": "Info"
580
+ },
581
+ {
582
+ "description": "List existing add-ons.",
583
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons",
584
+ "method": "GET",
585
+ "rel": "instances",
586
+ "title": "List"
587
+ },
588
+ {
589
+ "description": "Update an existing add-on.",
590
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/addons/{(%23%2Fdefinitions%2Faddon%2Fdefinitions%2Fidentity)}",
591
+ "method": "PATCH",
592
+ "rel": "update",
593
+ "schema": {
594
+ "properties": {
595
+ "plan": {
596
+ "$ref": "#/definitions/plan/definitions/identity"
597
+ }
598
+ },
599
+ "required": [
600
+ "plan"
601
+ ]
602
+ },
603
+ "title": "Update"
604
+ }
605
+ ],
606
+ "properties": {
607
+ "config_vars": {
608
+ "$ref": "#/definitions/addon/definitions/config_vars"
609
+ },
610
+ "created_at": {
611
+ "$ref": "#/definitions/addon/definitions/created_at"
612
+ },
613
+ "id": {
614
+ "$ref": "#/definitions/addon/definitions/id"
615
+ },
616
+ "name": {
617
+ "$ref": "#/definitions/addon/definitions/name"
618
+ },
619
+ "plan": {
620
+ "description": "identity of add-on plan",
621
+ "properties": {
622
+ "id": {
623
+ "$ref": "#/definitions/plan/definitions/id"
624
+ },
625
+ "name": {
626
+ "$ref": "#/definitions/plan/definitions/name"
627
+ }
628
+ },
629
+ "type": [
630
+ "object"
631
+ ]
632
+ },
633
+ "provider_id": {
634
+ "$ref": "#/definitions/addon/definitions/provider_id"
635
+ },
636
+ "updated_at": {
637
+ "$ref": "#/definitions/addon/definitions/updated_at"
638
+ }
639
+ }
640
+ },
641
+ "app-feature": {
642
+ "description": "An app feature represents a Heroku labs capability that can be enabled or disabled for an app on Heroku.",
643
+ "id": "schema/app-feature",
644
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
645
+ "stability": "development",
646
+ "title": "Heroku Platform API - App Feature",
647
+ "type": [
648
+ "object"
649
+ ],
650
+ "definitions": {
651
+ "created_at": {
652
+ "description": "when app feature was created",
653
+ "example": "2012-01-01T12:00:00Z",
654
+ "format": "date-time",
655
+ "readOnly": true,
656
+ "type": [
657
+ "string"
658
+ ]
659
+ },
660
+ "description": {
661
+ "description": "description of app feature",
662
+ "example": "Causes app to example.",
663
+ "readOnly": true,
664
+ "type": [
665
+ "string"
666
+ ]
667
+ },
668
+ "doc_url": {
669
+ "description": "documentation URL of app feature",
670
+ "example": "http://devcenter.heroku.com/articles/example",
671
+ "readOnly": true,
672
+ "type": [
673
+ "string"
674
+ ]
675
+ },
676
+ "enabled": {
677
+ "description": "whether or not app feature has been enabled",
678
+ "example": true,
679
+ "type": [
680
+ "boolean"
681
+ ]
682
+ },
683
+ "id": {
684
+ "description": "unique identifier of app feature",
685
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
686
+ "format": "uuid",
687
+ "readOnly": true,
688
+ "type": [
689
+ "string"
690
+ ]
691
+ },
692
+ "identity": {
693
+ "anyOf": [
694
+ {
695
+ "$ref": "#/definitions/app/definitions/id"
696
+ },
697
+ {
698
+ "$ref": "#/definitions/app/definitions/name"
699
+ }
700
+ ]
701
+ },
702
+ "name": {
703
+ "description": "unique name of app feature",
704
+ "example": "name",
705
+ "readOnly": true,
706
+ "type": [
707
+ "string"
708
+ ]
709
+ },
710
+ "state": {
711
+ "description": "state of app feature",
712
+ "example": "public",
713
+ "readOnly": true,
714
+ "type": [
715
+ "string"
716
+ ]
717
+ },
718
+ "updated_at": {
719
+ "description": "when app feature was updated",
720
+ "example": "2012-01-01T12:00:00Z",
721
+ "format": "date-time",
722
+ "readOnly": true,
723
+ "type": [
724
+ "string"
725
+ ]
726
+ }
727
+ },
728
+ "links": [
729
+ {
730
+ "description": "Info for an existing app feature.",
731
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/features/{(%23%2Fdefinitions%2Fapp-feature%2Fdefinitions%2Fidentity)}",
732
+ "method": "GET",
733
+ "rel": "self",
734
+ "title": "Info"
735
+ },
736
+ {
737
+ "description": "List existing app features.",
738
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/features",
739
+ "method": "GET",
740
+ "rel": "instances",
741
+ "title": "List"
742
+ },
743
+ {
744
+ "description": "Update an existing app feature.",
745
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/features/{(%23%2Fdefinitions%2Fapp-feature%2Fdefinitions%2Fidentity)}",
746
+ "method": "PATCH",
747
+ "rel": "update",
748
+ "schema": {
749
+ "properties": {
750
+ "enabled": {
751
+ "$ref": "#/definitions/app-feature/definitions/enabled"
752
+ }
753
+ },
754
+ "required": [
755
+ "enabled"
756
+ ]
757
+ },
758
+ "title": "Update"
759
+ }
760
+ ],
761
+ "properties": {
762
+ "created_at": {
763
+ "$ref": "#/definitions/app-feature/definitions/created_at"
764
+ },
765
+ "description": {
766
+ "$ref": "#/definitions/app-feature/definitions/description"
767
+ },
768
+ "doc_url": {
769
+ "$ref": "#/definitions/app-feature/definitions/doc_url"
770
+ },
771
+ "enabled": {
772
+ "$ref": "#/definitions/app-feature/definitions/enabled"
773
+ },
774
+ "id": {
775
+ "$ref": "#/definitions/app-feature/definitions/id"
776
+ },
777
+ "name": {
778
+ "$ref": "#/definitions/app-feature/definitions/name"
779
+ },
780
+ "state": {
781
+ "$ref": "#/definitions/app-feature/definitions/state"
782
+ },
783
+ "updated_at": {
784
+ "$ref": "#/definitions/app-feature/definitions/updated_at"
785
+ }
786
+ }
787
+ },
788
+ "app-transfer": {
789
+ "description": "An app transfer represents a two party interaction for transferring ownership of an app.",
790
+ "id": "schema/app-transfer",
791
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
792
+ "stability": "production",
793
+ "title": "Heroku Platform API - App Transfer",
794
+ "type": [
795
+ "object"
796
+ ],
797
+ "definitions": {
798
+ "created_at": {
799
+ "description": "when app transfer was created",
800
+ "example": "2012-01-01T12:00:00Z",
801
+ "format": "date-time",
802
+ "readOnly": true,
803
+ "type": [
804
+ "string"
805
+ ]
806
+ },
807
+ "id": {
808
+ "description": "unique identifier of app transfer",
809
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
810
+ "format": "uuid",
811
+ "readOnly": true,
812
+ "type": [
813
+ "string"
814
+ ]
815
+ },
816
+ "identity": {
817
+ "anyOf": [
818
+ {
819
+ "$ref": "#/definitions/app-transfer/definitions/id"
820
+ },
821
+ {
822
+ "$ref": "#/definitions/app/definitions/name"
823
+ }
824
+ ]
825
+ },
826
+ "state": {
827
+ "description": "the current state of an app transfer",
828
+ "enum": [
829
+ "pending",
830
+ "accepted",
831
+ "declined"
832
+ ],
833
+ "example": "pending",
834
+ "type": [
835
+ "string"
836
+ ]
837
+ },
838
+ "updated_at": {
839
+ "description": "when app transfer was updated",
840
+ "example": "2012-01-01T12:00:00Z",
841
+ "format": "date-time",
842
+ "readOnly": true,
843
+ "type": [
844
+ "string"
845
+ ]
846
+ }
847
+ },
848
+ "links": [
849
+ {
850
+ "description": "Create a new app transfer.",
851
+ "href": "/account/app-transfers",
852
+ "method": "POST",
853
+ "rel": "create",
854
+ "schema": {
855
+ "properties": {
856
+ "app": {
857
+ "$ref": "#/definitions/app/definitions/identity"
858
+ },
859
+ "recipient": {
860
+ "$ref": "#/definitions/account/definitions/identity"
861
+ }
862
+ },
863
+ "required": [
864
+ "app",
865
+ "recipient"
866
+ ]
867
+ },
868
+ "title": "Create"
869
+ },
870
+ {
871
+ "description": "Delete an existing app transfer",
872
+ "href": "/account/app-transfers/{(%23%2Fdefinitions%2Fapp-transfer%2Fdefinitions%2Fidentity)}",
873
+ "method": "DELETE",
874
+ "rel": "destroy",
875
+ "title": "Delete"
876
+ },
877
+ {
878
+ "description": "Info for existing app transfer.",
879
+ "href": "/account/app-transfers/{(%23%2Fdefinitions%2Fapp-transfer%2Fdefinitions%2Fidentity)}",
880
+ "method": "GET",
881
+ "rel": "self",
882
+ "title": "Info"
883
+ },
884
+ {
885
+ "description": "List existing apps transfers.",
886
+ "href": "/account/app-transfers",
887
+ "method": "GET",
888
+ "rel": "instances",
889
+ "title": "List"
890
+ },
891
+ {
892
+ "description": "Update an existing app transfer.",
893
+ "href": "/account/app-transfers/{(%23%2Fdefinitions%2Fapp-transfer%2Fdefinitions%2Fidentity)}",
894
+ "method": "PATCH",
895
+ "rel": "update",
896
+ "schema": {
897
+ "properties": {
898
+ "state": {
899
+ "$ref": "#/definitions/app-transfer/definitions/state"
900
+ }
901
+ },
902
+ "required": [
903
+ "state"
904
+ ]
905
+ },
906
+ "title": "Update"
907
+ }
908
+ ],
909
+ "properties": {
910
+ "app": {
911
+ "description": "app involved in the transfer",
912
+ "properties": {
913
+ "name": {
914
+ "$ref": "#/definitions/app/definitions/name"
915
+ },
916
+ "id": {
917
+ "$ref": "#/definitions/app/definitions/id"
918
+ }
919
+ },
920
+ "type": [
921
+ "object"
922
+ ]
923
+ },
924
+ "created_at": {
925
+ "$ref": "#/definitions/app-transfer/definitions/created_at"
926
+ },
927
+ "id": {
928
+ "$ref": "#/definitions/app-transfer/definitions/id"
929
+ },
930
+ "owner": {
931
+ "description": "identity of the owner of the transfer",
932
+ "properties": {
933
+ "email": {
934
+ "$ref": "#/definitions/account/definitions/email"
935
+ },
936
+ "id": {
937
+ "$ref": "#/definitions/account/definitions/id"
938
+ }
939
+ },
940
+ "type": [
941
+ "object"
942
+ ]
943
+ },
944
+ "recipient": {
945
+ "description": "identity of the recipient of the transfer",
946
+ "properties": {
947
+ "email": {
948
+ "$ref": "#/definitions/account/definitions/email"
949
+ },
950
+ "id": {
951
+ "$ref": "#/definitions/account/definitions/id"
952
+ }
953
+ },
954
+ "type": [
955
+ "object"
956
+ ]
957
+ },
958
+ "state": {
959
+ "$ref": "#/definitions/app-transfer/definitions/state"
960
+ },
961
+ "updated_at": {
962
+ "$ref": "#/definitions/app-transfer/definitions/updated_at"
963
+ }
964
+ }
965
+ },
966
+ "app": {
967
+ "description": "An app represents the program that you would like to deploy and run on Heroku.",
968
+ "id": "schema/app",
969
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
970
+ "stability": "production",
971
+ "title": "Heroku Platform API - App",
972
+ "type": [
973
+ "object"
974
+ ],
975
+ "definitions": {
976
+ "archived_at": {
977
+ "description": "when app was archived",
978
+ "example": "2012-01-01T12:00:00Z",
979
+ "format": "date-time",
980
+ "readOnly": true,
981
+ "type": [
982
+ "null",
983
+ "string"
984
+ ]
985
+ },
986
+ "buildpack_provided_description": {
987
+ "description": "description from buildpack of app",
988
+ "example": "Ruby/Rack",
989
+ "readOnly": true,
990
+ "type": [
991
+ "null",
992
+ "string"
993
+ ]
994
+ },
995
+ "created_at": {
996
+ "description": "when app was created",
997
+ "example": "2012-01-01T12:00:00Z",
998
+ "format": "date-time",
999
+ "readOnly": true,
1000
+ "type": [
1001
+ "string"
1002
+ ]
1003
+ },
1004
+ "git_url": {
1005
+ "description": "git repo URL of app",
1006
+ "example": "git@heroku.com/example.git",
1007
+ "format": "uri",
1008
+ "pattern": "^git@heroku\\.com/[a-z][a-z0-9-]{3,30}\\.git$",
1009
+ "readOnly": true,
1010
+ "type": [
1011
+ "string"
1012
+ ]
1013
+ },
1014
+ "id": {
1015
+ "description": "unique identifier of app",
1016
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
1017
+ "format": "uuid",
1018
+ "readOnly": true,
1019
+ "type": [
1020
+ "string"
1021
+ ]
1022
+ },
1023
+ "identity": {
1024
+ "anyOf": [
1025
+ {
1026
+ "$ref": "#/definitions/app/definitions/id"
1027
+ },
1028
+ {
1029
+ "$ref": "#/definitions/app/definitions/name"
1030
+ }
1031
+ ]
1032
+ },
1033
+ "maintenance": {
1034
+ "default": false,
1035
+ "description": "maintenance status of app",
1036
+ "example": false,
1037
+ "type": [
1038
+ "boolean"
1039
+ ]
1040
+ },
1041
+ "name": {
1042
+ "description": "unique name of app",
1043
+ "example": "example",
1044
+ "pattern": "^[a-z][a-z0-9-]{3,30}$",
1045
+ "type": [
1046
+ "string"
1047
+ ]
1048
+ },
1049
+ "released_at": {
1050
+ "default": null,
1051
+ "description": "when app was released",
1052
+ "example": "2012-01-01T12:00:00Z",
1053
+ "format": "date-time",
1054
+ "readOnly": true,
1055
+ "type": [
1056
+ "null",
1057
+ "string"
1058
+ ]
1059
+ },
1060
+ "repo_size": {
1061
+ "default": null,
1062
+ "description": "git repo size in bytes of app",
1063
+ "example": 0,
1064
+ "readOnly": true,
1065
+ "type": [
1066
+ "integer",
1067
+ "null"
1068
+ ]
1069
+ },
1070
+ "slug_size": {
1071
+ "default": null,
1072
+ "description": "slug size in bytes of app",
1073
+ "example": 0,
1074
+ "readOnly": true,
1075
+ "type": [
1076
+ "integer",
1077
+ "null"
1078
+ ]
1079
+ },
1080
+ "updated_at": {
1081
+ "description": "when app was updated",
1082
+ "example": "2012-01-01T12:00:00Z",
1083
+ "format": "date-time",
1084
+ "readOnly": true,
1085
+ "type": [
1086
+ "string"
1087
+ ]
1088
+ },
1089
+ "web_url": {
1090
+ "description": "web URL of app",
1091
+ "example": "http://example.herokuapp.com",
1092
+ "format": "uri",
1093
+ "pattern": "^http://[a-z][a-z0-9-]{3,30}\\.herokuapp\\.com$",
1094
+ "readOnly": true,
1095
+ "type": [
1096
+ "string"
1097
+ ]
1098
+ }
1099
+ },
1100
+ "links": [
1101
+ {
1102
+ "description": "Create a new app.",
1103
+ "href": "/apps",
1104
+ "method": "POST",
1105
+ "rel": "create",
1106
+ "schema": {
1107
+ "properties": {
1108
+ "name": {
1109
+ "$ref": "#/definitions/app/definitions/name"
1110
+ },
1111
+ "region": {
1112
+ "$ref": "#/definitions/region/definitions/identity"
1113
+ },
1114
+ "stack": {
1115
+ "$ref": "#/definitions/stack/definitions/identity"
1116
+ }
1117
+ }
1118
+ },
1119
+ "title": "Create"
1120
+ },
1121
+ {
1122
+ "description": "Delete an existing app.",
1123
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}",
1124
+ "method": "DELETE",
1125
+ "rel": "destroy",
1126
+ "title": "Delete"
1127
+ },
1128
+ {
1129
+ "description": "Info for existing app.",
1130
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}",
1131
+ "method": "GET",
1132
+ "rel": "self",
1133
+ "title": "Info"
1134
+ },
1135
+ {
1136
+ "description": "List existing apps.",
1137
+ "href": "/apps",
1138
+ "method": "GET",
1139
+ "rel": "instances",
1140
+ "title": "List"
1141
+ },
1142
+ {
1143
+ "description": "Update an existing app.",
1144
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}",
1145
+ "method": "PATCH",
1146
+ "rel": "update",
1147
+ "schema": {
1148
+ "properties": {
1149
+ "maintenance": {
1150
+ "$ref": "#/definitions/app/definitions/maintenance"
1151
+ },
1152
+ "name": {
1153
+ "$ref": "#/definitions/app/definitions/name"
1154
+ }
1155
+ }
1156
+ },
1157
+ "title": "Update"
1158
+ }
1159
+ ],
1160
+ "properties": {
1161
+ "archived_at": {
1162
+ "$ref": "#/definitions/app/definitions/archived_at"
1163
+ },
1164
+ "buildpack_provided_description": {
1165
+ "$ref": "#/definitions/app/definitions/buildpack_provided_description"
1166
+ },
1167
+ "created_at": {
1168
+ "$ref": "#/definitions/app/definitions/created_at"
1169
+ },
1170
+ "git_url": {
1171
+ "$ref": "#/definitions/app/definitions/git_url"
1172
+ },
1173
+ "id": {
1174
+ "$ref": "#/definitions/app/definitions/id"
1175
+ },
1176
+ "maintenance": {
1177
+ "$ref": "#/definitions/app/definitions/maintenance"
1178
+ },
1179
+ "name": {
1180
+ "$ref": "#/definitions/app/definitions/name"
1181
+ },
1182
+ "owner": {
1183
+ "description": "identity of app owner",
1184
+ "properties": {
1185
+ "email": {
1186
+ "$ref": "#/definitions/account/definitions/email"
1187
+ },
1188
+ "id": {
1189
+ "$ref": "#/definitions/account/definitions/id"
1190
+ }
1191
+ },
1192
+ "type": [
1193
+ "object"
1194
+ ]
1195
+ },
1196
+ "region": {
1197
+ "description": "identity of app region",
1198
+ "properties": {
1199
+ "id": {
1200
+ "$ref": "#/definitions/region/definitions/id"
1201
+ },
1202
+ "name": {
1203
+ "$ref": "#/definitions/region/definitions/name"
1204
+ }
1205
+ },
1206
+ "type": [
1207
+ "object"
1208
+ ]
1209
+ },
1210
+ "released_at": {
1211
+ "$ref": "#/definitions/app/definitions/released_at"
1212
+ },
1213
+ "repo_size": {
1214
+ "$ref": "#/definitions/app/definitions/repo_size"
1215
+ },
1216
+ "slug_size": {
1217
+ "$ref": "#/definitions/app/definitions/slug_size"
1218
+ },
1219
+ "stack": {
1220
+ "description": "identity of app stack",
1221
+ "properties": {
1222
+ "id": {
1223
+ "$ref": "#/definitions/stack/definitions/id"
1224
+ },
1225
+ "name": {
1226
+ "$ref": "#/definitions/stack/definitions/name"
1227
+ }
1228
+ },
1229
+ "type": [
1230
+ "object"
1231
+ ]
1232
+ },
1233
+ "updated_at": {
1234
+ "$ref": "#/definitions/app/definitions/updated_at"
1235
+ },
1236
+ "web_url": {
1237
+ "$ref": "#/definitions/app/definitions/web_url"
1238
+ }
1239
+ }
1240
+ },
1241
+ "collaborator": {
1242
+ "description": "A collaborator represents an account that has been given access to an app on Heroku.",
1243
+ "id": "schema/collaborator",
1244
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
1245
+ "stability": "production",
1246
+ "title": "Heroku Platform API - Collaborator",
1247
+ "type": [
1248
+ "object"
1249
+ ],
1250
+ "definitions": {
1251
+ "created_at": {
1252
+ "description": "when collaborator was created",
1253
+ "example": "2012-01-01T12:00:00Z",
1254
+ "format": "date-time",
1255
+ "readOnly": true,
1256
+ "type": [
1257
+ "string"
1258
+ ]
1259
+ },
1260
+ "email": {
1261
+ "description": "invited email address of collaborator",
1262
+ "example": "collaborator@example.com",
1263
+ "format": "email",
1264
+ "type": [
1265
+ "string"
1266
+ ]
1267
+ },
1268
+ "id": {
1269
+ "description": "unique identifier of collaborator",
1270
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
1271
+ "format": "uuid",
1272
+ "readOnly": true,
1273
+ "type": [
1274
+ "string"
1275
+ ]
1276
+ },
1277
+ "identity": {
1278
+ "anyOf": [
1279
+ {
1280
+ "$ref": "#/definitions/collaborator/definitions/email"
1281
+ },
1282
+ {
1283
+ "$ref": "#/definitions/collaborator/definitions/id"
1284
+ }
1285
+ ]
1286
+ },
1287
+ "silent": {
1288
+ "default": false,
1289
+ "description": "whether to suppress email invitation when creating collaborator",
1290
+ "example": false,
1291
+ "type": [
1292
+ "boolean"
1293
+ ]
1294
+ },
1295
+ "updated_at": {
1296
+ "description": "when collaborator was updated",
1297
+ "example": "2012-01-01T12:00:00Z",
1298
+ "format": "date-time",
1299
+ "readOnly": true,
1300
+ "type": [
1301
+ "string"
1302
+ ]
1303
+ }
1304
+ },
1305
+ "links": [
1306
+ {
1307
+ "description": "Create a new collaborator.",
1308
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators",
1309
+ "method": "POST",
1310
+ "rel": "create",
1311
+ "schema": {
1312
+ "properties": {
1313
+ "silent": {
1314
+ "$ref": "#/definitions/collaborator/definitions/silent"
1315
+ },
1316
+ "user": {
1317
+ "$ref": "#/definitions/account/definitions/identity"
1318
+ }
1319
+ },
1320
+ "required": [
1321
+ "user"
1322
+ ]
1323
+ },
1324
+ "title": "Create"
1325
+ },
1326
+ {
1327
+ "description": "Delete an existing collaborator.",
1328
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Fcollaborator%2Fdefinitions%2Fidentity)}",
1329
+ "method": "DELETE",
1330
+ "rel": "destroy",
1331
+ "title": "Delete"
1332
+ },
1333
+ {
1334
+ "description": "Info for existing collaborator.",
1335
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators/{(%23%2Fdefinitions%2Fcollaborator%2Fdefinitions%2Fidentity)}",
1336
+ "method": "GET",
1337
+ "rel": "self",
1338
+ "title": "Info"
1339
+ },
1340
+ {
1341
+ "description": "List existing collaborators.",
1342
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/collaborators",
1343
+ "method": "GET",
1344
+ "rel": "instances",
1345
+ "title": "List"
1346
+ }
1347
+ ],
1348
+ "properties": {
1349
+ "created_at": {
1350
+ "$ref": "#/definitions/collaborator/definitions/created_at"
1351
+ },
1352
+ "id": {
1353
+ "$ref": "#/definitions/collaborator/definitions/id"
1354
+ },
1355
+ "updated_at": {
1356
+ "$ref": "#/definitions/collaborator/definitions/updated_at"
1357
+ },
1358
+ "user": {
1359
+ "description": "identity of collaborated account",
1360
+ "properties": {
1361
+ "email": {
1362
+ "$ref": "#/definitions/account/definitions/email"
1363
+ },
1364
+ "id": {
1365
+ "$ref": "#/definitions/account/definitions/id"
1366
+ }
1367
+ },
1368
+ "type": [
1369
+ "object"
1370
+ ]
1371
+ }
1372
+ }
1373
+ },
1374
+ "config-var": {
1375
+ "description": "Config Vars allow you to manage the configuration information provided to an app on Heroku.",
1376
+ "id": "schema/config-var",
1377
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
1378
+ "stability": "development",
1379
+ "title": "Heroku Platform API - Config Vars",
1380
+ "type": [
1381
+ "object"
1382
+ ],
1383
+ "definitions": {
1384
+ },
1385
+ "links": [
1386
+ {
1387
+ "description": "Get config-vars for app.",
1388
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/config-vars",
1389
+ "method": "GET",
1390
+ "rel": "self",
1391
+ "title": "Info"
1392
+ },
1393
+ {
1394
+ "description": "Update config-vars for app. You can update existing config-vars by setting them again, and remove by setting it to `NULL`.",
1395
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/config-vars",
1396
+ "method": "PATCH",
1397
+ "rel": "update",
1398
+ "schema": {
1399
+ "additionalProperties": false,
1400
+ "description": "hash of config changes – update values or delete by seting it to NULL",
1401
+ "example": {
1402
+ "FOO": null,
1403
+ "BAZ": "grault"
1404
+ },
1405
+ "patternProperties": {
1406
+ "^\\w+$": {
1407
+ "type": [
1408
+ "string",
1409
+ "null"
1410
+ ]
1411
+ }
1412
+ },
1413
+ "type": [
1414
+ "object"
1415
+ ]
1416
+ },
1417
+ "title": "Update"
1418
+ }
1419
+ ],
1420
+ "example": {
1421
+ "FOO": "bar",
1422
+ "BAZ": "qux"
1423
+ },
1424
+ "patternProperties": {
1425
+ "^\\w+$": {
1426
+ "type": [
1427
+ "string"
1428
+ ]
1429
+ }
1430
+ },
1431
+ "additionalProperties": false
1432
+ },
1433
+ "domain": {
1434
+ "description": "Domains define what web routes should be routed to an app on Heroku.",
1435
+ "id": "schema/domain",
1436
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
1437
+ "stability": "production",
1438
+ "title": "Heroku Platform API - Domain",
1439
+ "type": [
1440
+ "object"
1441
+ ],
1442
+ "definitions": {
1443
+ "created_at": {
1444
+ "description": "when domain was created",
1445
+ "example": "2012-01-01T12:00:00Z",
1446
+ "format": "date-time",
1447
+ "readOnly": true,
1448
+ "type": [
1449
+ "string"
1450
+ ]
1451
+ },
1452
+ "hostname": {
1453
+ "description": "full hostname",
1454
+ "example": "subdomain.example.com",
1455
+ "readOnly": true,
1456
+ "type": [
1457
+ "string"
1458
+ ]
1459
+ },
1460
+ "id": {
1461
+ "description": "unique identifier of this domain",
1462
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
1463
+ "format": "uuid",
1464
+ "readOnly": true,
1465
+ "type": [
1466
+ "string"
1467
+ ]
1468
+ },
1469
+ "identity": {
1470
+ "anyOf": [
1471
+ {
1472
+ "$ref": "#/definitions/domain/definitions/id"
1473
+ },
1474
+ {
1475
+ "$ref": "#/definitions/domain/definitions/hostname"
1476
+ }
1477
+ ]
1478
+ },
1479
+ "updated_at": {
1480
+ "description": "when domain was updated",
1481
+ "example": "2012-01-01T12:00:00Z",
1482
+ "format": "date-time",
1483
+ "readOnly": true,
1484
+ "type": [
1485
+ "string"
1486
+ ]
1487
+ }
1488
+ },
1489
+ "links": [
1490
+ {
1491
+ "description": "Create a new domain.",
1492
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains",
1493
+ "method": "POST",
1494
+ "rel": "create",
1495
+ "schema": {
1496
+ "properties": {
1497
+ "hostname": {
1498
+ "$ref": "#/definitions/domain/definitions/hostname"
1499
+ }
1500
+ },
1501
+ "required": [
1502
+ "hostname"
1503
+ ]
1504
+ },
1505
+ "title": "Create"
1506
+ },
1507
+ {
1508
+ "description": "Delete an existing domain",
1509
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains/{(%23%2Fdefinitions%2Fdomain%2Fdefinitions%2Fidentity)}",
1510
+ "method": "DELETE",
1511
+ "rel": "destroy",
1512
+ "title": "Delete"
1513
+ },
1514
+ {
1515
+ "description": "Info for existing domain.",
1516
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains/{(%23%2Fdefinitions%2Fdomain%2Fdefinitions%2Fidentity)}",
1517
+ "method": "GET",
1518
+ "rel": "self",
1519
+ "title": "Info"
1520
+ },
1521
+ {
1522
+ "description": "List existing domains.",
1523
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/domains",
1524
+ "method": "GET",
1525
+ "rel": "instances",
1526
+ "title": "List"
1527
+ }
1528
+ ],
1529
+ "properties": {
1530
+ "created_at": {
1531
+ "$ref": "#/definitions/domain/definitions/created_at"
1532
+ },
1533
+ "hostname": {
1534
+ "$ref": "#/definitions/domain/definitions/hostname"
1535
+ },
1536
+ "id": {
1537
+ "$ref": "#/definitions/domain/definitions/id"
1538
+ },
1539
+ "updated_at": {
1540
+ "$ref": "#/definitions/domain/definitions/updated_at"
1541
+ }
1542
+ }
1543
+ },
1544
+ "dyno": {
1545
+ "description": "Dynos encapsulate running processes of an app on Heroku.",
1546
+ "id": "schema/dyno",
1547
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
1548
+ "stability": "development",
1549
+ "title": "Heroku Platform API - Dyno",
1550
+ "type": [
1551
+ "object"
1552
+ ],
1553
+ "definitions": {
1554
+ "attach": {
1555
+ "description": "whether to stream output or not",
1556
+ "example": true,
1557
+ "type": [
1558
+ "boolean"
1559
+ ]
1560
+ },
1561
+ "attach_url": {
1562
+ "description": "a URL to stream output from for attached processes or null for non-attached processes",
1563
+ "example": "rendezvous://rendezvous.runtime.heroku.com:5000/{rendezvous-id}",
1564
+ "type": [
1565
+ "string",
1566
+ "null"
1567
+ ]
1568
+ },
1569
+ "command": {
1570
+ "description": "command used to start this process",
1571
+ "example": "bash",
1572
+ "type": [
1573
+ "string"
1574
+ ]
1575
+ },
1576
+ "created_at": {
1577
+ "description": "when dyno was created",
1578
+ "example": "2012-01-01T12:00:00Z",
1579
+ "format": "date-time",
1580
+ "readOnly": true,
1581
+ "type": [
1582
+ "string"
1583
+ ]
1584
+ },
1585
+ "env": {
1586
+ "additionalProperties": false,
1587
+ "description": "custom environment to add to the dyno config vars",
1588
+ "example": {
1589
+ "COLUMNS": "80",
1590
+ "LINES": "24"
1591
+ },
1592
+ "patternProperties": {
1593
+ "^\\w+$": {
1594
+ "type": [
1595
+ "string"
1596
+ ]
1597
+ }
1598
+ },
1599
+ "type": [
1600
+ "object"
1601
+ ]
1602
+ },
1603
+ "id": {
1604
+ "description": "unique identifier of this dyno",
1605
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
1606
+ "format": "uuid",
1607
+ "readOnly": true,
1608
+ "type": [
1609
+ "string"
1610
+ ]
1611
+ },
1612
+ "identity": {
1613
+ "anyOf": [
1614
+ {
1615
+ "$ref": "#/definitions/dyno/definitions/id"
1616
+ },
1617
+ {
1618
+ "$ref": "#/definitions/dyno/definitions/name"
1619
+ }
1620
+ ]
1621
+ },
1622
+ "name": {
1623
+ "description": "the name of this process on this dyno",
1624
+ "example": "run.1",
1625
+ "readOnly": true,
1626
+ "type": [
1627
+ "string"
1628
+ ]
1629
+ },
1630
+ "size": {
1631
+ "description": "dyno size (default: \"1X\")",
1632
+ "example": "1X",
1633
+ "type": [
1634
+ "string"
1635
+ ]
1636
+ },
1637
+ "state": {
1638
+ "description": "current status of process (either: crashed, down, idle, starting, or up)",
1639
+ "example": "up",
1640
+ "readOnly": true,
1641
+ "type": [
1642
+ "string"
1643
+ ]
1644
+ },
1645
+ "type": {
1646
+ "description": "type of process",
1647
+ "example": "run",
1648
+ "readOnly": true,
1649
+ "type": [
1650
+ "string"
1651
+ ]
1652
+ },
1653
+ "updated_at": {
1654
+ "description": "when process last changed state",
1655
+ "example": "2012-01-01T12:00:00Z",
1656
+ "format": "date-time",
1657
+ "readOnly": true,
1658
+ "type": [
1659
+ "string"
1660
+ ]
1661
+ }
1662
+ },
1663
+ "links": [
1664
+ {
1665
+ "description": "Create a new dyno.",
1666
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos",
1667
+ "method": "POST",
1668
+ "rel": "create",
1669
+ "schema": {
1670
+ "properties": {
1671
+ "attach": {
1672
+ "$ref": "#/definitions/dyno/definitions/attach"
1673
+ },
1674
+ "command": {
1675
+ "$ref": "#/definitions/dyno/definitions/command"
1676
+ },
1677
+ "env": {
1678
+ "$ref": "#/definitions/dyno/definitions/env"
1679
+ },
1680
+ "size": {
1681
+ "$ref": "#/definitions/dyno/definitions/size"
1682
+ }
1683
+ },
1684
+ "required": [
1685
+ "command"
1686
+ ]
1687
+ },
1688
+ "title": "Create"
1689
+ },
1690
+ {
1691
+ "description": "Restart dyno.",
1692
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos/{(%23%2Fdefinitions%2Fdyno%2Fdefinitions%2Fidentity)}",
1693
+ "method": "DELETE",
1694
+ "rel": "empty",
1695
+ "title": "Restart"
1696
+ },
1697
+ {
1698
+ "description": "Restart all dynos",
1699
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos",
1700
+ "method": "DELETE",
1701
+ "rel": "empty",
1702
+ "title": "Restart all"
1703
+ },
1704
+ {
1705
+ "description": "Info for existing dyno.",
1706
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos/{(%23%2Fdefinitions%2Fdyno%2Fdefinitions%2Fidentity)}",
1707
+ "method": "GET",
1708
+ "rel": "self",
1709
+ "title": "Info"
1710
+ },
1711
+ {
1712
+ "description": "List existing dynos.",
1713
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/dynos",
1714
+ "method": "GET",
1715
+ "rel": "instances",
1716
+ "title": "List"
1717
+ }
1718
+ ],
1719
+ "properties": {
1720
+ "attach_url": {
1721
+ "$ref": "#/definitions/dyno/definitions/attach_url"
1722
+ },
1723
+ "command": {
1724
+ "$ref": "#/definitions/dyno/definitions/command"
1725
+ },
1726
+ "created_at": {
1727
+ "$ref": "#/definitions/dyno/definitions/created_at"
1728
+ },
1729
+ "id": {
1730
+ "$ref": "#/definitions/dyno/definitions/id"
1731
+ },
1732
+ "name": {
1733
+ "$ref": "#/definitions/dyno/definitions/name"
1734
+ },
1735
+ "release": {
1736
+ "description": "app release of the dyno",
1737
+ "properties": {
1738
+ "id": {
1739
+ "$ref": "#/definitions/release/definitions/id"
1740
+ },
1741
+ "version": {
1742
+ "$ref": "#/definitions/release/definitions/version"
1743
+ }
1744
+ },
1745
+ "type": [
1746
+ "object"
1747
+ ]
1748
+ },
1749
+ "size": {
1750
+ "$ref": "#/definitions/dyno/definitions/size"
1751
+ },
1752
+ "state": {
1753
+ "$ref": "#/definitions/dyno/definitions/state"
1754
+ },
1755
+ "type": {
1756
+ "$ref": "#/definitions/dyno/definitions/type"
1757
+ },
1758
+ "updated_at": {
1759
+ "$ref": "#/definitions/dyno/definitions/updated_at"
1760
+ }
1761
+ }
1762
+ },
1763
+ "formation": {
1764
+ "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.",
1765
+ "id": "schema/formation",
1766
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
1767
+ "stability": "production",
1768
+ "title": "Heroku Platform API - Formation",
1769
+ "type": [
1770
+ "object"
1771
+ ],
1772
+ "definitions": {
1773
+ "command": {
1774
+ "description": "command to use to launch this process",
1775
+ "example": "bundle exec rails server -p $PORT",
1776
+ "type": [
1777
+ "string"
1778
+ ]
1779
+ },
1780
+ "created_at": {
1781
+ "description": "when process type was created",
1782
+ "example": "2012-01-01T12:00:00Z",
1783
+ "format": "date-time",
1784
+ "readOnly": true,
1785
+ "type": [
1786
+ "string"
1787
+ ]
1788
+ },
1789
+ "id": {
1790
+ "description": "unique identifier of this process type",
1791
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
1792
+ "format": "uuid",
1793
+ "readOnly": true,
1794
+ "type": [
1795
+ "string"
1796
+ ]
1797
+ },
1798
+ "identity": {
1799
+ "anyOf": [
1800
+ {
1801
+ "$ref": "#/definitions/formation/definitions/id"
1802
+ },
1803
+ {
1804
+ "$ref": "#/definitions/formation/definitions/type"
1805
+ }
1806
+ ]
1807
+ },
1808
+ "quantity": {
1809
+ "description": "number of processes to maintain",
1810
+ "example": 1,
1811
+ "type": [
1812
+ "integer"
1813
+ ]
1814
+ },
1815
+ "size": {
1816
+ "description": "dyno size (default: \"1X\")",
1817
+ "example": "1X",
1818
+ "type": [
1819
+ "string"
1820
+ ]
1821
+ },
1822
+ "type": {
1823
+ "description": "type of process to maintain",
1824
+ "example": "web",
1825
+ "readOnly": true,
1826
+ "type": [
1827
+ "string"
1828
+ ]
1829
+ },
1830
+ "updated_at": {
1831
+ "description": "when dyno type was updated",
1832
+ "example": "2012-01-01T12:00:00Z",
1833
+ "format": "date-time",
1834
+ "readOnly": true,
1835
+ "type": [
1836
+ "string"
1837
+ ]
1838
+ },
1839
+ "update": {
1840
+ "additionalProperties": false,
1841
+ "properties": {
1842
+ "process": {
1843
+ "$ref": "#/definitions/formation/definitions/identity"
1844
+ },
1845
+ "quantity": {
1846
+ "$ref": "#/definitions/formation/definitions/quantity"
1847
+ },
1848
+ "size": {
1849
+ "$ref": "#/definitions/formation/definitions/size"
1850
+ }
1851
+ },
1852
+ "required": [
1853
+ "process"
1854
+ ],
1855
+ "type": [
1856
+ "object"
1857
+ ]
1858
+ }
1859
+ },
1860
+ "links": [
1861
+ {
1862
+ "description": "Info for a process type",
1863
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/formation/{(%23%2Fdefinitions%2Fformation%2Fdefinitions%2Fidentity)}",
1864
+ "method": "GET",
1865
+ "rel": "self",
1866
+ "title": "Info"
1867
+ },
1868
+ {
1869
+ "description": "List process type formation",
1870
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/formation",
1871
+ "method": "GET",
1872
+ "rel": "instances",
1873
+ "title": "List"
1874
+ },
1875
+ {
1876
+ "description": "Batch update process types",
1877
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/formation",
1878
+ "method": "PATCH",
1879
+ "rel": "update",
1880
+ "schema": {
1881
+ "properties": {
1882
+ "updates": {
1883
+ "type": [
1884
+ "array"
1885
+ ],
1886
+ "items": {
1887
+ "$ref": "#/definitions/formation/definitions/update"
1888
+ },
1889
+ "description": "Array with formation updates. Each element must have \"process\", the id or name of the process type to be updated, and can optionally update its \"quantity\" or \"size\".",
1890
+ "example": {
1891
+ "updates": [
1892
+ {
1893
+ "process": "web",
1894
+ "quantity": 1,
1895
+ "size": "2X"
1896
+ }
1897
+ ]
1898
+ }
1899
+ }
1900
+ },
1901
+ "required": [
1902
+ "updates"
1903
+ ]
1904
+ },
1905
+ "title": "Batch update"
1906
+ },
1907
+ {
1908
+ "description": "Update process type",
1909
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/formation/{(%23%2Fdefinitions%2Fformation%2Fdefinitions%2Fidentity)}",
1910
+ "method": "PATCH",
1911
+ "rel": "update",
1912
+ "schema": {
1913
+ "properties": {
1914
+ "quantity": {
1915
+ "$ref": "#/definitions/formation/definitions/quantity"
1916
+ },
1917
+ "size": {
1918
+ "$ref": "#/definitions/formation/definitions/size"
1919
+ }
1920
+ }
1921
+ },
1922
+ "title": "Update"
1923
+ }
1924
+ ],
1925
+ "properties": {
1926
+ "command": {
1927
+ "$ref": "#/definitions/formation/definitions/command"
1928
+ },
1929
+ "created_at": {
1930
+ "$ref": "#/definitions/formation/definitions/created_at"
1931
+ },
1932
+ "id": {
1933
+ "$ref": "#/definitions/formation/definitions/id"
1934
+ },
1935
+ "quantity": {
1936
+ "$ref": "#/definitions/formation/definitions/quantity"
1937
+ },
1938
+ "size": {
1939
+ "$ref": "#/definitions/formation/definitions/size"
1940
+ },
1941
+ "type": {
1942
+ "$ref": "#/definitions/formation/definitions/type"
1943
+ },
1944
+ "updated_at": {
1945
+ "$ref": "#/definitions/formation/definitions/updated_at"
1946
+ }
1947
+ }
1948
+ },
1949
+ "key": {
1950
+ "description": "Keys represent public SSH keys associated with an account and are used to authorize accounts as they are performing git operations.",
1951
+ "id": "schema/key",
1952
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
1953
+ "stability": "production",
1954
+ "title": "Heroku Platform API - Key",
1955
+ "type": [
1956
+ "object"
1957
+ ],
1958
+ "definitions": {
1959
+ "created_at": {
1960
+ "description": "when key was created",
1961
+ "example": "2012-01-01T12:00:00Z",
1962
+ "format": "date-time",
1963
+ "readOnly": true,
1964
+ "type": [
1965
+ "string"
1966
+ ]
1967
+ },
1968
+ "email": {
1969
+ "description": "email address provided in key contents",
1970
+ "example": "username@example.com",
1971
+ "format": "email",
1972
+ "readOnly": true,
1973
+ "type": [
1974
+ "string"
1975
+ ]
1976
+ },
1977
+ "fingerprint": {
1978
+ "description": "a unique identifying string based on contents",
1979
+ "example": "17:63:a4:ba:24:d3:7f:af:17:c8:94:82:7e:80:56:bf",
1980
+ "readOnly": true,
1981
+ "type": [
1982
+ "string"
1983
+ ]
1984
+ },
1985
+ "id": {
1986
+ "description": "unique identifier of this key",
1987
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
1988
+ "format": "uuid",
1989
+ "readOnly": true,
1990
+ "type": [
1991
+ "string"
1992
+ ]
1993
+ },
1994
+ "identity": {
1995
+ "anyOf": [
1996
+ {
1997
+ "$ref": "#/definitions/key/definitions/id"
1998
+ },
1999
+ {
2000
+ "$ref": "#/definitions/key/definitions/fingerprint"
2001
+ }
2002
+ ]
2003
+ },
2004
+ "public_key": {
2005
+ "description": "full public_key as uploaded",
2006
+ "example": "ssh-rsa AAAAB3NzaC1ycVc/../839Uv username@example.com",
2007
+ "readOnly": true,
2008
+ "type": [
2009
+ "string"
2010
+ ]
2011
+ },
2012
+ "updated_at": {
2013
+ "description": "when key was updated",
2014
+ "example": "2012-01-01T12:00:00Z",
2015
+ "format": "date-time",
2016
+ "readOnly": true,
2017
+ "type": [
2018
+ "string"
2019
+ ]
2020
+ }
2021
+ },
2022
+ "links": [
2023
+ {
2024
+ "description": "Create a new key.",
2025
+ "href": "/account/keys",
2026
+ "method": "POST",
2027
+ "rel": "create",
2028
+ "schema": {
2029
+ "properties": {
2030
+ "public_key": {
2031
+ "$ref": "#/definitions/key/definitions/public_key"
2032
+ }
2033
+ },
2034
+ "required": [
2035
+ "public_key"
2036
+ ]
2037
+ },
2038
+ "title": "Create"
2039
+ },
2040
+ {
2041
+ "description": "Delete an existing key",
2042
+ "href": "/account/keys/{(%23%2Fdefinitions%2Fkey%2Fdefinitions%2Fidentity)}",
2043
+ "method": "DELETE",
2044
+ "rel": "destroy",
2045
+ "title": "Delete"
2046
+ },
2047
+ {
2048
+ "description": "Info for existing key.",
2049
+ "href": "/account/keys/{(%23%2Fdefinitions%2Fkey%2Fdefinitions%2Fidentity)}",
2050
+ "method": "GET",
2051
+ "rel": "self",
2052
+ "title": "Info"
2053
+ },
2054
+ {
2055
+ "description": "List existing keys.",
2056
+ "href": "/account/keys",
2057
+ "method": "GET",
2058
+ "rel": "instances",
2059
+ "title": "List"
2060
+ }
2061
+ ],
2062
+ "properties": {
2063
+ "created_at": {
2064
+ "$ref": "#/definitions/key/definitions/created_at"
2065
+ },
2066
+ "email": {
2067
+ "$ref": "#/definitions/key/definitions/email"
2068
+ },
2069
+ "fingerprint": {
2070
+ "$ref": "#/definitions/key/definitions/fingerprint"
2071
+ },
2072
+ "id": {
2073
+ "$ref": "#/definitions/key/definitions/id"
2074
+ },
2075
+ "public_key": {
2076
+ "$ref": "#/definitions/key/definitions/public_key"
2077
+ },
2078
+ "updated_at": {
2079
+ "$ref": "#/definitions/key/definitions/updated_at"
2080
+ }
2081
+ }
2082
+ },
2083
+ "log-drain": {
2084
+ "description": "[Log drains](https://devcenter.heroku.com/articles/logging#syslog-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 addons will add a log drain when they are provisioned to an app. These drains can only be removed by removing the add-on.",
2085
+ "id": "schema/log-drain",
2086
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
2087
+ "stability": "development",
2088
+ "title": "Heroku Platform API - Log Drain",
2089
+ "type": [
2090
+ "object"
2091
+ ],
2092
+ "definitions": {
2093
+ "addon": {
2094
+ "description": "addon that created the drain",
2095
+ "example": "example",
2096
+ "properties": {
2097
+ "id": {
2098
+ "$ref": "#/definitions/addon/definitions/id"
2099
+ }
2100
+ },
2101
+ "type": [
2102
+ "object",
2103
+ "null"
2104
+ ]
2105
+ },
2106
+ "created_at": {
2107
+ "description": "when log drain was created",
2108
+ "example": "2012-01-01T12:00:00Z",
2109
+ "format": "date-time",
2110
+ "readOnly": true,
2111
+ "type": [
2112
+ "string"
2113
+ ]
2114
+ },
2115
+ "id": {
2116
+ "description": "unique identifier of this log drain",
2117
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
2118
+ "format": "uuid",
2119
+ "type": [
2120
+ "string"
2121
+ ]
2122
+ },
2123
+ "identity": {
2124
+ "anyOf": [
2125
+ {
2126
+ "$ref": "#/definitions/log-drain/definitions/id"
2127
+ },
2128
+ {
2129
+ "$ref": "#/definitions/log-drain/definitions/url"
2130
+ }
2131
+ ]
2132
+ },
2133
+ "token": {
2134
+ "description": "token associated with the log drain",
2135
+ "example": "d.01234567-89ab-cdef-0123-456789abcdef",
2136
+ "type": [
2137
+ "string"
2138
+ ]
2139
+ },
2140
+ "updated_at": {
2141
+ "description": "when log drain was updated",
2142
+ "example": "2012-01-01T12:00:00Z",
2143
+ "format": "date-time",
2144
+ "readOnly": true,
2145
+ "type": [
2146
+ "string"
2147
+ ]
2148
+ },
2149
+ "url": {
2150
+ "description": "url associated with the log drain",
2151
+ "example": "https://example.com/drain",
2152
+ "type": [
2153
+ "string"
2154
+ ]
2155
+ }
2156
+ },
2157
+ "links": [
2158
+ {
2159
+ "description": "Create a new log drain.",
2160
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-drains",
2161
+ "method": "POST",
2162
+ "rel": "create",
2163
+ "schema": {
2164
+ "properties": {
2165
+ "url": {
2166
+ "$ref": "#/definitions/log-drain/definitions/url"
2167
+ }
2168
+ },
2169
+ "required": [
2170
+ "url"
2171
+ ]
2172
+ },
2173
+ "title": "Create"
2174
+ },
2175
+ {
2176
+ "description": "Delete an existing log drain. Log drains added by add-ons can only be removed by removing the add-on.",
2177
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-drains/{(%23%2Fdefinitions%2Flog-drain%2Fdefinitions%2Fidentity)}",
2178
+ "method": "DELETE",
2179
+ "rel": "destroy",
2180
+ "title": "Delete"
2181
+ },
2182
+ {
2183
+ "description": "Info for existing log drain.",
2184
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-drains/{(%23%2Fdefinitions%2Flog-drain%2Fdefinitions%2Fidentity)}",
2185
+ "method": "GET",
2186
+ "rel": "self",
2187
+ "title": "Info"
2188
+ },
2189
+ {
2190
+ "description": "List existing log drains.",
2191
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-drains",
2192
+ "method": "GET",
2193
+ "rel": "instances",
2194
+ "title": "List"
2195
+ }
2196
+ ],
2197
+ "properties": {
2198
+ "addon": {
2199
+ "$ref": "#/definitions/log-drain/definitions/addon"
2200
+ },
2201
+ "created_at": {
2202
+ "$ref": "#/definitions/log-drain/definitions/created_at"
2203
+ },
2204
+ "id": {
2205
+ "$ref": "#/definitions/log-drain/definitions/id"
2206
+ },
2207
+ "token": {
2208
+ "$ref": "#/definitions/log-drain/definitions/token"
2209
+ },
2210
+ "updated_at": {
2211
+ "$ref": "#/definitions/log-drain/definitions/updated_at"
2212
+ },
2213
+ "url": {
2214
+ "$ref": "#/definitions/log-drain/definitions/url"
2215
+ }
2216
+ }
2217
+ },
2218
+ "log-session": {
2219
+ "description": "A log session is a reference to the http based log stream for an app.",
2220
+ "id": "schema/log-session",
2221
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
2222
+ "stability": "development",
2223
+ "title": "Heroku Platform API - Log Session",
2224
+ "type": [
2225
+ "object"
2226
+ ],
2227
+ "definitions": {
2228
+ "created_at": {
2229
+ "description": "when log connection was created",
2230
+ "example": "2012-01-01T12:00:00Z",
2231
+ "format": "date-time",
2232
+ "readOnly": true,
2233
+ "type": [
2234
+ "string"
2235
+ ]
2236
+ },
2237
+ "dyno": {
2238
+ "description": "dyno to limit results to",
2239
+ "example": "web.1",
2240
+ "type": [
2241
+ "string"
2242
+ ]
2243
+ },
2244
+ "id": {
2245
+ "description": "unique identifier of this log session",
2246
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
2247
+ "format": "uuid",
2248
+ "type": [
2249
+ "string"
2250
+ ]
2251
+ },
2252
+ "identity": {
2253
+ "anyOf": [
2254
+ {
2255
+ "$ref": "#/definitions/log-session/definitions/id"
2256
+ }
2257
+ ]
2258
+ },
2259
+ "lines": {
2260
+ "description": "number of log lines to stream at once",
2261
+ "example": 10,
2262
+ "type": [
2263
+ "integer"
2264
+ ]
2265
+ },
2266
+ "logplex_url": {
2267
+ "description": "URL for log streaming session",
2268
+ "example": "https://logplex.heroku.com/sessions/01234567-89ab-cdef-0123-456789abcdef?srv=1325419200",
2269
+ "readOnly": true,
2270
+ "type": [
2271
+ "string"
2272
+ ]
2273
+ },
2274
+ "source": {
2275
+ "description": "log source to limit results to",
2276
+ "example": "app",
2277
+ "type": [
2278
+ "string"
2279
+ ]
2280
+ },
2281
+ "tail": {
2282
+ "description": "whether to stream ongoing logs",
2283
+ "example": true,
2284
+ "type": [
2285
+ "boolean"
2286
+ ]
2287
+ },
2288
+ "updated_at": {
2289
+ "description": "when log session was updated",
2290
+ "example": "2012-01-01T12:00:00Z",
2291
+ "format": "date-time",
2292
+ "readOnly": true,
2293
+ "type": [
2294
+ "string"
2295
+ ]
2296
+ }
2297
+ },
2298
+ "links": [
2299
+ {
2300
+ "description": "Create a new log session.",
2301
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/log-sessions",
2302
+ "method": "POST",
2303
+ "rel": "create",
2304
+ "schema": {
2305
+ "properties": {
2306
+ "dyno": {
2307
+ "$ref": "#/definitions/log-session/definitions/dyno"
2308
+ },
2309
+ "lines": {
2310
+ "$ref": "#/definitions/log-session/definitions/lines"
2311
+ },
2312
+ "source": {
2313
+ "$ref": "#/definitions/log-session/definitions/source"
2314
+ },
2315
+ "tail": {
2316
+ "$ref": "#/definitions/log-session/definitions/tail"
2317
+ }
2318
+ }
2319
+ },
2320
+ "title": "Create"
2321
+ }
2322
+ ],
2323
+ "properties": {
2324
+ "created_at": {
2325
+ "$ref": "#/definitions/log-session/definitions/created_at"
2326
+ },
2327
+ "id": {
2328
+ "$ref": "#/definitions/log-session/definitions/id"
2329
+ },
2330
+ "logplex_url": {
2331
+ "$ref": "#/definitions/log-session/definitions/logplex_url"
2332
+ },
2333
+ "updated_at": {
2334
+ "$ref": "#/definitions/log-session/definitions/updated_at"
2335
+ }
2336
+ }
2337
+ },
2338
+ "oauth-authorization": {
2339
+ "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)",
2340
+ "id": "schema/oauth-authorization",
2341
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
2342
+ "stability": "production",
2343
+ "title": "Heroku Platform API - OAuth Authorization",
2344
+ "type": [
2345
+ "object"
2346
+ ],
2347
+ "definitions": {
2348
+ "created_at": {
2349
+ "description": "when OAuth authorization was created",
2350
+ "example": "2012-01-01T12:00:00Z",
2351
+ "format": "date-time",
2352
+ "readOnly": true,
2353
+ "type": [
2354
+ "string"
2355
+ ]
2356
+ },
2357
+ "description": {
2358
+ "description": "human-friendly description of this OAuth authorization",
2359
+ "example": "sample authorization",
2360
+ "readOnly": true,
2361
+ "type": [
2362
+ "string"
2363
+ ]
2364
+ },
2365
+ "id": {
2366
+ "description": "unique identifier of OAuth authorization",
2367
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
2368
+ "format": "uuid",
2369
+ "readOnly": true,
2370
+ "type": [
2371
+ "string"
2372
+ ]
2373
+ },
2374
+ "identity": {
2375
+ "anyOf": [
2376
+ {
2377
+ "$ref": "#/definitions/oauth-authorization/definitions/id"
2378
+ }
2379
+ ]
2380
+ },
2381
+ "scope": {
2382
+ "description": "The scope of access OAuth authorization allows",
2383
+ "example": [
2384
+ "global"
2385
+ ],
2386
+ "readOnly": true,
2387
+ "type": [
2388
+ "array"
2389
+ ],
2390
+ "items": {
2391
+ "type": "string"
2392
+ }
2393
+ },
2394
+ "updated_at": {
2395
+ "description": "when OAuth authorization was updated",
2396
+ "example": "2012-01-01T12:00:00Z",
2397
+ "format": "date-time",
2398
+ "readOnly": true,
2399
+ "type": [
2400
+ "string"
2401
+ ]
2402
+ }
2403
+ },
2404
+ "links": [
2405
+ {
2406
+ "description": "Create a new OAuth authorization.",
2407
+ "href": "/oauth/authorizations",
2408
+ "method": "POST",
2409
+ "rel": "create",
2410
+ "schema": {
2411
+ "properties": {
2412
+ "client": {
2413
+ "$ref": "#/definitions/oauth-client/definitions/identity"
2414
+ },
2415
+ "description": {
2416
+ "$ref": "#/definitions/oauth-authorization/definitions/description"
2417
+ },
2418
+ "expires_in": {
2419
+ "$ref": "#/definitions/oauth-token/definitions/expires_in"
2420
+ },
2421
+ "scope": {
2422
+ "$ref": "#/definitions/oauth-authorization/definitions/scope"
2423
+ }
2424
+ },
2425
+ "required": [
2426
+ "scope"
2427
+ ]
2428
+ },
2429
+ "title": "Create"
2430
+ },
2431
+ {
2432
+ "description": "Delete OAuth authorization.",
2433
+ "href": "/oauth/authorizations/{(%23%2Fdefinitions%2Foauth-authorization%2Fdefinitions%2Fidentity)}",
2434
+ "method": "DELETE",
2435
+ "rel": "destroy",
2436
+ "title": "Delete"
2437
+ },
2438
+ {
2439
+ "description": "Info for an OAuth authorization.",
2440
+ "href": "/oauth/authorizations/{(%23%2Fdefinitions%2Foauth-authorization%2Fdefinitions%2Fidentity)}",
2441
+ "method": "GET",
2442
+ "rel": "self",
2443
+ "title": "Info"
2444
+ },
2445
+ {
2446
+ "description": "List OAuth authorizations.",
2447
+ "href": "/oauth/authorizations",
2448
+ "method": "GET",
2449
+ "rel": "instances",
2450
+ "title": "List"
2451
+ }
2452
+ ],
2453
+ "properties": {
2454
+ "access_token": {
2455
+ "description": "access token for this authorization",
2456
+ "properties": {
2457
+ "expires_in": {
2458
+ "$ref": "#/definitions/oauth-token/definitions/expires_in"
2459
+ },
2460
+ "id": {
2461
+ "$ref": "#/definitions/oauth-token/definitions/id"
2462
+ },
2463
+ "token": {
2464
+ "$ref": "#/definitions/oauth-token/definitions/token"
2465
+ }
2466
+ },
2467
+ "type": [
2468
+ "null",
2469
+ "object"
2470
+ ]
2471
+ },
2472
+ "client": {
2473
+ "description": "identifier of the client that obtained this authorization, if any",
2474
+ "properties": {
2475
+ "id": {
2476
+ "$ref": "#/definitions/oauth-client/definitions/id"
2477
+ },
2478
+ "name": {
2479
+ "$ref": "#/definitions/oauth-client/definitions/name"
2480
+ },
2481
+ "redirect_uri": {
2482
+ "$ref": "#/definitions/oauth-client/definitions/redirect_uri"
2483
+ }
2484
+ },
2485
+ "type": [
2486
+ "null",
2487
+ "object"
2488
+ ]
2489
+ },
2490
+ "created_at": {
2491
+ "$ref": "#/definitions/oauth-authorization/definitions/created_at"
2492
+ },
2493
+ "grant": {
2494
+ "description": "this authorization's grant",
2495
+ "properties": {
2496
+ "code": {
2497
+ "$ref": "#/definitions/oauth-grant/definitions/code"
2498
+ },
2499
+ "expires_in": {
2500
+ "$ref": "#/definitions/oauth-grant/definitions/expires_in"
2501
+ },
2502
+ "id": {
2503
+ "$ref": "#/definitions/oauth-grant/definitions/id"
2504
+ }
2505
+ },
2506
+ "type": [
2507
+ "null",
2508
+ "object"
2509
+ ]
2510
+ },
2511
+ "id": {
2512
+ "$ref": "#/definitions/oauth-authorization/definitions/id"
2513
+ },
2514
+ "refresh_token": {
2515
+ "description": "refresh token for this authorization",
2516
+ "properties": {
2517
+ "expires_in": {
2518
+ "$ref": "#/definitions/oauth-token/definitions/expires_in"
2519
+ },
2520
+ "id": {
2521
+ "$ref": "#/definitions/oauth-token/definitions/id"
2522
+ },
2523
+ "token": {
2524
+ "$ref": "#/definitions/oauth-token/definitions/token"
2525
+ }
2526
+ },
2527
+ "type": [
2528
+ "null",
2529
+ "object"
2530
+ ]
2531
+ },
2532
+ "scope": {
2533
+ "$ref": "#/definitions/oauth-authorization/definitions/scope"
2534
+ },
2535
+ "updated_at": {
2536
+ "$ref": "#/definitions/oauth-authorization/definitions/updated_at"
2537
+ }
2538
+ }
2539
+ },
2540
+ "oauth-client": {
2541
+ "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).",
2542
+ "id": "schema/oauth-client",
2543
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
2544
+ "stability": "production",
2545
+ "title": "Heroku Platform API - OAuth Client",
2546
+ "type": [
2547
+ "object"
2548
+ ],
2549
+ "definitions": {
2550
+ "created_at": {
2551
+ "description": "when OAuth client was created",
2552
+ "example": "2012-01-01T12:00:00Z",
2553
+ "format": "date-time",
2554
+ "readOnly": true,
2555
+ "type": [
2556
+ "string"
2557
+ ]
2558
+ },
2559
+ "id": {
2560
+ "description": "unique identifier of this OAuth client",
2561
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
2562
+ "format": "uuid",
2563
+ "readOnly": true,
2564
+ "type": [
2565
+ "string"
2566
+ ]
2567
+ },
2568
+ "identity": {
2569
+ "anyOf": [
2570
+ {
2571
+ "$ref": "#/definitions/oauth-client/definitions/id"
2572
+ }
2573
+ ]
2574
+ },
2575
+ "ignores_delinquent": {
2576
+ "description": "whether the client is still operable given a delinquent account",
2577
+ "example": false,
2578
+ "readOnly": true,
2579
+ "type": [
2580
+ "boolean",
2581
+ "null"
2582
+ ]
2583
+ },
2584
+ "name": {
2585
+ "description": "OAuth client name",
2586
+ "example": "example",
2587
+ "readOnly": true,
2588
+ "type": [
2589
+ "string"
2590
+ ]
2591
+ },
2592
+ "redirect_uri": {
2593
+ "description": "endpoint for redirection after authorization with OAuth client",
2594
+ "example": "https://example.com/auth/heroku/callback",
2595
+ "readOnly": true,
2596
+ "type": [
2597
+ "string"
2598
+ ]
2599
+ },
2600
+ "secret": {
2601
+ "description": "secret used to obtain OAuth authorizations under this client",
2602
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
2603
+ "readOnly": true,
2604
+ "type": [
2605
+ "string"
2606
+ ]
2607
+ },
2608
+ "updated_at": {
2609
+ "description": "when OAuth client was updated",
2610
+ "example": "2012-01-01T12:00:00Z",
2611
+ "format": "date-time",
2612
+ "readOnly": true,
2613
+ "type": [
2614
+ "string"
2615
+ ]
2616
+ }
2617
+ },
2618
+ "links": [
2619
+ {
2620
+ "description": "Create a new OAuth client.",
2621
+ "href": "/oauth/clients",
2622
+ "method": "POST",
2623
+ "rel": "create",
2624
+ "schema": {
2625
+ "properties": {
2626
+ "name": {
2627
+ "$ref": "#/definitions/oauth-client/definitions/name"
2628
+ },
2629
+ "redirect_uri": {
2630
+ "$ref": "#/definitions/oauth-client/definitions/redirect_uri"
2631
+ }
2632
+ },
2633
+ "required": [
2634
+ "name",
2635
+ "redirect_uri"
2636
+ ]
2637
+ },
2638
+ "title": "Create"
2639
+ },
2640
+ {
2641
+ "description": "Delete OAuth client.",
2642
+ "href": "/oauth/clients/{(%23%2Fdefinitions%2Foauth-client%2Fdefinitions%2Fidentity)}",
2643
+ "method": "DELETE",
2644
+ "rel": "destroy",
2645
+ "title": "Delete"
2646
+ },
2647
+ {
2648
+ "description": "Info for an OAuth client",
2649
+ "href": "/oauth/clients/{(%23%2Fdefinitions%2Foauth-client%2Fdefinitions%2Fidentity)}",
2650
+ "method": "GET",
2651
+ "rel": "self",
2652
+ "title": "Info"
2653
+ },
2654
+ {
2655
+ "description": "List OAuth clients",
2656
+ "href": "/oauth/clients",
2657
+ "method": "GET",
2658
+ "rel": "instances",
2659
+ "title": "List"
2660
+ },
2661
+ {
2662
+ "description": "Update OAuth client",
2663
+ "href": "/oauth/clients/{(%23%2Fdefinitions%2Foauth-client%2Fdefinitions%2Fidentity)}",
2664
+ "method": "PATCH",
2665
+ "rel": "update",
2666
+ "schema": {
2667
+ "properties": {
2668
+ "name": {
2669
+ "$ref": "#/definitions/oauth-client/definitions/name"
2670
+ },
2671
+ "redirect_uri": {
2672
+ "$ref": "#/definitions/oauth-client/definitions/redirect_uri"
2673
+ }
2674
+ }
2675
+ },
2676
+ "title": "Update"
2677
+ }
2678
+ ],
2679
+ "properties": {
2680
+ "created_at": {
2681
+ "$ref": "#/definitions/oauth-client/definitions/created_at"
2682
+ },
2683
+ "id": {
2684
+ "$ref": "#/definitions/oauth-client/definitions/id"
2685
+ },
2686
+ "ignores_delinquent": {
2687
+ "$ref": "#/definitions/oauth-client/definitions/ignores_delinquent"
2688
+ },
2689
+ "name": {
2690
+ "$ref": "#/definitions/oauth-client/definitions/name"
2691
+ },
2692
+ "redirect_uri": {
2693
+ "$ref": "#/definitions/oauth-client/definitions/redirect_uri"
2694
+ },
2695
+ "secret": {
2696
+ "$ref": "#/definitions/oauth-client/definitions/secret"
2697
+ },
2698
+ "updated_at": {
2699
+ "$ref": "#/definitions/oauth-client/definitions/updated_at"
2700
+ }
2701
+ }
2702
+ },
2703
+ "oauth-grant": {
2704
+ "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)",
2705
+ "id": "schema/oauth-grant",
2706
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
2707
+ "stability": "production",
2708
+ "title": "Heroku Platform API - OAuth Grant",
2709
+ "type": [
2710
+ "object"
2711
+ ],
2712
+ "definitions": {
2713
+ "code": {
2714
+ "description": "grant code received from OAuth web application authorization",
2715
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
2716
+ "readOnly": true,
2717
+ "type": [
2718
+ "string"
2719
+ ]
2720
+ },
2721
+ "expires_in": {
2722
+ "description": "seconds until OAuth grant expires",
2723
+ "example": 2592000,
2724
+ "readOnly": true,
2725
+ "type": [
2726
+ "integer"
2727
+ ]
2728
+ },
2729
+ "id": {
2730
+ "description": "unique identifier of OAuth grant",
2731
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
2732
+ "format": "uuid",
2733
+ "readOnly": true,
2734
+ "type": [
2735
+ "string"
2736
+ ]
2737
+ },
2738
+ "type": {
2739
+ "description": "type of grant requested, one of `authorization_code` or `refresh_token`",
2740
+ "example": "authorization_code",
2741
+ "readOnly": false,
2742
+ "type": [
2743
+ "string"
2744
+ ]
2745
+ }
2746
+ },
2747
+ "links": [
2748
+ ],
2749
+ "properties": {
2750
+ }
2751
+ },
2752
+ "oauth-token": {
2753
+ "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)",
2754
+ "id": "schema/oauth-token",
2755
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
2756
+ "stability": "production",
2757
+ "title": "Heroku Platform API - OAuth Token",
2758
+ "type": [
2759
+ "object"
2760
+ ],
2761
+ "definitions": {
2762
+ "created_at": {
2763
+ "description": "when OAuth token was created",
2764
+ "example": "2012-01-01T12:00:00Z",
2765
+ "format": "date-time",
2766
+ "readOnly": true,
2767
+ "type": [
2768
+ "string"
2769
+ ]
2770
+ },
2771
+ "expires_in": {
2772
+ "description": "seconds until OAuth token expires; may be `null` for tokens with indefinite lifetime",
2773
+ "example": 2592000,
2774
+ "readOnly": true,
2775
+ "type": [
2776
+ "null",
2777
+ "integer"
2778
+ ]
2779
+ },
2780
+ "id": {
2781
+ "description": "unique identifier of OAuth token",
2782
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
2783
+ "format": "uuid",
2784
+ "readOnly": true,
2785
+ "type": [
2786
+ "string"
2787
+ ]
2788
+ },
2789
+ "identity": {
2790
+ "anyOf": [
2791
+ {
2792
+ "$ref": "#/definitions/oauth-token/definitions/id"
2793
+ }
2794
+ ]
2795
+ },
2796
+ "token": {
2797
+ "description": "contents of the token to be used for authorization",
2798
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
2799
+ "readOnly": true,
2800
+ "type": [
2801
+ "string"
2802
+ ]
2803
+ },
2804
+ "updated_at": {
2805
+ "description": "when OAuth token was updated",
2806
+ "example": "2012-01-01T12:00:00Z",
2807
+ "format": "date-time",
2808
+ "readOnly": true,
2809
+ "type": [
2810
+ "string"
2811
+ ]
2812
+ }
2813
+ },
2814
+ "links": [
2815
+ {
2816
+ "description": "Create a new OAuth token.",
2817
+ "href": "/oauth/tokens",
2818
+ "method": "POST",
2819
+ "rel": "create",
2820
+ "schema": {
2821
+ "properties": {
2822
+ "client": {
2823
+ "type": [
2824
+ "object"
2825
+ ],
2826
+ "properties": {
2827
+ "secret": {
2828
+ "$ref": "#/definitions/oauth-client/definitions/secret"
2829
+ }
2830
+ }
2831
+ },
2832
+ "grant": {
2833
+ "type": [
2834
+ "object"
2835
+ ],
2836
+ "properties": {
2837
+ "code": {
2838
+ "$ref": "#/definitions/oauth-grant/definitions/code"
2839
+ },
2840
+ "type": {
2841
+ "$ref": "#/definitions/oauth-grant/definitions/type"
2842
+ }
2843
+ }
2844
+ },
2845
+ "refresh_token": {
2846
+ "type": [
2847
+ "object"
2848
+ ],
2849
+ "properties": {
2850
+ "token": {
2851
+ "$ref": "#/definitions/oauth-token/definitions/token"
2852
+ }
2853
+ }
2854
+ }
2855
+ },
2856
+ "required": [
2857
+ "grant",
2858
+ "client",
2859
+ "refresh_token"
2860
+ ]
2861
+ },
2862
+ "title": "Create"
2863
+ }
2864
+ ],
2865
+ "properties": {
2866
+ "access_token": {
2867
+ "description": "current access token",
2868
+ "properties": {
2869
+ "expires_in": {
2870
+ "$ref": "#/definitions/oauth-token/definitions/expires_in"
2871
+ },
2872
+ "id": {
2873
+ "$ref": "#/definitions/oauth-token/definitions/id"
2874
+ },
2875
+ "token": {
2876
+ "$ref": "#/definitions/oauth-token/definitions/token"
2877
+ }
2878
+ },
2879
+ "type": [
2880
+ "object"
2881
+ ]
2882
+ },
2883
+ "authorization": {
2884
+ "description": "authorization for this set of tokens",
2885
+ "properties": {
2886
+ "id": {
2887
+ "$ref": "#/definitions/oauth-authorization/definitions/id"
2888
+ }
2889
+ },
2890
+ "type": [
2891
+ "object"
2892
+ ]
2893
+ },
2894
+ "client": {
2895
+ "description": "OAuth client secret used to obtain token",
2896
+ "properties": {
2897
+ "secret": {
2898
+ "$ref": "#/definitions/oauth-client/definitions/secret"
2899
+ }
2900
+ },
2901
+ "type": [
2902
+ "null",
2903
+ "object"
2904
+ ]
2905
+ },
2906
+ "created_at": {
2907
+ "$ref": "#/definitions/oauth-token/definitions/created_at"
2908
+ },
2909
+ "grant": {
2910
+ "description": "grant used on the underlying authorization",
2911
+ "properties": {
2912
+ "code": {
2913
+ "$ref": "#/definitions/oauth-grant/definitions/code"
2914
+ },
2915
+ "type": {
2916
+ "$ref": "#/definitions/oauth-grant/definitions/type"
2917
+ }
2918
+ },
2919
+ "type": [
2920
+ "object"
2921
+ ]
2922
+ },
2923
+ "id": {
2924
+ "$ref": "#/definitions/oauth-token/definitions/id"
2925
+ },
2926
+ "refresh_token": {
2927
+ "description": "refresh token for this authorization",
2928
+ "properties": {
2929
+ "expires_in": {
2930
+ "$ref": "#/definitions/oauth-token/definitions/expires_in"
2931
+ },
2932
+ "id": {
2933
+ "$ref": "#/definitions/oauth-token/definitions/id"
2934
+ },
2935
+ "token": {
2936
+ "$ref": "#/definitions/oauth-token/definitions/token"
2937
+ }
2938
+ },
2939
+ "type": [
2940
+ "object"
2941
+ ]
2942
+ },
2943
+ "session": {
2944
+ "description": "OAuth session using this token",
2945
+ "properties": {
2946
+ "id": {
2947
+ "$ref": "#/definitions/oauth-token/definitions/id"
2948
+ }
2949
+ },
2950
+ "type": [
2951
+ "object"
2952
+ ]
2953
+ },
2954
+ "updated_at": {
2955
+ "$ref": "#/definitions/oauth-token/definitions/updated_at"
2956
+ },
2957
+ "user": {
2958
+ "description": "Reference to the user associated with this token",
2959
+ "properties": {
2960
+ "id": {
2961
+ "$ref": "#/definitions/account/definitions/id"
2962
+ }
2963
+ },
2964
+ "type": [
2965
+ "object"
2966
+ ]
2967
+ }
2968
+ }
2969
+ },
2970
+ "plan": {
2971
+ "description": "Plans represent different configurations of add-ons that may be added to apps.",
2972
+ "id": "schema/plan",
2973
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
2974
+ "stability": "production",
2975
+ "title": "Heroku Platform API - Plan",
2976
+ "type": [
2977
+ "object"
2978
+ ],
2979
+ "definitions": {
2980
+ "created_at": {
2981
+ "description": "when plan was created",
2982
+ "example": "2012-01-01T12:00:00Z",
2983
+ "format": "date-time",
2984
+ "readOnly": true,
2985
+ "type": [
2986
+ "string"
2987
+ ]
2988
+ },
2989
+ "default": {
2990
+ "description": "whether this plan is the default for its addon service",
2991
+ "example": false,
2992
+ "readOnly": true,
2993
+ "type": [
2994
+ "boolean"
2995
+ ]
2996
+ },
2997
+ "description": {
2998
+ "description": "description of plan",
2999
+ "example": "Heroku Postgres Dev",
3000
+ "readOnly": true,
3001
+ "type": [
3002
+ "string"
3003
+ ]
3004
+ },
3005
+ "id": {
3006
+ "description": "unique identifier of this plan",
3007
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
3008
+ "format": "uuid",
3009
+ "readOnly": true,
3010
+ "type": [
3011
+ "string"
3012
+ ]
3013
+ },
3014
+ "identity": {
3015
+ "anyOf": [
3016
+ {
3017
+ "$ref": "#/definitions/plan/definitions/id"
3018
+ },
3019
+ {
3020
+ "$ref": "#/definitions/plan/definitions/name"
3021
+ }
3022
+ ]
3023
+ },
3024
+ "name": {
3025
+ "description": "unique name of this plan",
3026
+ "example": "heroku-postgresql:dev",
3027
+ "readOnly": true,
3028
+ "type": [
3029
+ "string"
3030
+ ]
3031
+ },
3032
+ "cents": {
3033
+ "description": "price in cents per unit of plan",
3034
+ "example": 0,
3035
+ "readOnly": true,
3036
+ "type": [
3037
+ "integer"
3038
+ ]
3039
+ },
3040
+ "unit": {
3041
+ "description": "unit of price for plan",
3042
+ "example": "month",
3043
+ "readOnly": true,
3044
+ "type": [
3045
+ "string"
3046
+ ]
3047
+ },
3048
+ "state": {
3049
+ "description": "release status for plan",
3050
+ "example": "public",
3051
+ "readOnly": true,
3052
+ "type": [
3053
+ "string"
3054
+ ]
3055
+ },
3056
+ "updated_at": {
3057
+ "description": "when plan was updated",
3058
+ "example": "2012-01-01T12:00:00Z",
3059
+ "format": "date-time",
3060
+ "readOnly": true,
3061
+ "type": [
3062
+ "string"
3063
+ ]
3064
+ }
3065
+ },
3066
+ "links": [
3067
+ {
3068
+ "description": "Info for existing plan.",
3069
+ "href": "/addon-services/{(%23%2Fdefinitions%2Faddon-service%2Fdefinitions%2Fidentity)}/plans/{(%23%2Fdefinitions%2Fplan%2Fdefinitions%2Fidentity)}",
3070
+ "method": "GET",
3071
+ "rel": "self",
3072
+ "title": "Info"
3073
+ },
3074
+ {
3075
+ "description": "List existing plans.",
3076
+ "href": "/addon-services/{(%23%2Fdefinitions%2Faddon-service%2Fdefinitions%2Fidentity)}/plans",
3077
+ "method": "GET",
3078
+ "rel": "instances",
3079
+ "title": "List"
3080
+ }
3081
+ ],
3082
+ "properties": {
3083
+ "created_at": {
3084
+ "$ref": "#/definitions/plan/definitions/created_at"
3085
+ },
3086
+ "default": {
3087
+ "$ref": "#/definitions/plan/definitions/default"
3088
+ },
3089
+ "description": {
3090
+ "$ref": "#/definitions/plan/definitions/description"
3091
+ },
3092
+ "id": {
3093
+ "$ref": "#/definitions/plan/definitions/id"
3094
+ },
3095
+ "name": {
3096
+ "$ref": "#/definitions/plan/definitions/name"
3097
+ },
3098
+ "price": {
3099
+ "description": "price",
3100
+ "properties": {
3101
+ "cents": {
3102
+ "$ref": "#/definitions/plan/definitions/cents"
3103
+ },
3104
+ "unit": {
3105
+ "$ref": "#/definitions/plan/definitions/unit"
3106
+ }
3107
+ },
3108
+ "type": [
3109
+ "object"
3110
+ ]
3111
+ },
3112
+ "state": {
3113
+ "$ref": "#/definitions/plan/definitions/state"
3114
+ },
3115
+ "updated_at": {
3116
+ "$ref": "#/definitions/plan/definitions/updated_at"
3117
+ }
3118
+ }
3119
+ },
3120
+ "rate-limit": {
3121
+ "description": "Rate Limit represents the number of request tokens each account holds. Requests to this endpoint do not count towards the rate limit.",
3122
+ "id": "schema/rate-limit",
3123
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
3124
+ "stability": "production",
3125
+ "title": "Heroku Platform API - Rate Limit",
3126
+ "type": [
3127
+ "object"
3128
+ ],
3129
+ "definitions": {
3130
+ "remaining": {
3131
+ "description": "allowed requests remaining in current interval",
3132
+ "example": 2399,
3133
+ "readOnly": true,
3134
+ "type": [
3135
+ "integer"
3136
+ ]
3137
+ }
3138
+ },
3139
+ "links": [
3140
+ {
3141
+ "description": "Info for rate limits.",
3142
+ "href": "/account/rate-limits",
3143
+ "method": "GET",
3144
+ "rel": "self",
3145
+ "title": "Info"
3146
+ }
3147
+ ],
3148
+ "properties": {
3149
+ "remaining": {
3150
+ "$ref": "#/definitions/rate-limit/definitions/remaining"
3151
+ }
3152
+ }
3153
+ },
3154
+ "region": {
3155
+ "description": "A region represents a geographic location in which your application may run.",
3156
+ "id": "schema/region",
3157
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
3158
+ "stability": "development",
3159
+ "title": "Heroku Platform API - Region",
3160
+ "type": [
3161
+ "object"
3162
+ ],
3163
+ "definitions": {
3164
+ "created_at": {
3165
+ "description": "when region was created",
3166
+ "example": "2012-01-01T12:00:00Z",
3167
+ "format": "date-time",
3168
+ "readOnly": true,
3169
+ "type": [
3170
+ "string"
3171
+ ]
3172
+ },
3173
+ "description": {
3174
+ "description": "description of region",
3175
+ "example": "United States",
3176
+ "readOnly": true,
3177
+ "type": [
3178
+ "string"
3179
+ ]
3180
+ },
3181
+ "id": {
3182
+ "description": "unique identifier of region",
3183
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
3184
+ "format": "uuid",
3185
+ "readOnly": true,
3186
+ "type": [
3187
+ "string"
3188
+ ]
3189
+ },
3190
+ "identity": {
3191
+ "anyOf": [
3192
+ {
3193
+ "$ref": "#/definitions/region/definitions/id"
3194
+ },
3195
+ {
3196
+ "$ref": "#/definitions/region/definitions/name"
3197
+ }
3198
+ ]
3199
+ },
3200
+ "name": {
3201
+ "description": "unique name of region",
3202
+ "example": "us",
3203
+ "readOnly": true,
3204
+ "type": [
3205
+ "string"
3206
+ ]
3207
+ },
3208
+ "updated_at": {
3209
+ "description": "when region was updated",
3210
+ "example": "2012-01-01T12:00:00Z",
3211
+ "format": "date-time",
3212
+ "readOnly": true,
3213
+ "type": [
3214
+ "string"
3215
+ ]
3216
+ }
3217
+ },
3218
+ "links": [
3219
+ {
3220
+ "description": "Info for existing region.",
3221
+ "href": "/regions/{(%23%2Fdefinitions%2Fregion%2Fdefinitions%2Fidentity)}",
3222
+ "method": "GET",
3223
+ "rel": "self",
3224
+ "title": "Info"
3225
+ },
3226
+ {
3227
+ "description": "List existing regions.",
3228
+ "href": "/regions",
3229
+ "method": "GET",
3230
+ "rel": "instances",
3231
+ "title": "List"
3232
+ }
3233
+ ],
3234
+ "properties": {
3235
+ "created_at": {
3236
+ "$ref": "#/definitions/region/definitions/created_at"
3237
+ },
3238
+ "description": {
3239
+ "$ref": "#/definitions/region/definitions/description"
3240
+ },
3241
+ "id": {
3242
+ "$ref": "#/definitions/region/definitions/id"
3243
+ },
3244
+ "name": {
3245
+ "$ref": "#/definitions/region/definitions/name"
3246
+ },
3247
+ "updated_at": {
3248
+ "$ref": "#/definitions/region/definitions/updated_at"
3249
+ }
3250
+ }
3251
+ },
3252
+ "release": {
3253
+ "description": "A release represents a combination of code, config vars and add-ons for an app on Heroku.",
3254
+ "id": "schema/release",
3255
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
3256
+ "stability": "development",
3257
+ "title": "Heroku Platform API - Release",
3258
+ "type": [
3259
+ "object"
3260
+ ],
3261
+ "definitions": {
3262
+ "created_at": {
3263
+ "description": "when release was created",
3264
+ "example": "2012-01-01T12:00:00Z",
3265
+ "format": "date-time",
3266
+ "readOnly": true,
3267
+ "type": [
3268
+ "string"
3269
+ ]
3270
+ },
3271
+ "description": {
3272
+ "description": "description of changes in this release",
3273
+ "example": "Added new feature",
3274
+ "type": [
3275
+ "string"
3276
+ ]
3277
+ },
3278
+ "id": {
3279
+ "description": "unique identifier of release",
3280
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
3281
+ "format": "uuid",
3282
+ "readOnly": true,
3283
+ "type": [
3284
+ "string"
3285
+ ]
3286
+ },
3287
+ "identity": {
3288
+ "anyOf": [
3289
+ {
3290
+ "$ref": "#/definitions/release/definitions/id"
3291
+ },
3292
+ {
3293
+ "$ref": "#/definitions/release/definitions/version"
3294
+ }
3295
+ ]
3296
+ },
3297
+ "updated_at": {
3298
+ "description": "when release was updated",
3299
+ "example": "2012-01-01T12:00:00Z",
3300
+ "format": "date-time",
3301
+ "readOnly": true,
3302
+ "type": [
3303
+ "string"
3304
+ ]
3305
+ },
3306
+ "version": {
3307
+ "description": "unique version assigned to the release",
3308
+ "example": 11,
3309
+ "readOnly": true,
3310
+ "type": [
3311
+ "integer"
3312
+ ]
3313
+ }
3314
+ },
3315
+ "links": [
3316
+ {
3317
+ "description": "Info for existing release.",
3318
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases/{(%23%2Fdefinitions%2Frelease%2Fdefinitions%2Fidentity)}",
3319
+ "method": "GET",
3320
+ "rel": "self",
3321
+ "title": "Info"
3322
+ },
3323
+ {
3324
+ "description": "List existing releases.",
3325
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases",
3326
+ "method": "GET",
3327
+ "rel": "instances",
3328
+ "title": "List"
3329
+ },
3330
+ {
3331
+ "description": "Create new release. The API cannot be used to create releases on Bamboo apps.",
3332
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases",
3333
+ "method": "POST",
3334
+ "rel": "create",
3335
+ "schema": {
3336
+ "properties": {
3337
+ "description": {
3338
+ "$ref": "#/definitions/release/definitions/description"
3339
+ },
3340
+ "slug": {
3341
+ "$ref": "#/definitions/slug/definitions/identity"
3342
+ }
3343
+ },
3344
+ "required": [
3345
+ "slug"
3346
+ ]
3347
+ },
3348
+ "title": "Create"
3349
+ },
3350
+ {
3351
+ "description": "Rollback to an existing release.",
3352
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/releases",
3353
+ "method": "POST",
3354
+ "rel": "create",
3355
+ "schema": {
3356
+ "properties": {
3357
+ "release": {
3358
+ "$ref": "#/definitions/release/definitions/id"
3359
+ }
3360
+ },
3361
+ "required": [
3362
+ "release"
3363
+ ]
3364
+ },
3365
+ "title": "Rollback"
3366
+ }
3367
+ ],
3368
+ "properties": {
3369
+ "created_at": {
3370
+ "$ref": "#/definitions/release/definitions/created_at"
3371
+ },
3372
+ "description": {
3373
+ "$ref": "#/definitions/release/definitions/description"
3374
+ },
3375
+ "id": {
3376
+ "$ref": "#/definitions/release/definitions/id"
3377
+ },
3378
+ "updated_at": {
3379
+ "$ref": "#/definitions/release/definitions/updated_at"
3380
+ },
3381
+ "slug": {
3382
+ "description": "slug running in this release",
3383
+ "properties": {
3384
+ "id": {
3385
+ "$ref": "#/definitions/slug/definitions/id"
3386
+ }
3387
+ },
3388
+ "type": [
3389
+ "object",
3390
+ "null"
3391
+ ]
3392
+ },
3393
+ "user": {
3394
+ "description": "user that created the release",
3395
+ "properties": {
3396
+ "id": {
3397
+ "$ref": "#/definitions/account/definitions/id"
3398
+ },
3399
+ "email": {
3400
+ "$ref": "#/definitions/account/definitions/email"
3401
+ }
3402
+ },
3403
+ "type": [
3404
+ "object"
3405
+ ]
3406
+ },
3407
+ "version": {
3408
+ "$ref": "#/definitions/release/definitions/version"
3409
+ }
3410
+ }
3411
+ },
3412
+ "slug": {
3413
+ "description": "A slug is a snapshot of your application code that is ready to run on the platform.",
3414
+ "id": "schema/slug",
3415
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
3416
+ "stability": "development",
3417
+ "title": "Heroku Platform API - Slug",
3418
+ "type": [
3419
+ "object"
3420
+ ],
3421
+ "definitions": {
3422
+ "buildpack_provided_description": {
3423
+ "description": "description from buildpack of slug",
3424
+ "example": "Ruby/Rack",
3425
+ "readOnly": false,
3426
+ "type": [
3427
+ "null",
3428
+ "string"
3429
+ ]
3430
+ },
3431
+ "commit": {
3432
+ "description": "identification of the code with your version control system (eg: SHA of the git HEAD)",
3433
+ "example": "60883d9e8947a57e04dc9124f25df004866a2051",
3434
+ "readOnly": false,
3435
+ "type": [
3436
+ "null",
3437
+ "string"
3438
+ ]
3439
+ },
3440
+ "created_at": {
3441
+ "description": "when slug was created",
3442
+ "example": "2012-01-01T12:00:00Z",
3443
+ "format": "date-time",
3444
+ "readOnly": true,
3445
+ "type": [
3446
+ "string"
3447
+ ]
3448
+ },
3449
+ "id": {
3450
+ "description": "unique identifier of slug",
3451
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
3452
+ "format": "uuid",
3453
+ "readOnly": true,
3454
+ "type": [
3455
+ "string"
3456
+ ]
3457
+ },
3458
+ "identity": {
3459
+ "anyOf": [
3460
+ {
3461
+ "$ref": "#/definitions/slug/definitions/id"
3462
+ }
3463
+ ]
3464
+ },
3465
+ "method": {
3466
+ "description": "method to be used to interact with the slug blob",
3467
+ "example": "GET",
3468
+ "readOnly": true,
3469
+ "type": [
3470
+ "string"
3471
+ ]
3472
+ },
3473
+ "process_types": {
3474
+ "additionalProperties": false,
3475
+ "description": "hash mapping process type names to their respective command",
3476
+ "example": {
3477
+ "web": "./bin/web -p $PORT"
3478
+ },
3479
+ "patternProperties": {
3480
+ "^\\w+$": {
3481
+ "type": [
3482
+ "string"
3483
+ ]
3484
+ }
3485
+ },
3486
+ "type": [
3487
+ "object"
3488
+ ]
3489
+ },
3490
+ "updated_at": {
3491
+ "description": "when slug was updated",
3492
+ "example": "2012-01-01T12:00:00Z",
3493
+ "format": "date-time",
3494
+ "readOnly": true,
3495
+ "type": [
3496
+ "string"
3497
+ ]
3498
+ },
3499
+ "url": {
3500
+ "description": "URL to interact with the slug blob",
3501
+ "example": "https://api.heroku.com/slugs/1234.tgz",
3502
+ "readOnly": true,
3503
+ "type": [
3504
+ "string"
3505
+ ]
3506
+ }
3507
+ },
3508
+ "links": [
3509
+ {
3510
+ "description": "Info for existing slug.",
3511
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/slugs/{(%23%2Fdefinitions%2Fslug%2Fdefinitions%2Fidentity)}",
3512
+ "method": "GET",
3513
+ "rel": "self",
3514
+ "title": "Info"
3515
+ },
3516
+ {
3517
+ "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?preview=1).",
3518
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/slugs",
3519
+ "method": "POST",
3520
+ "rel": "create",
3521
+ "schema": {
3522
+ "properties": {
3523
+ "buildpack_provided_description": {
3524
+ "$ref": "#/definitions/slug/definitions/buildpack_provided_description"
3525
+ },
3526
+ "commit": {
3527
+ "$ref": "#/definitions/slug/definitions/commit"
3528
+ },
3529
+ "process_types": {
3530
+ "$ref": "#/definitions/slug/definitions/process_types"
3531
+ }
3532
+ },
3533
+ "required": [
3534
+ "process_types"
3535
+ ]
3536
+ },
3537
+ "title": "Create"
3538
+ }
3539
+ ],
3540
+ "properties": {
3541
+ "blob": {
3542
+ "description": "pointer to the url where clients can fetch or store the actual release binary",
3543
+ "properties": {
3544
+ "method": {
3545
+ "$ref": "#/definitions/slug/definitions/method"
3546
+ },
3547
+ "url": {
3548
+ "$ref": "#/definitions/slug/definitions/url"
3549
+ }
3550
+ },
3551
+ "type": [
3552
+ "object"
3553
+ ]
3554
+ },
3555
+ "buildpack_provided_description": {
3556
+ "$ref": "#/definitions/slug/definitions/buildpack_provided_description"
3557
+ },
3558
+ "commit": {
3559
+ "$ref": "#/definitions/slug/definitions/commit"
3560
+ },
3561
+ "created_at": {
3562
+ "$ref": "#/definitions/slug/definitions/created_at"
3563
+ },
3564
+ "id": {
3565
+ "$ref": "#/definitions/slug/definitions/id"
3566
+ },
3567
+ "process_types": {
3568
+ "$ref": "#/definitions/slug/definitions/process_types"
3569
+ },
3570
+ "updated_at": {
3571
+ "$ref": "#/definitions/slug/definitions/updated_at"
3572
+ }
3573
+ }
3574
+ },
3575
+ "ssl-endpoint": {
3576
+ "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` addon installed before it can provision an SSL Endpoint using these APIs.",
3577
+ "id": "schema/ssl-endpoint",
3578
+ "title": "Heroku Platform API - SSL Endpoint",
3579
+ "stability": "development",
3580
+ "type": [
3581
+ "object"
3582
+ ],
3583
+ "definitions": {
3584
+ "certificate_chain": {
3585
+ "description": "raw contents of the public certificate chain (eg: .crt or .pem file)",
3586
+ "example": "-----BEGIN CERTIFICATE----- ...",
3587
+ "type": [
3588
+ "string"
3589
+ ]
3590
+ },
3591
+ "cname": {
3592
+ "description": "canonical name record, the address to point a domain at",
3593
+ "example": "example.herokussl.com",
3594
+ "type": [
3595
+ "string"
3596
+ ]
3597
+ },
3598
+ "created_at": {
3599
+ "description": "when endpoint was created",
3600
+ "example": "2012-01-01T12:00:00Z",
3601
+ "format": "date-time",
3602
+ "readOnly": true,
3603
+ "type": [
3604
+ "string"
3605
+ ]
3606
+ },
3607
+ "id": {
3608
+ "description": "unique identifier of this SSL endpoint",
3609
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
3610
+ "format": "uuid",
3611
+ "readOnly": true,
3612
+ "type": [
3613
+ "string"
3614
+ ]
3615
+ },
3616
+ "identity": {
3617
+ "anyOf": [
3618
+ {
3619
+ "$ref": "#/definitions/ssl-endpoint/definitions/id"
3620
+ },
3621
+ {
3622
+ "$ref": "#/definitions/ssl-endpoint/definitions/name"
3623
+ }
3624
+ ]
3625
+ },
3626
+ "name": {
3627
+ "description": "unique name for SSL endpoint",
3628
+ "example": "example",
3629
+ "pattern": "^[a-z][a-z0-9-]{3,30}$",
3630
+ "readOnly": true,
3631
+ "type": [
3632
+ "string"
3633
+ ]
3634
+ },
3635
+ "private_key": {
3636
+ "description": "contents of the private key (eg .key file)",
3637
+ "example": "-----BEGIN RSA PRIVATE KEY----- ...",
3638
+ "type": [
3639
+ "string"
3640
+ ]
3641
+ },
3642
+ "rollback": {
3643
+ "default": false,
3644
+ "description": "indicates that a rollback should be performed",
3645
+ "example": false,
3646
+ "type": [
3647
+ "boolean"
3648
+ ]
3649
+ },
3650
+ "updated_at": {
3651
+ "description": "when endpoint was updated",
3652
+ "example": "2012-01-01T12:00:00Z",
3653
+ "format": "date-time",
3654
+ "readOnly": true,
3655
+ "type": [
3656
+ "string"
3657
+ ]
3658
+ }
3659
+ },
3660
+ "links": [
3661
+ {
3662
+ "description": "Create a new SSL endpoint.",
3663
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints",
3664
+ "method": "POST",
3665
+ "rel": "create",
3666
+ "schema": {
3667
+ "properties": {
3668
+ "certificate_chain": {
3669
+ "$ref": "#/definitions/ssl-endpoint/definitions/certificate_chain"
3670
+ },
3671
+ "private_key": {
3672
+ "$ref": "#/definitions/ssl-endpoint/definitions/private_key"
3673
+ }
3674
+ },
3675
+ "required": [
3676
+ "certificate_chain",
3677
+ "private_key"
3678
+ ]
3679
+ },
3680
+ "title": "Create"
3681
+ },
3682
+ {
3683
+ "description": "Delete existing SSL endpoint.",
3684
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints/{(%23%2Fdefinitions%2Fssl-endpoint%2Fdefinitions%2Fidentity)}",
3685
+ "method": "DELETE",
3686
+ "rel": "destroy",
3687
+ "title": "Delete"
3688
+ },
3689
+ {
3690
+ "description": "Info for existing SSL endpoint.",
3691
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints/{(%23%2Fdefinitions%2Fssl-endpoint%2Fdefinitions%2Fidentity)}",
3692
+ "method": "GET",
3693
+ "rel": "self",
3694
+ "title": "Info"
3695
+ },
3696
+ {
3697
+ "description": "List existing SSL endpoints.",
3698
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints",
3699
+ "method": "GET",
3700
+ "rel": "instances",
3701
+ "title": "List"
3702
+ },
3703
+ {
3704
+ "description": "Update an existing SSL endpoint.",
3705
+ "href": "/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fidentity)}/ssl-endpoints/{(%23%2Fdefinitions%2Fssl-endpoint%2Fdefinitions%2Fidentity)}",
3706
+ "method": "PATCH",
3707
+ "rel": "update",
3708
+ "schema": {
3709
+ "properties": {
3710
+ "certificate_chain": {
3711
+ "$ref": "#/definitions/ssl-endpoint/definitions/certificate_chain"
3712
+ },
3713
+ "private_key": {
3714
+ "$ref": "#/definitions/ssl-endpoint/definitions/private_key"
3715
+ },
3716
+ "rollback": {
3717
+ "$ref": "#/definitions/ssl-endpoint/definitions/rollback"
3718
+ }
3719
+ }
3720
+ },
3721
+ "title": "Update"
3722
+ }
3723
+ ],
3724
+ "properties": {
3725
+ "certificate_chain": {
3726
+ "$ref": "#/definitions/ssl-endpoint/definitions/certificate_chain"
3727
+ },
3728
+ "cname": {
3729
+ "$ref": "#/definitions/ssl-endpoint/definitions/cname"
3730
+ },
3731
+ "created_at": {
3732
+ "$ref": "#/definitions/ssl-endpoint/definitions/created_at"
3733
+ },
3734
+ "id": {
3735
+ "$ref": "#/definitions/ssl-endpoint/definitions/id"
3736
+ },
3737
+ "name": {
3738
+ "$ref": "#/definitions/ssl-endpoint/definitions/name"
3739
+ },
3740
+ "updated_at": {
3741
+ "$ref": "#/definitions/ssl-endpoint/definitions/updated_at"
3742
+ }
3743
+ }
3744
+ },
3745
+ "stack": {
3746
+ "description": "Stacks are the different application execution environments available in the Heroku platform.",
3747
+ "id": "schema/stack",
3748
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
3749
+ "stability": "development",
3750
+ "title": "Heroku Platform API - Stack",
3751
+ "type": [
3752
+ "object"
3753
+ ],
3754
+ "definitions": {
3755
+ "created_at": {
3756
+ "description": "when stack was introduced",
3757
+ "example": "2012-01-01T12:00:00Z",
3758
+ "format": "date-time",
3759
+ "readOnly": true,
3760
+ "type": [
3761
+ "string"
3762
+ ]
3763
+ },
3764
+ "id": {
3765
+ "description": "unique identifier of stack",
3766
+ "example": "01234567-89ab-cdef-0123-456789abcdef",
3767
+ "format": "uuid",
3768
+ "readOnly": true,
3769
+ "type": [
3770
+ "string"
3771
+ ]
3772
+ },
3773
+ "identity": {
3774
+ "anyOf": [
3775
+ {
3776
+ "$ref": "#/definitions/stack/definitions/name"
3777
+ },
3778
+ {
3779
+ "$ref": "#/definitions/stack/definitions/id"
3780
+ }
3781
+ ]
3782
+ },
3783
+ "name": {
3784
+ "description": "unique name of stack",
3785
+ "example": "cedar",
3786
+ "type": [
3787
+ "string"
3788
+ ]
3789
+ },
3790
+ "state": {
3791
+ "description": "availability of this stack: beta, deprecated or public",
3792
+ "example": "public",
3793
+ "type": [
3794
+ "string"
3795
+ ]
3796
+ },
3797
+ "updated_at": {
3798
+ "description": "when stack was last modified",
3799
+ "example": "2012-01-01T12:00:00Z",
3800
+ "format": "date-time",
3801
+ "readOnly": true,
3802
+ "type": [
3803
+ "string"
3804
+ ]
3805
+ }
3806
+ },
3807
+ "links": [
3808
+ {
3809
+ "description": "Stack info.",
3810
+ "href": "/stacks/{(%23%2Fdefinitions%2Fstack%2Fdefinitions%2Fidentity)}",
3811
+ "method": "GET",
3812
+ "rel": "self",
3813
+ "title": "Info"
3814
+ },
3815
+ {
3816
+ "description": "List available stacks.",
3817
+ "href": "/stacks",
3818
+ "method": "GET",
3819
+ "rel": "instances",
3820
+ "title": "List"
3821
+ }
3822
+ ],
3823
+ "properties": {
3824
+ "created_at": {
3825
+ "$ref": "#/definitions/stack/definitions/created_at"
3826
+ },
3827
+ "id": {
3828
+ "$ref": "#/definitions/stack/definitions/id"
3829
+ },
3830
+ "name": {
3831
+ "$ref": "#/definitions/stack/definitions/name"
3832
+ },
3833
+ "state": {
3834
+ "$ref": "#/definitions/stack/definitions/state"
3835
+ },
3836
+ "updated_at": {
3837
+ "$ref": "#/definitions/stack/definitions/updated_at"
3838
+ }
3839
+ }
3840
+ }
3841
+ },
3842
+ "properties": {
3843
+ "account-feature": {
3844
+ "$ref": "#/definitions/account-feature"
3845
+ },
3846
+ "account": {
3847
+ "$ref": "#/definitions/account"
3848
+ },
3849
+ "addon-service": {
3850
+ "$ref": "#/definitions/addon-service"
3851
+ },
3852
+ "addon": {
3853
+ "$ref": "#/definitions/addon"
3854
+ },
3855
+ "app-feature": {
3856
+ "$ref": "#/definitions/app-feature"
3857
+ },
3858
+ "app-transfer": {
3859
+ "$ref": "#/definitions/app-transfer"
3860
+ },
3861
+ "app": {
3862
+ "$ref": "#/definitions/app"
3863
+ },
3864
+ "collaborator": {
3865
+ "$ref": "#/definitions/collaborator"
3866
+ },
3867
+ "config-var": {
3868
+ "$ref": "#/definitions/config-var"
3869
+ },
3870
+ "domain": {
3871
+ "$ref": "#/definitions/domain"
3872
+ },
3873
+ "dyno": {
3874
+ "$ref": "#/definitions/dyno"
3875
+ },
3876
+ "formation": {
3877
+ "$ref": "#/definitions/formation"
3878
+ },
3879
+ "key": {
3880
+ "$ref": "#/definitions/key"
3881
+ },
3882
+ "log-drain": {
3883
+ "$ref": "#/definitions/log-drain"
3884
+ },
3885
+ "log-session": {
3886
+ "$ref": "#/definitions/log-session"
3887
+ },
3888
+ "oauth-authorization": {
3889
+ "$ref": "#/definitions/oauth-authorization"
3890
+ },
3891
+ "oauth-client": {
3892
+ "$ref": "#/definitions/oauth-client"
3893
+ },
3894
+ "oauth-grant": {
3895
+ "$ref": "#/definitions/oauth-grant"
3896
+ },
3897
+ "oauth-token": {
3898
+ "$ref": "#/definitions/oauth-token"
3899
+ },
3900
+ "plan": {
3901
+ "$ref": "#/definitions/plan"
3902
+ },
3903
+ "rate-limit": {
3904
+ "$ref": "#/definitions/rate-limit"
3905
+ },
3906
+ "region": {
3907
+ "$ref": "#/definitions/region"
3908
+ },
3909
+ "release": {
3910
+ "$ref": "#/definitions/release"
3911
+ },
3912
+ "slug": {
3913
+ "$ref": "#/definitions/slug"
3914
+ },
3915
+ "ssl-endpoint": {
3916
+ "$ref": "#/definitions/ssl-endpoint"
3917
+ },
3918
+ "stack": {
3919
+ "$ref": "#/definitions/stack"
3920
+ }
3921
+ },
3922
+ "$schema": "http://json-schema.org/draft-04/hyper-schema",
3923
+ "title": "Heroku Platform API",
3924
+ "type": [
3925
+ "object"
3926
+ ]
3927
+ }