heroku-client
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -1,4 +0,4 @@ | ||
# Account | ||
# account | ||
An account represents you on Heroku. | ||
An account represents an individual signed up to use the Heroku platform. | ||
@@ -13,6 +13,4 @@ ## Actions | ||
--- | --- | --- | ||
GET | /account | 200 | ||
GET | account | ### `update` | ||
### `update` | ||
`heroku.account().update({attributes}, {callback});` | ||
@@ -22,75 +20,14 @@ | ||
--- | --- | --- | ||
PATCH | /account | 200 | ||
PATCH | account | ### `changeEmail` | ||
#### Optional Attributes | ||
`heroku.account().changeEmail({attributes}, {callback});` | ||
- allow_tracking | ||
## Attributes | ||
### `allow_tracking` | ||
*whether to allow web activity tracking with third-party services like Google Analytics* | ||
Example | Serialized? | Type | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
`true` | true | boolean | ||
PATCH | account | ### `changePassword` | ||
### `beta` | ||
`heroku.account().changePassword({attributes}, {callback});` | ||
*whether to utilize beta Heroku features* | ||
Example | Serialized? | Type | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
`false` | true | boolean | ||
### `created_at` | ||
*when account was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `email` | ||
*email address of account* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`username@example.com` | true | string | ||
### `id` | ||
*unique identifier of account* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `last_login` | ||
*when account last authorized with Heroku* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `updated_at` | ||
*when account was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `verified` | ||
*whether the account has been verified with billing information* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`false` | true | boolean | ||
PATCH | account | |
@@ -1,2 +0,2 @@ | ||
# Account Feature | ||
# account-feature | ||
@@ -7,88 +7,20 @@ An account feature represents a Heroku labs capability that can be enabled or disabled for an account on Heroku. | ||
### `list` | ||
### `info` | ||
`heroku.account().features().list({callback});` | ||
`heroku.account().features({account-feature_id_or_name}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /account/features | 200, 206 | ||
GET | account/features/{account-feature_id_or_name} | ### `list` | ||
### `info` | ||
`heroku.account().features().list({callback});` | ||
`heroku.account().features({feature_id_or_name}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /account/features/{feature_id_or_name} | 200 | ||
GET | account/features | ### `update` | ||
### `update` | ||
`heroku.account().features({account-feature_id_or_name}).update({attributes}, {callback});` | ||
`heroku.account().features({feature_id_or_name}).update({attributes}, {callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
PATCH | /account/features/{feature_id_or_name} | 200 | ||
#### Required Attributes | ||
- enabled | ||
## Attributes | ||
### `created_at` | ||
*when account feature was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00-00:00` | true | datetime | ||
### `description` | ||
*description of account feature* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`Causes account to example.` | true | string | ||
### `doc_url` | ||
*documentation URL of account feature* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`http://devcenter.heroku.com/articles/example` | true | string | ||
### `enabled` | ||
*whether or not account feature has been enabled* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`true` | true | boolean | ||
### `id` | ||
*unique identifier of account feature* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `name` | ||
*unique name of account feature* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`example` | true | string | ||
### `updated_at` | ||
*when account feature was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00-00:00` | true | datetime | ||
PATCH | account/features/{account-feature_id_or_name} | |
@@ -19,19 +19,1 @@ # Account Password | ||
## Attributes | ||
### `current_password` | ||
*existing password value* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`0123456789abcdef` | false | string | ||
### `password` | ||
*new password value* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`abcdef0123456789` | false | string | ||
@@ -1,2 +0,2 @@ | ||
# Add-on | ||
# addon | ||
@@ -13,21 +13,10 @@ Add-ons represent add-ons that have been provisioned for an app. | ||
--- | --- | --- | ||
POST | /apps/{app_id_or_name}/addons | 201 | ||
POST | apps/{app_id_or_name}/addons | ### `delete` | ||
#### Optional Attributes | ||
`heroku.apps({app_id_or_name}).addons({addon_id}).delete({callback});` | ||
- config | ||
- plan:id | ||
- plan:name | ||
### `list` | ||
`heroku.apps({app_id_or_name}).addons().list({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/addons | 200, 206 | ||
DELETE | apps/{app_id_or_name}/addons/{addon_id} | ### `info` | ||
### `info` | ||
`heroku.apps({app_id_or_name}).addons({addon_id}).info({callback});` | ||
@@ -37,76 +26,14 @@ | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/addons/{addon_id} | 200 | ||
GET | apps/{app_id_or_name}/addons/{addon_id} | ### `list` | ||
### `update` | ||
`heroku.apps({app_id_or_name}).addons().list({callback});` | ||
`heroku.apps({app_id_or_name}).addons({addon_id}).update({attributes}, {callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
PATCH | /apps/{app_id_or_name}/addons/{addon_id} | 200 | ||
GET | apps/{app_id_or_name}/addons | ### `update` | ||
#### Optional Attributes | ||
`heroku.apps({app_id_or_name}).addons({addon_id}).update({attributes}, {callback});` | ||
- config | ||
- plan:id | ||
- plan:name | ||
### `delete` | ||
`heroku.apps({app_id_or_name}).addons({addon_id}).delete({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
DELETE | /apps/{app_id_or_name}/addons/{addon_id} | 200 | ||
## Attributes | ||
### `config` | ||
*additional add-on service specific configuration* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`[object Object]` | false | object | ||
### `created_at` | ||
*when add-on was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `id` | ||
*unique identifier of this add-on* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `plan:id` | ||
*unique identifier for plan* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `plan:name` | ||
*unique name for plan* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`heroku-postgresql:dev` | true | string | ||
### `updated_at` | ||
*when add-on was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
PATCH | apps/{app_id_or_name}/addons/{addon_id} | |
@@ -1,2 +0,2 @@ | ||
# Add-on Service | ||
# addon-service | ||
@@ -7,51 +7,14 @@ Add-on services represent add-ons that may be provisioned for apps. | ||
### `list` | ||
### `info` | ||
`heroku.addonServices().list({callback});` | ||
`heroku.addonServices({addon-service_id_or_name}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /addon-services | 200, 206 | ||
GET | addon-services/{addon-service_id_or_name} | ### `list` | ||
### `info` | ||
`heroku.addonServices().list({callback});` | ||
`heroku.addonServices({addon_service_id_or_name}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /addon-services/{addon_service_id_or_name} | 200 | ||
## Attributes | ||
### `created_at` | ||
*when add-on service was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `id` | ||
*unique identifier of service* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `name` | ||
*unique name for add-on service* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`heroku-postgresql` | true | string | ||
### `updated_at` | ||
*when add-on service was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
GET | addon-services | |
179
docs/app.md
@@ -1,2 +0,2 @@ | ||
# App | ||
# app | ||
@@ -13,22 +13,10 @@ An app represents the program that you would like to deploy and run on Heroku. | ||
--- | --- | --- | ||
POST | /apps | 201 | ||
POST | apps | ### `delete` | ||
#### Optional Attributes | ||
`heroku.apps({app_id_or_name}).delete({callback});` | ||
- name | ||
- region:id | ||
- region:name | ||
- stack | ||
### `list` | ||
`heroku.apps().list({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps | 200, 206 | ||
DELETE | apps/{app_id_or_name} | ### `info` | ||
### `info` | ||
`heroku.apps({app_id_or_name}).info({callback});` | ||
@@ -38,163 +26,14 @@ | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name} | 200 | ||
GET | apps/{app_id_or_name} | ### `list` | ||
### `update` | ||
`heroku.apps().list({callback});` | ||
`heroku.apps({app_id_or_name}).update({attributes}, {callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
PATCH | /apps/{app_id_or_name} | 200 | ||
GET | apps | ### `update` | ||
#### Optional Attributes | ||
`heroku.apps({app_id_or_name}).update({attributes}, {callback});` | ||
- maintenance | ||
- name | ||
### `delete` | ||
`heroku.apps({app_id_or_name}).delete({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
DELETE | /apps/{app_id_or_name} | 200 | ||
## Attributes | ||
### `archived_at` | ||
*when app was archived* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `buildpack_provided_description` | ||
*description from buildpack of app* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`Ruby/Rack` | true | string | ||
### `created_at` | ||
*when app was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `git_url` | ||
*git repo URL of app* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`git@heroku.com/example.git` | true | string | ||
### `id` | ||
*unique identifier of app* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `maintenance` | ||
*maintenance status of app* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`false` | true | boolean | ||
### `name` | ||
*unique name of app* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`example` | true | string | ||
### `owner:email` | ||
*email address of app owner* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`username@example.com` | true | string | ||
### `owner:id` | ||
*unique identifier of app owner* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `region:id` | ||
*unique identifier of app region* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `region:name` | ||
*name of app region* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`us` | true | string | ||
### `released_at` | ||
*when app was last released* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `repo_size` | ||
*app git repo size in bytes* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`1024` | true | number | ||
### `slug_size` | ||
*app slug size in bytes* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`512` | true | number | ||
### `stack` | ||
*stack of app* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`cedar` | true | string | ||
### `updated_at` | ||
*when app was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `web_url` | ||
*web URL of app* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`http://example.herokuapp.com` | true | string | ||
PATCH | apps/{app_id_or_name} | |
@@ -1,2 +0,2 @@ | ||
# App Feature | ||
# app-feature | ||
@@ -7,88 +7,20 @@ An app feature represents a Heroku labs capability that can be enabled or disabled for an app on Heroku. | ||
### `list` | ||
### `info` | ||
`heroku.apps({app_id_or_name}).features().list({callback});` | ||
`heroku.apps({app_id_or_name}).features({app_id_or_name}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/features | 200, 206 | ||
GET | apps/{app_id_or_name}/features/{app_id_or_name} | ### `list` | ||
### `info` | ||
`heroku.apps({app_id_or_name}).features().list({callback});` | ||
`heroku.apps({app_id_or_name}).features({feature_id_or_name}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/features/{feature_id_or_name} | 200 | ||
GET | apps/{app_id_or_name}/features | ### `update` | ||
### `update` | ||
`heroku.apps({app_id_or_name}).features({app_id_or_name}).update({attributes}, {callback});` | ||
`heroku.apps({app_id_or_name}).features({feature_id_or_name}).update({attributes}, {callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
PATCH | /apps/{app_id_or_name}/features/{feature_id_or_name} | 200 | ||
#### Required Attributes | ||
- enabled | ||
## Attributes | ||
### `created_at` | ||
*when app feature was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00-00:00` | true | datetime | ||
### `description` | ||
*description of app feature* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`Causes app to example.` | true | string | ||
### `doc_url` | ||
*documentation URL of app feature* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`http://devcenter.heroku.com/articles/example` | true | string | ||
### `enabled` | ||
*whether or not app feature has been enabled* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`true` | true | boolean | ||
### `id` | ||
*unique identifier of app feature* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `name` | ||
*unique name of app feature* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`example` | true | string | ||
### `updated_at` | ||
*when app feature was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00-00:00` | true | datetime | ||
PATCH | apps/{app_id_or_name}/features/{app_id_or_name} | |
@@ -1,4 +0,4 @@ | ||
# App Transfer | ||
# app-transfer | ||
[Transfers](https://devcenter.heroku.com/articles/transferring-apps) allow a user to transfer ownership of their app to another user. Apps being transferred may be free or have paid resources, but if they are paid, the receiving user must have a [verified account](https://devcenter.heroku.com/articles/account-verification). | ||
An app transfer represents a two party interaction for transferring ownership of an app. | ||
@@ -13,130 +13,26 @@ ## Actions | ||
--- | --- | --- | ||
POST | /account/app-transfers | 201 | ||
POST | account/app-transfers | ### `delete` | ||
#### Optional Attributes | ||
`heroku.account().appTransfers({app-transfer_id}).delete({callback});` | ||
- app:id | ||
- app:name | ||
- recipient:email | ||
- recipient:id | ||
### `list` | ||
`heroku.account().appTransfers().list({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /account/app-transfers | 200, 206 | ||
DELETE | account/app-transfers/{app-transfer_id} | ### `info` | ||
### `info` | ||
`heroku.account().appTransfers({app-transfer_id}).info({callback});` | ||
`heroku.account().appTransfers({transfer_id}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /account/app-transfers/{transfer_id} | 200 | ||
GET | account/app-transfers/{app-transfer_id} | ### `list` | ||
### `update` | ||
`heroku.account().appTransfers().list({callback});` | ||
`heroku.account().appTransfers({transfer_id}).update({attributes}, {callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
PATCH | /account/app-transfers/{transfer_id} | 200 | ||
GET | account/app-transfers | ### `update` | ||
`heroku.account().appTransfers({app-transfer_id}).update({attributes}, {callback});` | ||
#### Required Attributes | ||
- state | ||
### `delete` | ||
`heroku.account().appTransfers({transfer_id}).delete({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
DELETE | /account/app-transfers/{transfer_id} | 200 | ||
## Attributes | ||
### `created_at` | ||
*when the transfer was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `app:id` | ||
*unique identifier of the app being transferred* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | string | ||
### `app:name` | ||
*name of the app being transferred* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`example` | true | string | ||
### `id` | ||
*unique identifier of this transfer* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `owner:id` | ||
*unique identifier of the sending user* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | string | ||
### `owner:email` | ||
*email of the sending user* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`username@example.com` | true | string | ||
### `recipient:id` | ||
*unique identifier of the receiving user* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | string | ||
### `recipient:email` | ||
*email of the receiving user* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`username@example.com` | true | string | ||
### `state` | ||
*new state of the transfer; accepted/declined/pending* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`pending` | true | string | ||
### `updated_at` | ||
*when the transfer was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
PATCH | account/app-transfers/{app-transfer_id} | |
@@ -1,4 +0,4 @@ | ||
# Collaborator | ||
# collaborator | ||
Collaborators are other users who have been given access to an app on Heroku. | ||
A collaborator represents an account that has been given access to an app on Heroku. | ||
@@ -13,84 +13,20 @@ ## Actions | ||
--- | --- | --- | ||
POST | /apps/{app_id_or_name}/collaborators | 201 | ||
POST | apps/{app_id_or_name}/collaborators | ### `delete` | ||
#### Optional Attributes | ||
`heroku.apps({app_id_or_name}).collaborators({collaborator_email_or_id}).delete({callback});` | ||
- silent | ||
- user:email | ||
- user:id | ||
### `list` | ||
`heroku.apps({app_id_or_name}).collaborators().list({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/collaborators | 200, 206 | ||
DELETE | apps/{app_id_or_name}/collaborators/{collaborator_email_or_id} | ### `info` | ||
### `info` | ||
`heroku.apps({app_id_or_name}).collaborators({collaborator_email_or_id}).info({callback});` | ||
`heroku.apps({app_id_or_name}).collaborators({collaborator_id_or_email}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/collaborators/{collaborator_id_or_email} | 200 | ||
GET | apps/{app_id_or_name}/collaborators/{collaborator_email_or_id} | ### `list` | ||
### `delete` | ||
`heroku.apps({app_id_or_name}).collaborators().list({callback});` | ||
`heroku.apps({app_id_or_name}).collaborators({collaborator_id_or_email}).delete({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
DELETE | /apps/{app_id_or_name}/collaborators/{collaborator_id_or_email} | 200 | ||
## Attributes | ||
### `created_at` | ||
*when collaborator was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `id` | ||
*unique identifier of this collaborator* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `silent` | ||
*when true, suppresses the invitation to collaborate e-mail* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`false` | false | boolean | ||
### `updated_at` | ||
*when collaborator was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `user:email` | ||
*collaborator email address* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`collaborator@example.com` | true | string | ||
### `user:id` | ||
*unique identifier of the user* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
GET | apps/{app_id_or_name}/collaborators | |
@@ -1,2 +0,2 @@ | ||
# Config Var | ||
# config-var | ||
@@ -13,6 +13,4 @@ Config Vars allow you to manage the configuration information provided to an app on Heroku. | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/config-vars | 200 | ||
GET | apps/{app_id_or_name}/config-vars | ### `update` | ||
### `update` | ||
`heroku.apps({app_id_or_name}).configVars().update({attributes}, {callback});` | ||
@@ -22,15 +20,2 @@ | ||
--- | --- | --- | ||
PATCH | /apps/{app_id_or_name}/config-vars | 200 | ||
## Attributes | ||
### `{key}` | ||
*key/value pair for dyno env* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`{value}` | true | string | ||
PATCH | apps/{app_id_or_name}/config-vars | |
@@ -1,2 +0,2 @@ | ||
# Domain | ||
# domain | ||
@@ -13,66 +13,20 @@ Domains define what web routes should be routed to an app on Heroku. | ||
--- | --- | --- | ||
POST | /apps/{app_id_or_name}/domains | 201 | ||
POST | apps/{app_id_or_name}/domains | ### `delete` | ||
`heroku.apps({app_id_or_name}).domains({domain_hostname_or_id}).delete({callback});` | ||
#### Required Attributes | ||
- hostname | ||
### `list` | ||
`heroku.apps({app_id_or_name}).domains().list({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/domains | 200, 206 | ||
DELETE | apps/{app_id_or_name}/domains/{domain_hostname_or_id} | ### `info` | ||
### `info` | ||
`heroku.apps({app_id_or_name}).domains({domain_hostname_or_id}).info({callback});` | ||
`heroku.apps({app_id_or_name}).domains({domain_id_or_hostname}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/domains/{domain_id_or_hostname} | 200 | ||
GET | apps/{app_id_or_name}/domains/{domain_hostname_or_id} | ### `list` | ||
### `delete` | ||
`heroku.apps({app_id_or_name}).domains().list({callback});` | ||
`heroku.apps({app_id_or_name}).domains({domain_id_or_hostname}).delete({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
DELETE | /apps/{app_id_or_name}/domains/{domain_id_or_hostname} | 200 | ||
## Attributes | ||
### `created_at` | ||
*when domain was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `hostname` | ||
*full hostname* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`subdomain.example.com` | true | string | ||
### `id` | ||
*unique identifier of this domain* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `updated_at` | ||
*when domain was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
GET | apps/{app_id_or_name}/domains | |
130
docs/dyno.md
@@ -1,2 +0,2 @@ | ||
# Dyno | ||
# dyno | ||
@@ -13,23 +13,16 @@ Dynos encapsulate running processes of an app on Heroku. | ||
--- | --- | --- | ||
POST | /apps/{app_id_or_name}/dynos | 201 | ||
POST | apps/{app_id_or_name}/dynos | ### `restartDyno` | ||
#### Optional Attributes | ||
`heroku.apps({app_id_or_name}).dynos({dyno_id_or_name}).restartDyno({callback});` | ||
- attach | ||
- size | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
DELETE | apps/{app_id_or_name}/dynos/{dyno_id_or_name} | ### `restartAllDynos` | ||
#### Required Attributes | ||
`heroku.apps({app_id_or_name}).dynos().restartAllDynos({callback});` | ||
- command | ||
### `list` | ||
`heroku.apps({app_id_or_name}).dynos().list({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/dynos | 200, 206 | ||
DELETE | apps/{app_id_or_name}/dynos | ### `info` | ||
### `info` | ||
`heroku.apps({app_id_or_name}).dynos({dyno_id_or_name}).info({callback});` | ||
@@ -39,109 +32,8 @@ | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/dynos/{dyno_id_or_name} | 200 | ||
GET | apps/{app_id_or_name}/dynos/{dyno_id_or_name} | ### `list` | ||
### `delete` | ||
`heroku.apps({app_id_or_name}).dynos().list({callback});` | ||
`heroku.apps({app_id_or_name}).dynos({dyno_id_or_name}).delete({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
DELETE | /apps/{app_id_or_name}/dynos/{dyno_id_or_name} | 200 | ||
## Attributes | ||
### `attach` | ||
*whether to stream output or not* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`true` | false | boolean | ||
### `attach_url` | ||
*a URL to stream output from for attached processes or null for non-attached processes* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`rendezvous://rendezvous.runtime.heroku.com:5000/{rendezvous-id}` | true | string | ||
### `command` | ||
*command used to start this process* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`bash` | true | string | ||
### `created_at` | ||
*when domain was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `id` | ||
*unique identifier of this dyno* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `name` | ||
*the name of this process on this app* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`run.1` | true | string | ||
### `release:id` | ||
*the unique identifier of the release this process was started with* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `release:version` | ||
*the unique version of the release this process was started with* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`456` | true | number | ||
### `size` | ||
*dyno size (default: 1)* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`1` | true | number | ||
### `state` | ||
*current status of process (either: crashed, down, idle, starting, or up)* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`up` | true | string | ||
### `type` | ||
*type of process* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`run` | true | string | ||
### `updated_at` | ||
*when process last changed state* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
GET | apps/{app_id_or_name}/dynos | |
@@ -1,2 +0,2 @@ | ||
# Formation | ||
# formation | ||
@@ -7,20 +7,16 @@ The formation of processes that should be maintained for your application. Commands and types are defined by the Procfile uploaded with an app. | ||
### `list` | ||
### `info` | ||
`heroku.apps({app_id_or_name}).formation().list({callback});` | ||
`heroku.apps({app_id_or_name}).formation({formation_id_or_type}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/formation | 200, 206 | ||
GET | apps/{app_id_or_name}/formation/{formation_id_or_type} | ### `list` | ||
### `info` | ||
`heroku.apps({app_id_or_name}).formation().list({callback});` | ||
`heroku.apps({app_id_or_name}).formation({formation_id_or_type}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/formation/{formation_id_or_type} | 200 | ||
GET | apps/{app_id_or_name}/formation | ### `update` | ||
### `update` | ||
`heroku.apps({app_id_or_name}).formation({formation_id_or_type}).update({attributes}, {callback});` | ||
@@ -30,67 +26,2 @@ | ||
--- | --- | --- | ||
PATCH | /apps/{app_id_or_name}/formation/{formation_id_or_type} | 200 | ||
#### Optional Attributes | ||
- quantity | ||
- size | ||
## Attributes | ||
### `command` | ||
*command to use for process type* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`bundle exec rails server -p $PORT` | true | string | ||
### `created_at` | ||
*when domain was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `id` | ||
*unique identifier of this process type* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `quantity` | ||
*number of processes to maintain* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`1` | true | number | ||
### `size` | ||
*dyno size (default: 1)* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`1` | true | number | ||
### `type` | ||
*type of process to maintain* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`web` | true | string | ||
### `updated_at` | ||
*when dyno type was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
PATCH | apps/{app_id_or_name}/formation/{formation_id_or_type} | |
@@ -1,4 +0,4 @@ | ||
# Key | ||
# key | ||
Keys represent public SSH keys associated with an account and are used to authorize users as they are performing git operations. | ||
Keys represent public SSH keys associated with an account and are used to authorize accounts as they are performing git operations. | ||
@@ -13,82 +13,20 @@ ## Actions | ||
--- | --- | --- | ||
POST | /account/keys | 201 | ||
POST | account/keys | ### `delete` | ||
`heroku.account().keys({key_fingerprint_or_id}).delete({callback});` | ||
#### Required Attributes | ||
- public_key | ||
### `list` | ||
`heroku.account().keys().list({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /account/keys | 200 | ||
DELETE | account/keys/{key_fingerprint_or_id} | ### `info` | ||
### `info` | ||
`heroku.account().keys({key_fingerprint_or_id}).info({callback});` | ||
`heroku.account().keys({key_id_or_fingerprint}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /account/keys/{key_id_or_fingerprint} | 200 | ||
GET | account/keys/{key_fingerprint_or_id} | ### `list` | ||
### `delete` | ||
`heroku.account().keys().list({callback});` | ||
`heroku.account().keys({key_id_or_fingerprint}).delete({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
DELETE | /account/keys/{key_id_or_fingerprint} | 200 | ||
## Attributes | ||
### `created_at` | ||
*when key was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `email` | ||
*email address provided in key contents* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`username@example.com` | true | string | ||
### `fingerprint` | ||
*a unique identifying string based on contents* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`17:63:a4:ba:24:d3:7f:af:17:c8:94:82:7e:80:56:bf` | true | string | ||
### `id` | ||
*unique identifier of this key* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `public_key` | ||
*full public_key as uploaded* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`ssh-rsa AAAAB3NzaC1ycVc/../839Uv username@example.com` | true | string | ||
### `updated_at` | ||
*when key was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
GET | account/keys | |
@@ -1,2 +0,2 @@ | ||
# Log Drain | ||
# log-drain | ||
@@ -13,74 +13,20 @@ [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. | ||
--- | --- | --- | ||
POST | /apps/{app_id_or_name}/log-drains | 201 | ||
POST | apps/{app_id_or_name}/log-drains | ### `delete` | ||
`heroku.apps({app_id_or_name}).logDrains({log-drain_id_or_url}).delete({callback});` | ||
#### Required Attributes | ||
- url | ||
### `list` | ||
`heroku.apps({app_id_or_name}).logDrains().list({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/log-drains | 200 | ||
DELETE | apps/{app_id_or_name}/log-drains/{log-drain_id_or_url} | ### `info` | ||
### `info` | ||
`heroku.apps({app_id_or_name}).logDrains({log-drain_id_or_url}).info({callback});` | ||
`heroku.apps({app_id_or_name}).logDrains({drain_id_or_url}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/log-drains/{drain_id_or_url} | 200 | ||
GET | apps/{app_id_or_name}/log-drains/{log-drain_id_or_url} | ### `list` | ||
### `delete` | ||
`heroku.apps({app_id_or_name}).logDrains().list({callback});` | ||
`heroku.apps({app_id_or_name}).logDrains({drain_id_or_url}).delete({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
DELETE | /apps/{app_id_or_name}/log-drains/{drain_id_or_url} | 200 | ||
## Attributes | ||
### `addon:id` | ||
*unique identifier of the addon that provides the drain* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `created_at` | ||
*when log drain was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `id` | ||
*unique identifier of this log drain* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `updated_at` | ||
*when log session was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `url` | ||
*url associated with the log drain* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`https://example.com/drain` | true | string | ||
GET | apps/{app_id_or_name}/log-drains | |
@@ -1,4 +0,4 @@ | ||
# Log Session | ||
# log-session | ||
Log sessions provide a URL to stream data from your app logs. Streaming is performed by doing an HTTP GET method on the provided Logplex URL and then repeatedly reading from the socket. Sessions remain available for about 5 minutes after creation or about one hour after connecting. For continuous access to an app's log, you should set up a [log drain](https://devcenter.heroku.com/articles/logging#syslog-drains). | ||
A log session is a reference to the http based log stream for an app. | ||
@@ -13,77 +13,2 @@ ## Actions | ||
--- | --- | --- | ||
POST | /apps/{app_id_or_name}/log-sessions | 201 | ||
#### Optional Attributes | ||
- dyno | ||
- lines | ||
- source | ||
- tail | ||
## Attributes | ||
### `created_at` | ||
*when log connection was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `dyno` | ||
*dyno to limit results to* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`web.1` | false | string | ||
### `id` | ||
*unique identifier of this log session* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `lines` | ||
*number of log lines to stream at once* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`10` | false | number | ||
### `logplex_url` | ||
*URL for log streaming session* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`https://logplex.heroku.com/sessions/01234567-89ab-cdef-0123-456789abcdef?srv=1325419200` | true | string | ||
### `source` | ||
*log source to limit results to* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`app` | false | string | ||
### `tail` | ||
*whether to stream ongoing logs* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`true` | false | boolean | ||
### `updated_at` | ||
*when log session was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
POST | apps/{app_id_or_name}/log-sessions | |
@@ -1,2 +0,2 @@ | ||
# OAuth Authorization | ||
# oauth-authorization | ||
@@ -13,174 +13,20 @@ 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) | ||
--- | --- | --- | ||
POST | /oauth/authorizations | 201 | ||
POST | oauth/authorizations | ### `delete` | ||
#### Optional Attributes | ||
`heroku.oauth().authorizations({oauth-authorization_id}).delete({callback});` | ||
- client:id | ||
- description | ||
#### Required Attributes | ||
- scope | ||
### `list` | ||
`heroku.oauth().authorizations().list({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /oauth/authorizations | 200, 206 | ||
DELETE | oauth/authorizations/{oauth-authorization_id} | ### `info` | ||
### `info` | ||
`heroku.oauth().authorizations({oauth-authorization_id}).info({callback});` | ||
`heroku.oauth().authorizations({authorization_id}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /oauth/authorizations/{authorization_id} | 200 | ||
GET | oauth/authorizations/{oauth-authorization_id} | ### `list` | ||
### `delete` | ||
`heroku.oauth().authorizations().list({callback});` | ||
`heroku.oauth().authorizations({authorization_id}).delete({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
DELETE | /oauth/authorizations/{authorization_id} | 200 | ||
## Attributes | ||
### `access_token:expires_in` | ||
*seconds until OAuth access token expires* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`7200` | true | number | ||
### `access_token:id` | ||
*unique identifier of this authorization's OAuth access token* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `access_token:token` | ||
*the actual OAuth access token* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | string | ||
### `client:id` | ||
*unique identifier of this OAuth authorization client* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `client:name` | ||
*OAuth authorization client name* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`example` | true | string | ||
### `client:redirect_uri` | ||
*endpoint for redirection after authorization with OAuth authorization client* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`https://example.com/auth/heroku/callback` | true | string | ||
### `created_at` | ||
*when OAuth authorization was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `description` | ||
*human-friendly description of this OAuth authorization* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`sample authorization` | true | string | ||
### `grant:code` | ||
*code for the OAuth authorization grant* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | string | ||
### `grant:expires_in` | ||
*date in which this authorization grant is no longer valid* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `grant:id` | ||
*unique identifier for this authorization's grant* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `id` | ||
*unique identifier of OAuth authorization* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `refresh_token:expires_in` | ||
*seconds until OAuth refresh token expires; may be `null` for a refresh token with indefinite lifetime* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`7200` | true | number | ||
### `refresh_token:id` | ||
*unique identifier of this authorization's OAuth refresh token* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `refresh_token:token` | ||
*the actual OAuth refresh token* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | string | ||
### `scope` | ||
*The scope of access OAuth authorization allows* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`global` | true | array[string] | ||
### `updated_at` | ||
*when OAuth authorization was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
GET | oauth/authorizations | |
@@ -1,4 +0,4 @@ | ||
# OAuth Client | ||
# oauth-client | ||
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) | ||
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). | ||
@@ -13,97 +13,26 @@ ## Actions | ||
--- | --- | --- | ||
POST | /oauth/clients | 201 | ||
POST | oauth/clients | ### `delete` | ||
`heroku.oauth().clients({oauth-client_id}).delete({callback});` | ||
#### Required Attributes | ||
- name | ||
- redirect_uri | ||
### `list` | ||
`heroku.oauth().clients().list({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /oauth/clients | 200, 206 | ||
DELETE | oauth/clients/{oauth-client_id} | ### `info` | ||
### `info` | ||
`heroku.oauth().clients({oauth-client_id}).info({callback});` | ||
`heroku.oauth().clients({client_id}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /oauth/clients/{client_id} | 200 | ||
GET | oauth/clients/{oauth-client_id} | ### `list` | ||
### `update` | ||
`heroku.oauth().clients().list({callback});` | ||
`heroku.oauth().clients({client_id}).update({attributes}, {callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
PATCH | /oauth/clients/{client_id} | 200 | ||
GET | oauth/clients | ### `update` | ||
#### Optional Attributes | ||
`heroku.oauth().clients({oauth-client_id}).update({attributes}, {callback});` | ||
- name | ||
- redirect_uri | ||
### `delete` | ||
`heroku.oauth().clients({client_id}).delete({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
DELETE | /oauth/clients/{client_id} | 200 | ||
## Attributes | ||
### `created_at` | ||
*when OAuth client was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `id` | ||
*unique identifier of this OAuth client* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `name` | ||
*OAuth client name* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`example` | true | string | ||
### `redirect_uri` | ||
*endpoint for redirection after authorization with OAuth client* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`https://example.com/auth/heroku/callback` | true | string | ||
### `secret` | ||
*secret used to obtain OAuth authorizations under this client* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | string | ||
### `updated_at` | ||
*when OAuth client was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
PATCH | oauth/clients/{oauth-client_id} | |
@@ -1,2 +0,2 @@ | ||
# OAuth Token | ||
# oauth-token | ||
@@ -13,135 +13,2 @@ 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) | ||
--- | --- | --- | ||
POST | /oauth/tokens | 201 | ||
#### Optional Attributes | ||
- client:secret | ||
- grant:code | ||
- refresh_token:token | ||
#### Required Attributes | ||
- grant:type | ||
## Attributes | ||
### `authorization:id` | ||
*unique identifier of OAuth token authorization* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `access_token:expires_in` | ||
*seconds until OAuth access token expires* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2592000` | true | number | ||
### `access_token:id` | ||
*unique identifier of OAuth access token* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `access_token:token` | ||
*content of OAuth access token* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | string | ||
### `client:secret` | ||
*OAuth client secret used to obtain token* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | false | string | ||
### `created_at` | ||
*when OAuth token was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `grant:code` | ||
*grant code recieved from OAuth web application authorization* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | false | string | ||
### `grant:type` | ||
*type of grant requested, one of `authorization_code` or `refresh_token`* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`authorization_code` | false | string | ||
### `id` | ||
*unique identifier of OAuth token* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `refresh_token:expires_in` | ||
*seconds until OAuth refresh token expires; may be `null` for a refresh token with indefinite lifetime* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2592000` | true | number | ||
### `refresh_token:id` | ||
*unique identifier of OAuth refresh token* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `refresh_token:token` | ||
*content of OAuth refresh token* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | string | ||
### `session:id` | ||
*unique identifier of OAuth token session* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | string | ||
### `updated_at` | ||
*when OAuth token was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `user:id` | ||
*unique identifier of the user* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
POST | oauth/tokens | |
@@ -1,2 +0,2 @@ | ||
# Plan | ||
# plan | ||
@@ -7,83 +7,14 @@ Plans represent different configurations of add-ons that may be added to apps. | ||
### `list` | ||
### `info` | ||
`heroku.addonServices({addon_service_id_or_name}).plans().list({callback});` | ||
`heroku.addonServices({addon-service_id_or_name}).plans({plan_id_or_name}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /addon-services/{addon_service_id_or_name}/plans | 200, 206 | ||
GET | addon-services/{addon-service_id_or_name}/plans/{plan_id_or_name} | ### `list` | ||
### `info` | ||
`heroku.addonServices({addon-service_id_or_name}).plans().list({callback});` | ||
`heroku.addonServices({addon_service_id_or_name}).plans({plan_id_or_name}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /addon-services/{addon_service_id_or_name}/plans/{plan_id_or_name} | 200 | ||
## Attributes | ||
### `created_at` | ||
*when plan was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `description` | ||
*description of plan* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`Heroku Postgres Dev` | true | string | ||
### `id` | ||
*unique identifier of plan* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `name` | ||
*unique name for plan* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`heroku-postgresql:dev` | true | string | ||
### `price:cents` | ||
*price in cents per unit of plan* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`0` | true | number | ||
### `price:unit` | ||
*unit of price for plan* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`month` | true | string | ||
### `state` | ||
*release status for plan* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`public` | true | string | ||
### `updated_at` | ||
*when plan was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
GET | addon-services/{addon-service_id_or_name}/plans | |
@@ -1,15 +0,7 @@ | ||
# Region | ||
# region | ||
Regions represent geographic locations in which your application may run. | ||
A region represents a geographic location in which your application may run. | ||
## Actions | ||
### `list` | ||
`heroku.regions().list({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /regions | 200, 206 | ||
### `info` | ||
@@ -21,45 +13,8 @@ | ||
--- | --- | --- | ||
GET | /regions/{region_id_or_name} | 200 | ||
GET | regions/{region_id_or_name} | ### `list` | ||
## Attributes | ||
`heroku.regions().list({callback});` | ||
### `created_at` | ||
*when region was created* | ||
Example | Serialized? | Type | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `description` | ||
*description of the region* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`United States` | true | string | ||
### `id` | ||
*unique identifier of this region* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `name` | ||
*unique name of the region* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`us` | true | string | ||
### `updated_at` | ||
*when region was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
GET | regions | |
@@ -1,2 +0,2 @@ | ||
# Release | ||
# release | ||
@@ -7,10 +7,2 @@ A release represents a combination of code, config vars and add-ons for an app on Heroku. | ||
### `list` | ||
`heroku.apps({app_id_or_name}).releases().list({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/releases | 200, 206 | ||
### `info` | ||
@@ -22,61 +14,14 @@ | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/releases/{release_id_or_version} | 200 | ||
GET | apps/{app_id_or_name}/releases/{release_id_or_version} | ### `list` | ||
## Attributes | ||
`heroku.apps({app_id_or_name}).releases().list({callback});` | ||
### `created_at` | ||
*when release was created* | ||
Example | Serialized? | Type | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
GET | apps/{app_id_or_name}/releases | ### `rollback` | ||
### `description` | ||
`heroku.apps({app_id_or_name}).releases().rollback({attributes}, {callback});` | ||
*description of changes in this release* | ||
Example | Serialized? | Type | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
`Added new feature` | true | string | ||
### `id` | ||
*unique identifier of this release* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `updated_at` | ||
*when region was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00Z` | true | datetime | ||
### `user:email` | ||
*email address of user that created the release* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`username@example.com` | true | string | ||
### `user:id` | ||
*unique identifier of the user that created the release* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `version` | ||
*unique version assigned to the release* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`456` | true | number | ||
POST | apps/{app_id_or_name}/releases | |
@@ -1,4 +0,4 @@ | ||
# SSL Endpoint | ||
# ssl-endpoint | ||
[SSL Endpoints](https://devcenter.heroku.com/articles/ssl-endpoint) are public addresses serving custom SSL certs for HTTPS traffic to Heroku apps. Note that an app must have the `ssl:endpoint` addon installed before it can provision an SSL Endpoint using these APIs. | ||
[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. | ||
@@ -13,114 +13,26 @@ ## Actions | ||
--- | --- | --- | ||
POST | /apps/{app_id_or_name}/ssl-endpoints | 201 | ||
POST | apps/{app_id_or_name}/ssl-endpoints | ### `delete` | ||
`heroku.apps({app_id_or_name}).sslEndpoints({ssl-endpoint_id_or_name}).delete({callback});` | ||
#### Required Attributes | ||
- certificate_chain | ||
- private_key | ||
### `list` | ||
`heroku.apps({app_id_or_name}).sslEndpoints().list({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/ssl-endpoints | 200, 206 | ||
DELETE | apps/{app_id_or_name}/ssl-endpoints/{ssl-endpoint_id_or_name} | ### `info` | ||
### `info` | ||
`heroku.apps({app_id_or_name}).sslEndpoints({ssl-endpoint_id_or_name}).info({callback});` | ||
`heroku.apps({app_id_or_name}).sslEndpoints({ssl_endpoint_id_or_name}).info({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
GET | /apps/{app_id_or_name}/ssl-endpoints/{ssl_endpoint_id_or_name} | 200 | ||
GET | apps/{app_id_or_name}/ssl-endpoints/{ssl-endpoint_id_or_name} | ### `list` | ||
### `update` | ||
`heroku.apps({app_id_or_name}).sslEndpoints().list({callback});` | ||
`heroku.apps({app_id_or_name}).sslEndpoints({ssl_endpoint_id_or_name}).update({attributes}, {callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
PATCH | /apps/{app_id_or_name}/ssl-endpoints/{ssl_endpoint_id_or_name} | 200 | ||
GET | apps/{app_id_or_name}/ssl-endpoints | ### `update` | ||
#### Optional Attributes | ||
`heroku.apps({app_id_or_name}).sslEndpoints({ssl-endpoint_id_or_name}).update({attributes}, {callback});` | ||
- certificate_chain | ||
- private_key | ||
- rollback | ||
### `delete` | ||
`heroku.apps({app_id_or_name}).sslEndpoints({ssl_endpoint_id_or_name}).delete({callback});` | ||
Method | Path | Expected Status(es) | ||
--- | --- | --- | ||
DELETE | /apps/{app_id_or_name}/ssl-endpoints/{ssl_endpoint_id_or_name} | 200 | ||
## Attributes | ||
### `certificate_chain` | ||
*raw contents of the public certificate chain (eg: .crt or .pem file)* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`-----BEGIN CERTIFICATE----- ...` | true | string | ||
### `cname` | ||
*canonical name record, the address to point a domain at* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`example.herokussl.com` | true | string | ||
### `created_at` | ||
*when endpoint was created* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00-00:00` | true | datetime | ||
### `id` | ||
*unique identifier of this SSL endpoint* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`01234567-89ab-cdef-0123-456789abcdef` | true | uuid | ||
### `name` | ||
*unique name for SSL endpoint* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`tokyo-1234` | true | string | ||
### `private_key` | ||
*contents of the private key (eg .key file)* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`-----BEGIN RSA PRIVATE KEY----- ...` | false | string | ||
### `rollback` | ||
*indicates that a rollback should be performed* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`true` | false | boolean | ||
### `updated_at` | ||
*when endpoint was updated* | ||
Example | Serialized? | Type | ||
--- | --- | --- | ||
`2012-01-01T12:00:00-00:00` | true | datetime | ||
PATCH | apps/{app_id_or_name}/ssl-endpoints/{ssl-endpoint_id_or_name} | |
@@ -133,3 +133,3 @@ var https = require('https'), | ||
res.on('end', function () { | ||
if (_this.expectedStatus(res)) { | ||
if (res.statusCode.toString().match(/^2\d{2}$/)) { | ||
_this.handleSuccess(res, buffer); | ||
@@ -193,21 +193,2 @@ } else { | ||
/* | ||
* Check that the status from the API response | ||
* matches the one(s) that are expected. | ||
*/ | ||
Request.prototype.expectedStatus = function expectedStatus (res) { | ||
var options = this.options; | ||
if (options.expectedStatus) { | ||
if (Array.isArray(options.expectedStatus)) { | ||
return options.expectedStatus.indexOf(res.statusCode) > -1 | ||
} else { | ||
return res.statusCode === options.expectedStatus; | ||
} | ||
} else { | ||
return res.statusCode.toString().match(/^2\d{2}$/); | ||
} | ||
} | ||
/* | ||
* In the event of a non-successful API request, | ||
@@ -221,16 +202,5 @@ * fail with an appropriate error message and | ||
deferred = this.deferred, | ||
statusString = options.expectedStatus, | ||
message, | ||
message = 'Expected response to be successful, got ' + res.statusCode, | ||
err; | ||
if (options.expectedStatus) { | ||
if (Array.isArray(options.expectedStatus)) { | ||
statusString = JSON.stringify(options.expectedStatus); | ||
} | ||
message = 'Expected response ' + statusString + ', got ' + res.statusCode | ||
} else { | ||
message = 'Expected response to be successful, got ' + res.statusCode | ||
} | ||
err = new Error(message); | ||
@@ -237,0 +207,0 @@ err.statusCode = res.statusCode; |
var Heroku = require('./heroku'), | ||
inflection = require('inflection'), | ||
resources = require('./resources').resources, | ||
resources = require('./schema').definitions, | ||
_ = require('lodash'); | ||
@@ -8,3 +8,3 @@ | ||
exports.build = function () { | ||
_.each(resources, function (resource) { | ||
_.each(resources, function (resource, resourceName) { | ||
buildResource(resource); | ||
@@ -16,14 +16,13 @@ }); | ||
function buildResource (resource) { | ||
_.each(resource.actions, function (action, actionName) { | ||
buildAction(action, actionName); | ||
}); | ||
_.each(resource.links, buildAction); | ||
} | ||
function buildAction (action, actionName) { | ||
var constructor = getResource(action.path); | ||
function buildAction (action) { | ||
var constructor = getResource(action.href), | ||
actionName = action.title; | ||
constructor.prototype[getName(actionName)] = function (body, callback) { | ||
var requestPath = action.path, | ||
pathParams = action.path.match(/{[a-z_]+}/g) || [], | ||
var requestPath = action.href, | ||
pathParams = action.href.match(/{[^}]+}/g) || [], | ||
callback; | ||
@@ -36,3 +35,3 @@ | ||
this.params.forEach(function (param) { | ||
requestPath = requestPath.replace(/{[a-z_]+}/, param); | ||
requestPath = requestPath.replace(/{[^}]+}/, param); | ||
}); | ||
@@ -42,4 +41,3 @@ | ||
method: action.method, | ||
path: requestPath, | ||
expectedStatus: action.statuses | ||
path: requestPath | ||
}; | ||
@@ -46,0 +44,0 @@ |
{ | ||
"name": "heroku-client", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "A wrapper for the Heroku v3 API", | ||
@@ -5,0 +5,0 @@ "main": "./lib/heroku.js", |
@@ -19,9 +19,2 @@ var Heroku = require('../../lib/heroku'), | ||
it('passes its expected status into the request', function(done) { | ||
heroku.apps('my-app').dynos().list(function() { | ||
expect(Request.request.mostRecentCall.args[0].expectedStatus).toEqual([200, 206]); | ||
done(); | ||
}); | ||
}); | ||
describe('requests with the wrong number of parameters', function() { | ||
@@ -28,0 +21,0 @@ it('throws an error', function() { |
@@ -116,3 +116,3 @@ var https = require("https"), | ||
describe('status codes', function() { | ||
it('expects a 200 response by default', function(done) { | ||
it('expects a 2xx response by default', function(done) { | ||
makeRequest('/apps', {}, function(err) { | ||
@@ -123,30 +123,2 @@ expect(err.message).toEqual('Expected response to be successful, got 404'); | ||
}); | ||
it('accepts a single expected status code', function(done) { | ||
makeRequest('/apps', { expectedStatus: 201 }, function(err, body) { | ||
expect(err.message).toEqual('Expected response 201, got 200'); | ||
done(); | ||
}); | ||
}); | ||
it('accepts an array of expected status codes (failure)', function(done) { | ||
makeRequest('/apps', { expectedStatus: [201, 204] }, function(err, body) { | ||
expect(err.message).toEqual('Expected response [201,204], got 200'); | ||
done(); | ||
}, { response: { statusCode: 200 } }); | ||
}); | ||
it('accepts an array of expected status codes (success, first)', function(done) { | ||
makeRequest('/apps', { expectedStatus: [201, 204] }, function(err, body) { | ||
expect(err).toEqual(null); | ||
done(); | ||
}, { response: { statusCode: 201 } }); | ||
}); | ||
it('accepts an array of expected status codes (success, last)', function(done) { | ||
makeRequest('/apps', { expectedStatus: [201, 204] }, function(err, body) { | ||
expect(err).toEqual(null); | ||
done(); | ||
}, { response: { statusCode: 204 } }); | ||
}); | ||
}); | ||
@@ -153,0 +125,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
155906
43
4173
3