diff --git a/v5/heroku.go b/v5/heroku.go index 8103850..d8c6e6f 100644 --- a/v5/heroku.go +++ b/v5/heroku.go @@ -212,11 +212,12 @@ func String(v string) *string { // An account represents an individual signed up to use the Heroku // platform. type Account struct { - AcknowledgedMsa bool `json:"acknowledged_msa" url:"acknowledged_msa,key"` // whether account has acknowledged the MSA terms of service - AcknowledgedMsaAt *time.Time `json:"acknowledged_msa_at" url:"acknowledged_msa_at,key"` // when account has acknowledged the MSA terms of service - AllowTracking bool `json:"allow_tracking" url:"allow_tracking,key"` // whether to allow third party web activity tracking - Beta bool `json:"beta" url:"beta,key"` // whether allowed to utilize beta Heroku features - CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when account was created + AcknowledgedMsa bool `json:"acknowledged_msa" url:"acknowledged_msa,key"` // deprecated. whether account has acknowledged the MSA terms of service + AcknowledgedMsaAt *time.Time `json:"acknowledged_msa_at" url:"acknowledged_msa_at,key"` // deprecated. when account has acknowledged the MSA terms of service + AllowTracking bool `json:"allow_tracking" url:"allow_tracking,key"` // whether to allow third party web activity tracking + Beta bool `json:"beta" url:"beta,key"` // whether allowed to utilize beta Heroku features + CountryOfResidence *string `json:"country_of_residence" url:"country_of_residence,key"` // country where account owner resides + CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when account was created DefaultOrganization *struct { ID string `json:"id" url:"id,key"` // unique identifier of team Name string `json:"name" url:"name,key"` // unique name of team @@ -243,10 +244,10 @@ type Account struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"team" url:"team,key"` } `json:"identity_provider" url:"identity_provider,key"` // Identity Provider details for federated users. - ItalianCustomerTerms *string `json:"italian_customer_terms" url:"italian_customer_terms,key"` // whether account has acknowledged the Italian customer terms of - // service - ItalianPartnerTerms *string `json:"italian_partner_terms" url:"italian_partner_terms,key"` // whether account has acknowledged the Italian provider terms of - // service + ItalianCustomerTerms *string `json:"italian_customer_terms" url:"italian_customer_terms,key"` // deprecated. whether account has acknowledged the Italian customer + // terms of service + ItalianPartnerTerms *string `json:"italian_partner_terms" url:"italian_partner_terms,key"` // deprecated. whether account has acknowledged the Italian provider + // terms of service LastLogin *time.Time `json:"last_login" url:"last_login,key"` // when account last authorized with Heroku Name *string `json:"name" url:"name,key"` // full name of the account owner SmsNumber *string `json:"sms_number" url:"sms_number,key"` // SMS number of account @@ -1598,14 +1599,14 @@ func (s *Service) AppWebhookEventList(ctx context.Context, appIdentity string, l type Archive struct { Checksum string `json:"checksum" url:"checksum,key"` // checksum for the archive CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when archive was created - Month int `json:"month" url:"month,key"` // month of the archive + Month string `json:"month" url:"month,key"` // month of the archive Size int `json:"size" url:"size,key"` // size of the archive in bytes URL string `json:"url" url:"url,key"` // url where to download the archive Year int `json:"year" url:"year,key"` // year of the archive } // Get archive for a single month. -func (s *Service) ArchiveInfo(ctx context.Context, enterpriseAccountIdentity string, archiveYear int, archiveMonth int) (*Archive, error) { +func (s *Service) ArchiveInfo(ctx context.Context, enterpriseAccountIdentity string, archiveYear int, archiveMonth string) (*Archive, error) { var archive Archive return &archive, s.Get(ctx, &archive, fmt.Sprintf("/enterprise-accounts/%v/archives/%v/%v", enterpriseAccountIdentity, archiveYear, archiveMonth), nil, nil) } @@ -1648,7 +1649,13 @@ type AuditTrailEvent struct { Type string `json:"type" url:"type,key"` // type of event } -// List existing events. +// List existing events. Returns all events for one date, defaulting to +// current date. Order, actor, action, and type, and date query params +// can be specified as query parameters. For example, +// '/enterprise-accounts/:id/events?order=desc&actor=user@example.com&act +// ion=create&type=app&date=2020-09-30' would return events in +// descending order and only return app created events by the user with +// user@example.com email address. func (s *Service) AuditTrailEventList(ctx context.Context, enterpriseAccountIdentity string, lr *ListRange) (*AuditTrailEvent, error) { var auditTrailEvent AuditTrailEvent return &auditTrailEvent, s.Get(ctx, &auditTrailEvent, fmt.Sprintf("/enterprise-accounts/%v/events", enterpriseAccountIdentity), nil, lr) @@ -2108,6 +2115,45 @@ func (s *Service) EnterpriseAccountUpdate(ctx context.Context, enterpriseAccount return &enterpriseAccount, s.Patch(ctx, &enterpriseAccount, fmt.Sprintf("/enterprise-accounts/%v", enterpriseAccountIdentity), o) } +// Usage for an enterprise account at a daily resolution. +type EnterpriseAccountDailyUsage struct { + Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used + Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons + Date string `json:"date" url:"date,key"` // date of the usage + Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used + ID string `json:"id" url:"id,key"` // enterprise account identifier + Name string `json:"name" url:"name,key"` // name of the enterprise account + Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons + Space float64 `json:"space" url:"space,key"` // space credits used + Teams []struct { + Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used + Apps []struct { + Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used + AppName string `json:"app_name" url:"app_name,key"` // unique name of app + Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons + Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used + Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons + } `json:"apps" url:"apps,key"` // app usage in the team + Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons + Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used + ID string `json:"id" url:"id,key"` // team identifier + Name string `json:"name" url:"name,key"` // name of the team + Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons + Space float64 `json:"space" url:"space,key"` // space credits used + } `json:"teams" url:"teams,key"` // usage by team +} +type EnterpriseAccountDailyUsageInfoResult []EnterpriseAccountDailyUsage + +// Retrieves usage for an enterprise account for a range of days. Start +// and end dates can be specified as query parameters using the date +// format, YYYY-MM-DD format. For example, +// '/enterprise-accounts/example-account/usage/daily?start=2019-01-01&end +// =2019-01-31' specifies all days in January for 2019. +func (s *Service) EnterpriseAccountDailyUsageInfo(ctx context.Context, enterpriseAccountID string, lr *ListRange) (EnterpriseAccountDailyUsageInfoResult, error) { + var enterpriseAccountDailyUsage EnterpriseAccountDailyUsageInfoResult + return enterpriseAccountDailyUsage, s.Get(ctx, &enterpriseAccountDailyUsage, fmt.Sprintf("/enterprise-accounts/%v/usage/daily", enterpriseAccountID), nil, lr) +} + // Enterprise account members are users with access to an enterprise // account. type EnterpriseAccountMember struct { @@ -2173,47 +2219,8 @@ func (s *Service) EnterpriseAccountMemberDelete(ctx context.Context, enterpriseA return &enterpriseAccountMember, s.Delete(ctx, &enterpriseAccountMember, fmt.Sprintf("/enterprise-accounts/%v/members/%v", enterpriseAccountIdentity, enterpriseAccountMemberUserIdentity)) } -// Usage for an enterprise account at a daily resolution. -type EnterpriseAccountUsageDaily struct { - Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used - Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons - Date string `json:"date" url:"date,key"` // date of the usage - Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used - ID string `json:"id" url:"id,key"` // enterprise account identifier - Name string `json:"name" url:"name,key"` // name of the enterprise account - Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons - Space float64 `json:"space" url:"space,key"` // space credits used - Teams []struct { - Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used - Apps []struct { - Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used - AppName string `json:"app_name" url:"app_name,key"` // unique name of app - Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons - Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used - Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons - } `json:"apps" url:"apps,key"` // app usage in the team - Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons - Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used - ID string `json:"id" url:"id,key"` // team identifier - Name string `json:"name" url:"name,key"` // name of the team - Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons - Space float64 `json:"space" url:"space,key"` // space credits used - } `json:"teams" url:"teams,key"` // usage by team -} -type EnterpriseAccountUsageDailyInfoResult []EnterpriseAccountUsageDaily - -// Retrieves usage for an enterprise account for a range of days. Start -// and end dates can be specified as query parameters using the date -// format, YYYY-MM-DD format. For example, -// '/enterprise-accounts/example-account/usage/daily?start=2019-01-01&end -// =2019-01-31' specifies all days in January for 2019. -func (s *Service) EnterpriseAccountUsageDailyInfo(ctx context.Context, enterpriseAccountID string, lr *ListRange) (EnterpriseAccountUsageDailyInfoResult, error) { - var enterpriseAccountUsageDaily EnterpriseAccountUsageDailyInfoResult - return enterpriseAccountUsageDaily, s.Get(ctx, &enterpriseAccountUsageDaily, fmt.Sprintf("/enterprise-accounts/%v/usage/daily", enterpriseAccountID), nil, lr) -} - // Usage for an enterprise account at a monthly resolution. -type EnterpriseAccountUsageMonthly struct { +type EnterpriseAccountMonthlyUsage struct { Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used Connect float64 `json:"connect" url:"connect,key"` // average connect rows synced Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons @@ -2241,7 +2248,7 @@ type EnterpriseAccountUsageMonthly struct { Space float64 `json:"space" url:"space,key"` // space credits used } `json:"teams" url:"teams,key"` // usage by team } -type EnterpriseAccountUsageMonthlyInfoResult []EnterpriseAccountUsageMonthly +type EnterpriseAccountMonthlyUsageInfoResult []EnterpriseAccountMonthlyUsage // Retrieves usage for an enterprise account for a range of months. // Start and end dates can be specified as query parameters using the @@ -2249,9 +2256,9 @@ type EnterpriseAccountUsageMonthlyInfoResult []EnterpriseAccountUsageMonthly // '/enterprise-accounts/example-account/usage/monthly?start=2019-01&end= // 2019-02' specifies usage in January and February for 2019. If no end // date is specified, one month of usage is returned. -func (s *Service) EnterpriseAccountUsageMonthlyInfo(ctx context.Context, enterpriseAccountID string, lr *ListRange) (EnterpriseAccountUsageMonthlyInfoResult, error) { - var enterpriseAccountUsageMonthly EnterpriseAccountUsageMonthlyInfoResult - return enterpriseAccountUsageMonthly, s.Get(ctx, &enterpriseAccountUsageMonthly, fmt.Sprintf("/enterprise-accounts/%v/usage/monthly", enterpriseAccountID), nil, lr) +func (s *Service) EnterpriseAccountMonthlyUsageInfo(ctx context.Context, enterpriseAccountID string, lr *ListRange) (EnterpriseAccountMonthlyUsageInfoResult, error) { + var enterpriseAccountMonthlyUsage EnterpriseAccountMonthlyUsageInfoResult + return enterpriseAccountMonthlyUsage, s.Get(ctx, &enterpriseAccountMonthlyUsage, fmt.Sprintf("/enterprise-accounts/%v/usage/monthly", enterpriseAccountID), nil, lr) } // Filters are special endpoints to allow for API consumers to specify a @@ -3130,9 +3137,9 @@ type PipelineBuildListResult []struct { } // List latest builds for each app in a pipeline -func (s *Service) PipelineBuildList(ctx context.Context, pipelineIdentity string, lr *ListRange) (PipelineBuildListResult, error) { +func (s *Service) PipelineBuildList(ctx context.Context, pipelineID string, lr *ListRange) (PipelineBuildListResult, error) { var pipelineBuild PipelineBuildListResult - return pipelineBuild, s.Get(ctx, &pipelineBuild, fmt.Sprintf("/pipelines/%v/latest-builds", pipelineIdentity), nil, lr) + return pipelineBuild, s.Get(ctx, &pipelineBuild, fmt.Sprintf("/pipelines/%v/latest-builds", pipelineID), nil, lr) } // Pipeline Config Vars allow you to manage the configuration @@ -3271,9 +3278,9 @@ type PipelineDeploymentListResult []struct { } // List latest slug releases for each app in a pipeline -func (s *Service) PipelineDeploymentList(ctx context.Context, pipelineIdentity string, lr *ListRange) (PipelineDeploymentListResult, error) { +func (s *Service) PipelineDeploymentList(ctx context.Context, pipelineID string, lr *ListRange) (PipelineDeploymentListResult, error) { var pipelineDeployment PipelineDeploymentListResult - return pipelineDeployment, s.Get(ctx, &pipelineDeployment, fmt.Sprintf("/pipelines/%v/latest-deployments", pipelineIdentity), nil, lr) + return pipelineDeployment, s.Get(ctx, &pipelineDeployment, fmt.Sprintf("/pipelines/%v/latest-deployments", pipelineID), nil, lr) } // Promotions allow you to move code from an app in a pipeline to all @@ -3376,9 +3383,9 @@ type PipelineReleaseListResult []struct { } // List latest releases for each app in a pipeline -func (s *Service) PipelineReleaseList(ctx context.Context, pipelineIdentity string, lr *ListRange) (PipelineReleaseListResult, error) { +func (s *Service) PipelineReleaseList(ctx context.Context, pipelineID string, lr *ListRange) (PipelineReleaseListResult, error) { var pipelineRelease PipelineReleaseListResult - return pipelineRelease, s.Get(ctx, &pipelineRelease, fmt.Sprintf("/pipelines/%v/latest-releases", pipelineIdentity), nil, lr) + return pipelineRelease, s.Get(ctx, &pipelineRelease, fmt.Sprintf("/pipelines/%v/latest-releases", pipelineID), nil, lr) } // A pipeline's stack is determined by the apps in the pipeline. This is @@ -3394,9 +3401,9 @@ type PipelineStack struct { // The stack for a given pipeline, used for CI and Review Apps that have // no stack defined in app.json. -func (s *Service) PipelineStackDefaultStack(ctx context.Context, pipelineIdentity string) (*PipelineStack, error) { +func (s *Service) PipelineStackDefaultStack(ctx context.Context, pipelineID string) (*PipelineStack, error) { var pipelineStack PipelineStack - return &pipelineStack, s.Get(ctx, &pipelineStack, fmt.Sprintf("/pipelines/%v/pipeline-stack", pipelineIdentity), nil, nil) + return &pipelineStack, s.Get(ctx, &pipelineStack, fmt.Sprintf("/pipelines/%v/pipeline-stack", pipelineID), nil, nil) } // A pipeline transfer is the process of changing pipeline ownership @@ -3665,7 +3672,9 @@ type ReviewAppConfig struct { } `json:"deploy_target" url:"deploy_target,key"` // the deploy target for the review apps of a pipeline DestroyStaleApps bool `json:"destroy_stale_apps" url:"destroy_stale_apps,key"` // automatically destroy review apps when they haven't been deployed for // a number of days - PipelineID string `json:"pipeline_id" url:"pipeline_id,key"` // unique identifier of pipeline + Pipeline *struct { + ID string `json:"id" url:"id,key"` // unique identifier of pipeline + } `json:"pipeline" url:"pipeline,key"` // the pipeline associated with the review app Repo struct { ID int `json:"id" url:"id,key"` // repository id } `json:"repo" url:"repo,key"` @@ -3802,12 +3811,26 @@ func (s *Service) SmsNumberConfirm(ctx context.Context, accountIdentity string) // SNI Endpoint is a public address serving a custom SSL cert for HTTPS // traffic, using the SNI TLS extension, to a Heroku app. type SniEndpoint struct { - CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file) - CName string `json:"cname" url:"cname,key"` // deprecated; refer to GET /apps/:id/domains for valid CNAMEs for this - // app - CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when endpoint was created - ID string `json:"id" url:"id,key"` // unique identifier of this SNI endpoint - Name string `json:"name" url:"name,key"` // unique name for SNI endpoint + App struct { + ID string `json:"id" url:"id,key"` // unique identifier of app + Name string `json:"name" url:"name,key"` // unique name of app + } `json:"app" url:"app,key"` // application that this SSL certificate is on + CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file) + CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when endpoint was created + DisplayName *string `json:"display_name" url:"display_name,key"` // unique name for SSL certificate + Domains []string `json:"domains" url:"domains,key"` // domains associated with this SSL certificate + ID string `json:"id" url:"id,key"` // unique identifier of this SNI endpoint + Name string `json:"name" url:"name,key"` // unique name for SNI endpoint + SSLCert struct { + IsCaSigned bool `json:"ca_signed?" url:"ca_signed?,key"` + CertDomains []interface{} `json:"cert_domains" url:"cert_domains,key"` + ExpiresAt time.Time `json:"expires_at" url:"expires_at,key"` + ID string `json:"id" url:"id,key"` // unique identifier of this SSL certificate + Issuer string `json:"issuer" url:"issuer,key"` + IsSelfSigned bool `json:"self_signed?" url:"self_signed?,key"` + StartsAt time.Time `json:"starts_at" url:"starts_at,key"` + Subject string `json:"subject" url:"subject,key"` + } `json:"ssl_cert" url:"ssl_cert,key"` // certificate provided by this endpoint UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when SNI endpoint was updated } type SniEndpointCreateOpts struct { @@ -3875,7 +3898,7 @@ func (s *Service) SourceCreateDeprecated(ctx context.Context, appIdentity string } // A space is an isolated, highly available, secure app execution -// environments, running in the modern VPC substrate. +// environment. type Space struct { CIDR string `json:"cidr" url:"cidr,key"` // The RFC-1918 CIDR the Private Space will use. It must be a /16 in // 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16 @@ -4085,7 +4108,7 @@ type SSLEndpoint struct { CertificateChain string `json:"certificate_chain" url:"certificate_chain,key"` // raw contents of the public certificate chain (eg: .crt or .pem file) CName string `json:"cname" url:"cname,key"` // canonical name record, the address to point a domain at CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when endpoint was created - DisplayName string `json:"display_name" url:"display_name,key"` // unique name for SSL endpoint + DisplayName *string `json:"display_name" url:"display_name,key"` // unique name for SSL endpoint Domains []string `json:"domains" url:"domains,key"` // domains associated with this endpoint ID string `json:"id" url:"id,key"` // unique identifier of this SSL endpoint Name string `json:"name" url:"name,key"` // unique name for SSL endpoint @@ -4498,6 +4521,36 @@ func (s *Service) TeamAppPermissionList(ctx context.Context, lr *ListRange) (Tea return teamAppPermission, s.Get(ctx, &teamAppPermission, fmt.Sprintf("/teams/permissions"), nil, lr) } +// Usage for an enterprise team at a daily resolution. +type TeamDailyUsage struct { + Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used + Apps []struct { + Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used + AppName string `json:"app_name" url:"app_name,key"` // unique name of app + Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons + Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used + Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons + } `json:"apps" url:"apps,key"` // app usage in the team + Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons + Date string `json:"date" url:"date,key"` // date of the usage + Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used + ID string `json:"id" url:"id,key"` // team identifier + Name string `json:"name" url:"name,key"` // name of the team + Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons + Space float64 `json:"space" url:"space,key"` // space credits used +} +type TeamDailyUsageInfoResult []TeamDailyUsage + +// Retrieves usage for an enterprise team for a range of days. Start and +// end dates can be specified as query parameters using the date format, +// YYYY-MM-DD format. For example, +// '/teams/example-team/usage/daily?start=2019-01-01&end=2019-01-31' +// specifies all days in January for 2019. +func (s *Service) TeamDailyUsageInfo(ctx context.Context, teamID string, lr *ListRange) (TeamDailyUsageInfoResult, error) { + var teamDailyUsage TeamDailyUsageInfoResult + return teamDailyUsage, s.Get(ctx, &teamDailyUsage, fmt.Sprintf("/teams/%v/usage/daily", teamID), nil, lr) +} + // A team feature represents a feature enabled on a team account. type TeamFeature struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when team feature was created @@ -4768,12 +4821,43 @@ func (s *Service) TeamMemberListByMember(ctx context.Context, teamIdentity strin return teamMember, s.Get(ctx, &teamMember, fmt.Sprintf("/teams/%v/members/%v/apps", teamIdentity, teamMemberIdentity), nil, lr) } +// Usage for an enterprise team at a monthly resolution. +type TeamMonthlyUsage struct { + Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used + Apps []struct { + Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used + AppName string `json:"app_name" url:"app_name,key"` // unique name of app + Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons + Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used + Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons + } `json:"apps" url:"apps,key"` // app usage in the team + Connect float64 `json:"connect" url:"connect,key"` // average connect rows synced + Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons + Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used + ID string `json:"id" url:"id,key"` // team identifier + Month string `json:"month" url:"month,key"` // year and month of the usage + Name string `json:"name" url:"name,key"` // name of the team + Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons + Space float64 `json:"space" url:"space,key"` // space credits used +} +type TeamMonthlyUsageInfoResult []TeamMonthlyUsage + +// Retrieves usage for an enterprise team for a range of months. Start +// and end dates can be specified as query parameters using the date +// format, YYYY-MM format. For example, +// '/teams/example-team/usage/monthly?start=2019-01&end=2019-02' +// specifies usage in January and February for 2019. If no end date is +// specified, one month of usage is returned. +func (s *Service) TeamMonthlyUsageInfo(ctx context.Context, teamID string, lr *ListRange) (TeamMonthlyUsageInfoResult, error) { + var teamMonthlyUsage TeamMonthlyUsageInfoResult + return teamMonthlyUsage, s.Get(ctx, &teamMonthlyUsage, fmt.Sprintf("/teams/%v/usage/monthly", teamID), nil, lr) +} + // Tracks a Team's Preferences type TeamPreferences struct { AddonsControls *bool `json:"addons-controls" url:"addons-controls,key"` // Whether add-on service rules should be applied to add-on // installations - DefaultPermission *string `json:"default-permission" url:"default-permission,key"` // The default permission used when adding new members to the team - WhitelistingEnabled *bool `json:"whitelisting-enabled" url:"whitelisting-enabled,key"` // Whether whitelisting rules should be applied to add-on installations + DefaultPermission *string `json:"default-permission" url:"default-permission,key"` // The default permission used when adding new members to the team } // Retrieve Team Preferences @@ -4785,7 +4869,6 @@ func (s *Service) TeamPreferencesList(ctx context.Context, teamPreferencesIdenti type TeamPreferencesUpdateOpts struct { AddonsControls *bool `json:"addons-controls,omitempty" url:"addons-controls,omitempty,key"` // Whether add-on service rules should be applied to add-on // installations - WhitelistingEnabled *bool `json:"whitelisting-enabled,omitempty" url:"whitelisting-enabled,omitempty,key"` // Whether whitelisting rules should be applied to add-on installations } // Update Team Preferences @@ -4795,7 +4878,7 @@ func (s *Service) TeamPreferencesUpdate(ctx context.Context, teamPreferencesIden } // A space is an isolated, highly available, secure app execution -// environments, running in the modern VPC substrate. +// environment. type TeamSpace struct{} type TeamSpaceListResult []struct { CIDR string `json:"cidr" url:"cidr,key"` // The RFC-1918 CIDR the Private Space will use. It must be a /16 in @@ -4828,68 +4911,6 @@ func (s *Service) TeamSpaceList(ctx context.Context, teamIdentity string, lr *Li return teamSpace, s.Get(ctx, &teamSpace, fmt.Sprintf("/teams/%v/spaces", teamIdentity), nil, lr) } -// Usage for an enterprise team at a daily resolution. -type TeamUsageDaily struct { - Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used - Apps []struct { - Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used - AppName string `json:"app_name" url:"app_name,key"` // unique name of app - Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons - Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used - Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons - } `json:"apps" url:"apps,key"` // app usage in the team - Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons - Date string `json:"date" url:"date,key"` // date of the usage - Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used - ID string `json:"id" url:"id,key"` // team identifier - Name string `json:"name" url:"name,key"` // name of the team - Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons - Space float64 `json:"space" url:"space,key"` // space credits used -} -type TeamUsageDailyInfoResult []TeamUsageDaily - -// Retrieves usage for an enterprise team for a range of days. Start and -// end dates can be specified as query parameters using the date format, -// YYYY-MM-DD format. For example, -// '/teams/example-team/usage?start=2019-01-01&end=2019-01-31' specifies -// all days in January for 2019. -func (s *Service) TeamUsageDailyInfo(ctx context.Context, teamID string, lr *ListRange) (TeamUsageDailyInfoResult, error) { - var teamUsageDaily TeamUsageDailyInfoResult - return teamUsageDaily, s.Get(ctx, &teamUsageDaily, fmt.Sprintf("/teams/%v/usage/daily", teamID), nil, lr) -} - -// Usage for an enterprise team at a monthly resolution. -type TeamUsageMonthly struct { - Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used - Apps []struct { - Addons float64 `json:"addons" url:"addons,key"` // total add-on credits used - AppName string `json:"app_name" url:"app_name,key"` // unique name of app - Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons - Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used - Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons - } `json:"apps" url:"apps,key"` // app usage in the team - Connect float64 `json:"connect" url:"connect,key"` // average connect rows synced - Data float64 `json:"data" url:"data,key"` // total add-on credits used for first party add-ons - Dynos float64 `json:"dynos" url:"dynos,key"` // dynos used - ID string `json:"id" url:"id,key"` // team identifier - Month string `json:"month" url:"month,key"` // year and month of the usage - Name string `json:"name" url:"name,key"` // name of the team - Partner float64 `json:"partner" url:"partner,key"` // total add-on credits used for third party add-ons - Space float64 `json:"space" url:"space,key"` // space credits used -} -type TeamUsageMonthlyInfoResult []TeamUsageMonthly - -// Retrieves usage for an enterprise team for a range of months. Start -// and end dates can be specified as query parameters using the date -// format, YYYY-MM format. For example, -// '/teams/example-team/usage?start=2019-01&end=2019-02' specifies usage -// in January and February for 2019. If no end date is specified, one -// month of usage is returned. -func (s *Service) TeamUsageMonthlyInfo(ctx context.Context, teamID string, lr *ListRange) (TeamUsageMonthlyInfoResult, error) { - var teamUsageMonthly TeamUsageMonthlyInfoResult - return teamUsageMonthly, s.Get(ctx, &teamUsageMonthly, fmt.Sprintf("/teams/%v/usage/monthly", teamID), nil, lr) -} - // A single test case belonging to a test run type TestCase struct { CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when test case was created @@ -4970,11 +4991,12 @@ type TestRun struct { Status string `json:"status" url:"status,key"` // current state of the test run UpdatedAt time.Time `json:"updated_at" url:"updated_at,key"` // when test-run was updated User struct { - AcknowledgedMsa bool `json:"acknowledged_msa" url:"acknowledged_msa,key"` // whether account has acknowledged the MSA terms of service - AcknowledgedMsaAt *time.Time `json:"acknowledged_msa_at" url:"acknowledged_msa_at,key"` // when account has acknowledged the MSA terms of service - AllowTracking bool `json:"allow_tracking" url:"allow_tracking,key"` // whether to allow third party web activity tracking - Beta bool `json:"beta" url:"beta,key"` // whether allowed to utilize beta Heroku features - CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when account was created + AcknowledgedMsa bool `json:"acknowledged_msa" url:"acknowledged_msa,key"` // deprecated. whether account has acknowledged the MSA terms of service + AcknowledgedMsaAt *time.Time `json:"acknowledged_msa_at" url:"acknowledged_msa_at,key"` // deprecated. when account has acknowledged the MSA terms of service + AllowTracking bool `json:"allow_tracking" url:"allow_tracking,key"` // whether to allow third party web activity tracking + Beta bool `json:"beta" url:"beta,key"` // whether allowed to utilize beta Heroku features + CountryOfResidence *string `json:"country_of_residence" url:"country_of_residence,key"` // country where account owner resides + CreatedAt time.Time `json:"created_at" url:"created_at,key"` // when account was created DefaultOrganization *struct { ID string `json:"id" url:"id,key"` // unique identifier of team Name string `json:"name" url:"name,key"` // unique name of team @@ -5001,10 +5023,10 @@ type TestRun struct { Name string `json:"name" url:"name,key"` // unique name of team } `json:"team" url:"team,key"` } `json:"identity_provider" url:"identity_provider,key"` // Identity Provider details for federated users. - ItalianCustomerTerms *string `json:"italian_customer_terms" url:"italian_customer_terms,key"` // whether account has acknowledged the Italian customer terms of - // service - ItalianPartnerTerms *string `json:"italian_partner_terms" url:"italian_partner_terms,key"` // whether account has acknowledged the Italian provider terms of - // service + ItalianCustomerTerms *string `json:"italian_customer_terms" url:"italian_customer_terms,key"` // deprecated. whether account has acknowledged the Italian customer + // terms of service + ItalianPartnerTerms *string `json:"italian_partner_terms" url:"italian_partner_terms,key"` // deprecated. whether account has acknowledged the Italian provider + // terms of service LastLogin *time.Time `json:"last_login" url:"last_login,key"` // when account last authorized with Heroku Name *string `json:"name" url:"name,key"` // full name of the account owner SmsNumber *string `json:"sms_number" url:"sms_number,key"` // SMS number of account @@ -5158,41 +5180,12 @@ func (s *Service) VPNConnectionInfo(ctx context.Context, spaceIdentity string, v return &vpnConnection, s.Get(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections/%v", spaceIdentity, vpnConnectionIdentity), nil, nil) } -// Entities that have been whitelisted to be used by an Team -type WhitelistedAddOnService struct { - AddedAt time.Time `json:"added_at" url:"added_at,key"` // when the add-on service was whitelisted - AddedBy struct { - Email string `json:"email" url:"email,key"` // unique email address of account - ID string `json:"id" url:"id,key"` // unique identifier of an account - } `json:"added_by" url:"added_by,key"` // the user which whitelisted the Add-on Service - AddonService struct { - HumanName string `json:"human_name" url:"human_name,key"` // human-readable name of the add-on service provider - ID string `json:"id" url:"id,key"` // unique identifier of this add-on-service - Name string `json:"name" url:"name,key"` // unique name of this add-on-service - } `json:"addon_service" url:"addon_service,key"` // the Add-on Service whitelisted for use - ID string `json:"id" url:"id,key"` // unique identifier for this whitelisting entity -} -type WhitelistedAddOnServiceListByTeamResult []WhitelistedAddOnService - -// List all whitelisted Add-on Services for an Team -func (s *Service) WhitelistedAddOnServiceListByTeam(ctx context.Context, teamIdentity string, lr *ListRange) (WhitelistedAddOnServiceListByTeamResult, error) { - var whitelistedAddOnService WhitelistedAddOnServiceListByTeamResult - return whitelistedAddOnService, s.Get(ctx, &whitelistedAddOnService, fmt.Sprintf("/teams/%v/whitelisted-addon-services", teamIdentity), nil, lr) -} - -type WhitelistedAddOnServiceCreateByTeamOpts struct { - AddonService *string `json:"addon_service,omitempty" url:"addon_service,omitempty,key"` // name of the Add-on to whitelist -} -type WhitelistedAddOnServiceCreateByTeamResult []WhitelistedAddOnService - -// Whitelist an Add-on Service -func (s *Service) WhitelistedAddOnServiceCreateByTeam(ctx context.Context, teamIdentity string, o WhitelistedAddOnServiceCreateByTeamOpts) (WhitelistedAddOnServiceCreateByTeamResult, error) { - var whitelistedAddOnService WhitelistedAddOnServiceCreateByTeamResult - return whitelistedAddOnService, s.Post(ctx, &whitelistedAddOnService, fmt.Sprintf("/teams/%v/whitelisted-addon-services", teamIdentity), o) +type VPNConnectionUpdateOpts struct { + RoutableCidrs []string `json:"routable_cidrs" url:"routable_cidrs,key"` // Routable CIDRs of VPN } -// Remove a whitelisted entity -func (s *Service) WhitelistedAddOnServiceDeleteByTeam(ctx context.Context, teamIdentity string, whitelistedAddOnServiceIdentity string) (*WhitelistedAddOnService, error) { - var whitelistedAddOnService WhitelistedAddOnService - return &whitelistedAddOnService, s.Delete(ctx, &whitelistedAddOnService, fmt.Sprintf("/teams/%v/whitelisted-addon-services/%v", teamIdentity, whitelistedAddOnServiceIdentity)) +// Update a VPN connection in a private space. +func (s *Service) VPNConnectionUpdate(ctx context.Context, spaceIdentity string, vpnConnectionIdentity string, o VPNConnectionUpdateOpts) (*VPNConnection, error) { + var vpnConnection VPNConnection + return &vpnConnection, s.Patch(ctx, &vpnConnection, fmt.Sprintf("/spaces/%v/vpn-connections/%v", spaceIdentity, vpnConnectionIdentity), o) } diff --git a/v5/schema.json b/v5/schema.json index 14acc2c..588e48a 100644 --- a/v5/schema.json +++ b/v5/schema.json @@ -228,6 +228,15 @@ "string" ] }, + "country_of_residence": { + "description": "country where account owner resides", + "example": "United States", + "readOnly": false, + "type": [ + "string", + "null" + ] + }, "email": { "description": "unique email address of account", "example": "username@example.com", @@ -361,7 +370,8 @@ ] }, "acknowledged_msa": { - "description": "whether account has acknowledged the MSA terms of service", + "deprecated": true, + "description": "deprecated. whether account has acknowledged the MSA terms of service", "example": false, "readOnly": true, "type": [ @@ -369,7 +379,8 @@ ] }, "acknowledged_msa_at": { - "description": "when account has acknowledged the MSA terms of service", + "deprecated": true, + "description": "deprecated. when account has acknowledged the MSA terms of service", "example": "2012-01-01T12:00:00Z", "format": "date-time", "readOnly": true, @@ -379,7 +390,8 @@ ] }, "italian_customer_terms": { - "description": "whether account has acknowledged the Italian customer terms of service", + "deprecated": true, + "description": "deprecated. whether account has acknowledged the Italian customer terms of service", "example": "affirmatively_accepted", "readOnly": true, "type": [ @@ -388,7 +400,8 @@ ] }, "italian_partner_terms": { - "description": "whether account has acknowledged the Italian provider terms of service", + "deprecated": true, + "description": "deprecated. whether account has acknowledged the Italian provider terms of service", "example": "affirmatively_accepted", "readOnly": true, "type": [ @@ -620,6 +633,9 @@ "italian_partner_terms": { "$ref": "#/definitions/account/definitions/italian_partner_terms" }, + "country_of_residence": { + "$ref": "#/definitions/account/definitions/country_of_residence" + }, "default_organization": { "description": "team selected by default", "properties": { @@ -4246,12 +4262,24 @@ }, "month": { "description": "month of the archive", - "example": 10, + "enum": [ + "01", + "02", + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "12" + ], + "example": "10", "readOnly": true, - "minimum": 1, - "maximum": 12, "type": [ - "integer" + "string" ] }, "year": { @@ -4348,13 +4376,6 @@ "string" ] }, - "identity": { - "anyOf": [ - { - "$ref": "#/definitions/audit-trail-event/definitions/id" - } - ] - }, "type": { "description": "type of event", "readOnly": true, @@ -4503,7 +4524,7 @@ }, "links": [ { - "description": "List existing events.", + "description": "List existing events. Returns all events for one date, defaulting to current date. Order, actor, action, and type, and date query params can be specified as query parameters. For example, '/enterprise-accounts/:id/events?order=desc&actor=user@example.com&action=create&type=app&date=2020-09-30' would return events in descending order and only return app created events by the user with user@example.com email address.", "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fidentity)}/events", "method": "GET", "rel": "instances", @@ -6153,6 +6174,170 @@ } } }, + "enterprise-account-daily-usage": { + "$schema": "http://json-schema.org/draft-04/hyper-schema", + "description": "Usage for an enterprise account at a daily resolution.", + "stability": "development", + "strictProperties": true, + "title": "Heroku Platform API - Enterprise Account Daily Usage", + "type": [ + "object" + ], + "definitions": { + "addons": { + "description": "total add-on credits used", + "example": 250.0, + "readOnly": true, + "type": [ + "number" + ] + }, + "data": { + "description": "total add-on credits used for first party add-ons", + "example": 34.89, + "readOnly": true, + "type": [ + "number" + ] + }, + "date": { + "description": "date of the usage", + "example": "2019-01-01", + "format": "date", + "readOnly": true, + "type": [ + "string" + ] + }, + "dynos": { + "description": "dynos used", + "example": 1.548, + "readOnly": true, + "type": [ + "number" + ] + }, + "id": { + "description": "enterprise account identifier", + "example": "01234567-89ab-cdef-0123-456789abcdef", + "format": "uuid", + "readOnly": true, + "type": [ + "string" + ] + }, + "name": { + "description": "name of the enterprise account", + "example": "example-co", + "readOnly": true, + "type": [ + "string" + ] + }, + "partner": { + "description": "total add-on credits used for third party add-ons", + "example": 12.34, + "readOnly": true, + "type": [ + "number" + ] + }, + "space": { + "description": "space credits used", + "example": 1.548, + "readOnly": true, + "type": [ + "number" + ] + } + }, + "links": [ + { + "description": "Retrieves usage for an enterprise account for a range of days. Start and end dates can be specified as query parameters using the date format, YYYY-MM-DD format. For example, '/enterprise-accounts/example-account/usage/daily?start=2019-01-01&end=2019-01-31' specifies all days in January for 2019.", + "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fid)}/usage/daily", + "method": "GET", + "rel": "instances", + "title": "Info", + "targetSchema": { + "items": { + "$ref": "#/definitions/enterprise-account-daily-usage" + }, + "type": [ + "array" + ] + } + } + ], + "properties": { + "addons": { + "$ref": "#/definitions/enterprise-account-daily-usage/definitions/addons" + }, + "teams": { + "description": "usage by team", + "type": [ + "array" + ], + "items": { + "type": [ + "object" + ], + "properties": { + "addons": { + "$ref": "#/definitions/team-daily-usage/definitions/addons" + }, + "apps": { + "description": "app usage in the team", + "type": [ + "array" + ], + "items": { + "$ref": "#/definitions/team-daily-usage/definitions/app_usage_daily" + } + }, + "data": { + "$ref": "#/definitions/team-daily-usage/definitions/data" + }, + "dynos": { + "$ref": "#/definitions/team-daily-usage/definitions/dynos" + }, + "id": { + "$ref": "#/definitions/team-daily-usage/definitions/id" + }, + "name": { + "$ref": "#/definitions/team-daily-usage/definitions/name" + }, + "partner": { + "$ref": "#/definitions/team-daily-usage/definitions/partner" + }, + "space": { + "$ref": "#/definitions/team-daily-usage/definitions/space" + } + } + } + }, + "data": { + "$ref": "#/definitions/enterprise-account-daily-usage/definitions/data" + }, + "date": { + "$ref": "#/definitions/enterprise-account-daily-usage/definitions/date" + }, + "dynos": { + "$ref": "#/definitions/enterprise-account-daily-usage/definitions/dynos" + }, + "id": { + "$ref": "#/definitions/enterprise-account-daily-usage/definitions/id" + }, + "name": { + "$ref": "#/definitions/enterprise-account-daily-usage/definitions/name" + }, + "partner": { + "$ref": "#/definitions/enterprise-account-daily-usage/definitions/partner" + }, + "space": { + "$ref": "#/definitions/enterprise-account-daily-usage/definitions/space" + } + } + }, "enterprise-account-member": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "Enterprise account members are users with access to an enterprise account.", @@ -6406,12 +6591,12 @@ } } }, - "enterprise-account-usage-daily": { + "enterprise-account-monthly-usage": { "$schema": "http://json-schema.org/draft-04/hyper-schema", - "description": "Usage for an enterprise account at a daily resolution.", + "description": "Usage for an enterprise account at a monthly resolution.", "stability": "development", "strictProperties": true, - "title": "Heroku Platform API - Enterprise Account Daily Usage", + "title": "Heroku Platform API - Enterprise Account Monthly Usage", "type": [ "object" ], @@ -6424,21 +6609,20 @@ "number" ] }, - "data": { - "description": "total add-on credits used for first party add-ons", - "example": 34.89, + "connect": { + "description": "average connect rows synced", + "example": 15000, "readOnly": true, "type": [ "number" ] }, - "date": { - "description": "date of the usage", - "example": "2019-01-01", - "format": "date", + "data": { + "description": "total add-on credits used for first party add-ons", + "example": 34.89, "readOnly": true, "type": [ - "string" + "number" ] }, "dynos": { @@ -6449,6 +6633,15 @@ "number" ] }, + "month": { + "description": "year and month of the usage", + "example": "2019-01", + "pattern": "^[0-9]{4}-[0-9]{2}$", + "readOnly": true, + "type": [ + "string" + ] + }, "id": { "description": "enterprise account identifier", "example": "01234567-89ab-cdef-0123-456789abcdef", @@ -6485,14 +6678,14 @@ }, "links": [ { - "description": "Retrieves usage for an enterprise account for a range of days. Start and end dates can be specified as query parameters using the date format, YYYY-MM-DD format. For example, '/enterprise-accounts/example-account/usage/daily?start=2019-01-01&end=2019-01-31' specifies all days in January for 2019.", - "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fid)}/usage/daily", + "description": "Retrieves usage for an enterprise account for a range of months. Start and end dates can be specified as query parameters using the date format, YYYY-MM format. For example, '/enterprise-accounts/example-account/usage/monthly?start=2019-01&end=2019-02' specifies usage in January and February for 2019. If no end date is specified, one month of usage is returned.", + "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fid)}/usage/monthly", "method": "GET", - "title": "Info", "rel": "instances", + "title": "Info", "targetSchema": { "items": { - "$ref": "#/definitions/enterprise-account-usage-daily" + "$ref": "#/definitions/enterprise-account-monthly-usage" }, "type": [ "array" @@ -6502,7 +6695,7 @@ ], "properties": { "addons": { - "$ref": "#/definitions/enterprise-account-usage-daily/definitions/addons" + "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/addons" }, "teams": { "description": "usage by team", @@ -6515,7 +6708,7 @@ ], "properties": { "addons": { - "$ref": "#/definitions/team-usage-daily/definitions/addons" + "$ref": "#/definitions/team-monthly-usage/definitions/addons" }, "apps": { "description": "app usage in the team", @@ -6523,272 +6716,100 @@ "array" ], "items": { - "$ref": "#/definitions/team-usage-daily/definitions/app_usage_daily" + "$ref": "#/definitions/team-monthly-usage/definitions/app_usage_monthly" } }, + "connect": { + "$ref": "#/definitions/team-monthly-usage/definitions/connect" + }, "data": { - "$ref": "#/definitions/team-usage-daily/definitions/data" + "$ref": "#/definitions/team-monthly-usage/definitions/data" }, "dynos": { - "$ref": "#/definitions/team-usage-daily/definitions/dynos" + "$ref": "#/definitions/team-monthly-usage/definitions/dynos" }, "id": { - "$ref": "#/definitions/team-usage-daily/definitions/id" + "$ref": "#/definitions/team-monthly-usage/definitions/id" }, "name": { - "$ref": "#/definitions/team-usage-daily/definitions/name" + "$ref": "#/definitions/team-monthly-usage/definitions/name" }, "partner": { - "$ref": "#/definitions/team-usage-daily/definitions/partner" + "$ref": "#/definitions/team-monthly-usage/definitions/partner" }, "space": { - "$ref": "#/definitions/team-usage-daily/definitions/space" + "$ref": "#/definitions/team-monthly-usage/definitions/space" } } } }, - "data": { - "$ref": "#/definitions/enterprise-account-usage-daily/definitions/data" + "connect": { + "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/connect" }, - "date": { - "$ref": "#/definitions/enterprise-account-usage-daily/definitions/date" + "data": { + "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/data" }, "dynos": { - "$ref": "#/definitions/enterprise-account-usage-daily/definitions/dynos" + "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/dynos" }, "id": { - "$ref": "#/definitions/enterprise-account-usage-daily/definitions/id" + "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/id" + }, + "month": { + "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/month" }, "name": { - "$ref": "#/definitions/enterprise-account-usage-daily/definitions/name" + "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/name" }, "partner": { - "$ref": "#/definitions/enterprise-account-usage-daily/definitions/partner" + "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/partner" }, "space": { - "$ref": "#/definitions/enterprise-account-usage-daily/definitions/space" + "$ref": "#/definitions/enterprise-account-monthly-usage/definitions/space" } } }, - "enterprise-account-usage-monthly": { + "enterprise-account": { "$schema": "http://json-schema.org/draft-04/hyper-schema", - "description": "Usage for an enterprise account at a monthly resolution.", + "description": "Enterprise accounts allow companies to manage their development teams and billing.", "stability": "development", "strictProperties": true, - "title": "Heroku Platform API - Enterprise Account Monthly Usage", + "title": "Heroku Platform API - Enterprise Account", "type": [ "object" ], "definitions": { - "addons": { - "description": "total add-on credits used", - "example": 250.0, + "created_at": { + "description": "when the enterprise account was created", + "example": "2012-01-01T12:00:00Z", + "format": "date-time", "readOnly": true, "type": [ - "number" + "string" ] }, - "connect": { - "description": "average connect rows synced", - "example": 15000, + "id": { + "description": "unique identifier of the enterprise account", + "example": "01234567-89ab-cdef-0123-456789abcdef", + "format": "uuid", "readOnly": true, "type": [ - "number" + "string" ] }, - "data": { - "description": "total add-on credits used for first party add-ons", - "example": 34.89, - "readOnly": true, - "type": [ - "number" + "identity": { + "anyOf": [ + { + "$ref": "#/definitions/enterprise-account/definitions/id" + } ] }, - "dynos": { - "description": "dynos used", - "example": 1.548, + "name": { + "description": "unique name of the enterprise account", + "example": "example", "readOnly": true, "type": [ - "number" - ] - }, - "month": { - "description": "year and month of the usage", - "example": "2019-01", - "pattern": "^[0-9]{4}-[0-9]{2}$", - "readOnly": true, - "type": [ - "string" - ] - }, - "id": { - "description": "enterprise account identifier", - "example": "01234567-89ab-cdef-0123-456789abcdef", - "format": "uuid", - "readOnly": true, - "type": [ - "string" - ] - }, - "name": { - "description": "name of the enterprise account", - "example": "example-co", - "readOnly": true, - "type": [ - "string" - ] - }, - "partner": { - "description": "total add-on credits used for third party add-ons", - "example": 12.34, - "readOnly": true, - "type": [ - "number" - ] - }, - "space": { - "description": "space credits used", - "example": 1.548, - "readOnly": true, - "type": [ - "number" - ] - } - }, - "links": [ - { - "description": "Retrieves usage for an enterprise account for a range of months. Start and end dates can be specified as query parameters using the date format, YYYY-MM format. For example, '/enterprise-accounts/example-account/usage/monthly?start=2019-01&end=2019-02' specifies usage in January and February for 2019. If no end date is specified, one month of usage is returned.", - "href": "/enterprise-accounts/{(%23%2Fdefinitions%2Fenterprise-account%2Fdefinitions%2Fid)}/usage/monthly", - "method": "GET", - "rel": "instances", - "title": "Info", - "targetSchema": { - "items": { - "$ref": "#/definitions/enterprise-account-usage-monthly" - }, - "type": [ - "array" - ] - } - } - ], - "properties": { - "addons": { - "$ref": "#/definitions/enterprise-account-usage-monthly/definitions/addons" - }, - "teams": { - "description": "usage by team", - "type": [ - "array" - ], - "items": { - "type": [ - "object" - ], - "properties": { - "addons": { - "$ref": "#/definitions/team-usage-monthly/definitions/addons" - }, - "apps": { - "description": "app usage in the team", - "type": [ - "array" - ], - "items": { - "$ref": "#/definitions/team-usage-monthly/definitions/app_usage_monthly" - } - }, - "connect": { - "$ref": "#/definitions/team-usage-monthly/definitions/connect" - }, - "data": { - "$ref": "#/definitions/team-usage-monthly/definitions/data" - }, - "dynos": { - "$ref": "#/definitions/team-usage-monthly/definitions/dynos" - }, - "id": { - "$ref": "#/definitions/team-usage-monthly/definitions/id" - }, - "name": { - "$ref": "#/definitions/team-usage-monthly/definitions/name" - }, - "partner": { - "$ref": "#/definitions/team-usage-monthly/definitions/partner" - }, - "space": { - "$ref": "#/definitions/team-usage-monthly/definitions/space" - } - } - } - }, - "connect": { - "$ref": "#/definitions/enterprise-account-usage-monthly/definitions/connect" - }, - "data": { - "$ref": "#/definitions/enterprise-account-usage-monthly/definitions/data" - }, - "dynos": { - "$ref": "#/definitions/enterprise-account-usage-monthly/definitions/dynos" - }, - "id": { - "$ref": "#/definitions/enterprise-account-usage-monthly/definitions/id" - }, - "month": { - "$ref": "#/definitions/enterprise-account-usage-monthly/definitions/month" - }, - "name": { - "$ref": "#/definitions/enterprise-account-usage-monthly/definitions/name" - }, - "partner": { - "$ref": "#/definitions/enterprise-account-usage-monthly/definitions/partner" - }, - "space": { - "$ref": "#/definitions/enterprise-account-usage-monthly/definitions/space" - } - } - }, - "enterprise-account": { - "$schema": "http://json-schema.org/draft-04/hyper-schema", - "description": "Enterprise accounts allow companies to manage their development teams and billing.", - "stability": "development", - "strictProperties": true, - "title": "Heroku Platform API - Enterprise Account", - "type": [ - "object" - ], - "definitions": { - "created_at": { - "description": "when the enterprise account was created", - "example": "2012-01-01T12:00:00Z", - "format": "date-time", - "readOnly": true, - "type": [ - "string" - ] - }, - "id": { - "description": "unique identifier of the enterprise account", - "example": "01234567-89ab-cdef-0123-456789abcdef", - "format": "uuid", - "readOnly": true, - "type": [ - "string" - ] - }, - "identity": { - "anyOf": [ - { - "$ref": "#/definitions/enterprise-account/definitions/id" - } - ] - }, - "name": { - "description": "unique name of the enterprise account", - "example": "example", - "readOnly": true, - "type": [ - "string" + "string" ] }, "updated_at": { @@ -9787,7 +9808,7 @@ "links": [ { "description": "List latest builds for each app in a pipeline", - "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fidentity)}/latest-builds", + "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/latest-builds", "method": "GET", "rel": "instances", "targetSchema": { @@ -10137,7 +10158,7 @@ "links": [ { "description": "List latest slug releases for each app in a pipeline", - "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fidentity)}/latest-deployments", + "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/latest-deployments", "method": "GET", "rel": "instances", "targetSchema": { @@ -10486,7 +10507,7 @@ "links": [ { "description": "List latest releases for each app in a pipeline", - "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fidentity)}/latest-releases", + "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/latest-releases", "method": "GET", "rel": "instances", "targetSchema": { @@ -10513,7 +10534,7 @@ "links": [ { "description": "The stack for a given pipeline, used for CI and Review Apps that have no stack defined in app.json.", - "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fidentity)}/pipeline-stack", + "href": "/pipelines/{(%23%2Fdefinitions%2Fpipeline%2Fdefinitions%2Fid)}/pipeline-stack", "method": "GET", "rel": "self", "targetSchema": { @@ -12532,14 +12553,6 @@ "string" ] }, - "cname": { - "description": "deprecated; refer to GET /apps/:id/domains for valid CNAMEs for this app", - "example": "example.herokussl.com", - "readOnly": false, - "type": [ - "string" - ] - }, "created_at": { "description": "when endpoint was created", "example": "2012-01-01T12:00:00Z", @@ -12593,6 +12606,26 @@ "type": [ "string" ] + }, + "domains": { + "description": "domains associated with this SSL certificate", + "type": [ + "array" + ], + "readOnly": true, + "items": { + "$ref": "#/definitions/domain/definitions/id" + } + }, + "display_name": { + "description": "unique name for SSL certificate", + "example": "example", + "pattern": "^[a-z][a-z0-9-]{2,29}$", + "readOnly": false, + "type": [ + "string", + "null" + ] } }, "links": [ @@ -12690,9 +12723,6 @@ "certificate_chain": { "$ref": "#/definitions/sni-endpoint/definitions/certificate_chain" }, - "cname": { - "$ref": "#/definitions/sni-endpoint/definitions/cname" - }, "created_at": { "$ref": "#/definitions/sni-endpoint/definitions/created_at" }, @@ -12704,6 +12734,65 @@ }, "updated_at": { "$ref": "#/definitions/sni-endpoint/definitions/updated_at" + }, + "display_name": { + "$ref": "#/definitions/sni-endpoint/definitions/display_name" + }, + "domains": { + "$ref": "#/definitions/sni-endpoint/definitions/domains" + }, + "app": { + "description": "application that this SSL certificate is on", + "properties": { + "id": { + "$ref": "#/definitions/app/definitions/id" + }, + "name": { + "$ref": "#/definitions/app/definitions/name" + } + }, + "strictProperties": true, + "type": [ + "object" + ] + }, + "ssl_cert": { + "description": "certificate provided by this endpoint", + "type": [ + "object" + ], + "properties": { + "ca_signed?": { + "$ref": "#/definitions/ssl-endpoint/definitions/ca_signed?" + }, + "cert_domains": { + "$ref": "#/definitions/ssl-endpoint/definitions/cert_domains" + }, + "expires_at": { + "$ref": "#/definitions/ssl-endpoint/definitions/expires_at" + }, + "issuer": { + "$ref": "#/definitions/ssl-endpoint/definitions/issuer" + }, + "self_signed?": { + "$ref": "#/definitions/ssl-endpoint/definitions/self_signed?" + }, + "starts_at": { + "$ref": "#/definitions/ssl-endpoint/definitions/starts_at" + }, + "subject": { + "$ref": "#/definitions/ssl-endpoint/definitions/subject" + }, + "id": { + "description": "unique identifier of this SSL certificate", + "example": "01234567-89ab-cdef-0123-456789abcdef", + "format": "uuid", + "readOnly": true, + "type": [ + "string" + ] + } + } } } }, @@ -13187,7 +13276,7 @@ ] }, "space": { - "description": "A space is an isolated, highly available, secure app execution environments, running in the modern VPC substrate.", + "description": "A space is an isolated, highly available, secure app execution environment.", "$schema": "http://json-schema.org/draft-04/hyper-schema", "stability": "prototype", "strictProperties": true, @@ -13504,7 +13593,8 @@ "pattern": "^[a-z][a-z0-9-]{2,29}$", "readOnly": false, "type": [ - "string" + "string", + "null" ] }, "expires_at": { @@ -14463,23 +14553,176 @@ } } }, - "team-feature": { - "description": "A team feature represents a feature enabled on a team account.", + "team-daily-usage": { "$schema": "http://json-schema.org/draft-04/hyper-schema", + "description": "Usage for an enterprise team at a daily resolution.", "stability": "development", "strictProperties": true, - "title": "Heroku Platform API - Team Feature", + "title": "Heroku Platform API - Team Daily Usage", "type": [ "object" ], "definitions": { - "created_at": { - "description": "when team feature was created", - "example": "2012-01-01T12:00:00Z", - "format": "date-time", + "addons": { + "description": "total add-on credits used", + "example": 250.0, "readOnly": true, "type": [ - "string" + "number" + ] + }, + "app_usage_daily": { + "description": "Usage for an app at a daily resolution.", + "type": [ + "object" + ], + "properties": { + "addons": { + "$ref": "#/definitions/team-daily-usage/definitions/addons" + }, + "app_name": { + "$ref": "#/definitions/app/definitions/name" + }, + "data": { + "$ref": "#/definitions/team-daily-usage/definitions/data" + }, + "dynos": { + "$ref": "#/definitions/team-daily-usage/definitions/dynos" + }, + "partner": { + "$ref": "#/definitions/team-daily-usage/definitions/partner" + } + } + }, + "data": { + "description": "total add-on credits used for first party add-ons", + "example": 34.89, + "readOnly": true, + "type": [ + "number" + ] + }, + "date": { + "description": "date of the usage", + "example": "2019-01-01", + "format": "date", + "readOnly": true, + "type": [ + "string" + ] + }, + "dynos": { + "description": "dynos used", + "example": 1.548, + "readOnly": true, + "type": [ + "number" + ] + }, + "id": { + "description": "team identifier", + "example": "01234567-89ab-cdef-0123-456789abcdef", + "format": "uuid", + "readOnly": true, + "type": [ + "string" + ] + }, + "name": { + "description": "name of the team", + "example": "ops", + "readOnly": true, + "type": [ + "string" + ] + }, + "partner": { + "description": "total add-on credits used for third party add-ons", + "example": 12.34, + "readOnly": true, + "type": [ + "number" + ] + }, + "space": { + "description": "space credits used", + "example": 1.548, + "readOnly": true, + "type": [ + "number" + ] + } + }, + "links": [ + { + "description": "Retrieves usage for an enterprise team for a range of days. Start and end dates can be specified as query parameters using the date format, YYYY-MM-DD format. For example, '/teams/example-team/usage/daily?start=2019-01-01&end=2019-01-31' specifies all days in January for 2019.", + "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fid)}/usage/daily", + "method": "GET", + "title": "Info", + "rel": "instances", + "targetSchema": { + "items": { + "$ref": "#/definitions/team-daily-usage" + }, + "type": [ + "array" + ] + } + } + ], + "properties": { + "addons": { + "$ref": "#/definitions/team-daily-usage/definitions/addons" + }, + "apps": { + "description": "app usage in the team", + "type": [ + "array" + ], + "items": { + "$ref": "#/definitions/team-daily-usage/definitions/app_usage_daily" + } + }, + "data": { + "$ref": "#/definitions/team-daily-usage/definitions/data" + }, + "date": { + "$ref": "#/definitions/team-daily-usage/definitions/date" + }, + "dynos": { + "$ref": "#/definitions/team-daily-usage/definitions/dynos" + }, + "id": { + "$ref": "#/definitions/team-daily-usage/definitions/id" + }, + "name": { + "$ref": "#/definitions/team-daily-usage/definitions/name" + }, + "partner": { + "$ref": "#/definitions/team-daily-usage/definitions/partner" + }, + "space": { + "$ref": "#/definitions/team-daily-usage/definitions/space" + } + } + }, + "team-feature": { + "description": "A team feature represents a feature enabled on a team account.", + "$schema": "http://json-schema.org/draft-04/hyper-schema", + "stability": "development", + "strictProperties": true, + "title": "Heroku Platform API - Team Feature", + "type": [ + "object" + ], + "definitions": { + "created_at": { + "description": "when team feature was created", + "example": "2012-01-01T12:00:00Z", + "format": "date-time", + "readOnly": true, + "type": [ + "string" ] }, "description": { @@ -15330,296 +15573,22 @@ "properties": { "email": { "$ref": "#/definitions/account/definitions/email" - }, - "id": { - "$ref": "#/definitions/account/definitions/id" - }, - "name": { - "$ref": "#/definitions/account/definitions/name" - } - }, - "strictProperties": true, - "type": [ - "object" - ] - } - } - }, - "team-preferences": { - "description": "Tracks a Team's Preferences", - "$schema": "http://json-schema.org/draft-04/hyper-schema", - "stability": "development", - "strictProperties": true, - "title": "Heroku Platform API - Team Preferences", - "type": [ - "object" - ], - "definitions": { - "default-permission": { - "description": "The default permission used when adding new members to the team", - "example": "member", - "readOnly": false, - "enum": [ - "admin", - "member", - "viewer", - null - ], - "type": [ - "null", - "string" - ] - }, - "identity": { - "$ref": "#/definitions/team/definitions/identity" - }, - "whitelisting-enabled": { - "description": "Whether whitelisting rules should be applied to add-on installations", - "example": true, - "readOnly": false, - "type": [ - "boolean", - "null" - ] - }, - "addons-controls": { - "description": "Whether add-on service rules should be applied to add-on installations", - "example": true, - "readOnly": false, - "type": [ - "boolean", - "null" - ] - } - }, - "links": [ - { - "description": "Retrieve Team Preferences", - "href": "/teams/{(%23%2Fdefinitions%2Fteam-preferences%2Fdefinitions%2Fidentity)}/preferences", - "method": "GET", - "rel": "self", - "targetSchema": { - "$ref": "#/definitions/team-preferences" - }, - "title": "List" - }, - { - "description": "Update Team Preferences", - "href": "/teams/{(%23%2Fdefinitions%2Fteam-preferences%2Fdefinitions%2Fidentity)}/preferences", - "method": "PATCH", - "rel": "update", - "schema": { - "type": [ - "object" - ], - "properties": { - "whitelisting-enabled": { - "$ref": "#/definitions/team-preferences/definitions/whitelisting-enabled" - }, - "addons-controls": { - "$ref": "#/definitions/team-preferences/definitions/addons-controls" - } - } - }, - "targetSchema": { - "$ref": "#/definitions/team-preferences" - }, - "title": "Update" - } - ], - "properties": { - "default-permission": { - "$ref": "#/definitions/team-preferences/definitions/default-permission" - }, - "whitelisting-enabled": { - "$ref": "#/definitions/team-preferences/definitions/whitelisting-enabled" - }, - "addons-controls": { - "$ref": "#/definitions/team-preferences/definitions/addons-controls" - } - } - }, - "team-space": { - "description": "A space is an isolated, highly available, secure app execution environments, running in the modern VPC substrate.", - "$schema": "http://json-schema.org/draft-04/hyper-schema", - "stability": "prototype", - "strictProperties": true, - "title": "Heroku Platform API - Space", - "type": [ - "object" - ], - "links": [ - { - "description": "List spaces owned by the team", - "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/spaces", - "method": "GET", - "rel": "instances", - "targetSchema": { - "items": { - "$ref": "#/definitions/space" - }, - "type": [ - "array" - ] - }, - "title": "List" - } - ] - }, - "team-usage-daily": { - "$schema": "http://json-schema.org/draft-04/hyper-schema", - "description": "Usage for an enterprise team at a daily resolution.", - "stability": "development", - "strictProperties": true, - "title": "Heroku Platform API - Team Daily Usage", - "type": [ - "object" - ], - "definitions": { - "addons": { - "description": "total add-on credits used", - "example": 250.0, - "readOnly": true, - "type": [ - "number" - ] - }, - "app_usage_daily": { - "description": "Usage for an app at a daily resolution.", - "type": [ - "object" - ], - "properties": { - "addons": { - "$ref": "#/definitions/team-usage-daily/definitions/addons" - }, - "app_name": { - "$ref": "#/definitions/app/definitions/name" - }, - "data": { - "$ref": "#/definitions/team-usage-daily/definitions/data" - }, - "dynos": { - "$ref": "#/definitions/team-usage-daily/definitions/dynos" - }, - "partner": { - "$ref": "#/definitions/team-usage-daily/definitions/partner" - } - } - }, - "data": { - "description": "total add-on credits used for first party add-ons", - "example": 34.89, - "readOnly": true, - "type": [ - "number" - ] - }, - "date": { - "description": "date of the usage", - "example": "2019-01-01", - "format": "date", - "readOnly": true, - "type": [ - "string" - ] - }, - "dynos": { - "description": "dynos used", - "example": 1.548, - "readOnly": true, - "type": [ - "number" - ] - }, - "id": { - "description": "team identifier", - "example": "01234567-89ab-cdef-0123-456789abcdef", - "format": "uuid", - "readOnly": true, - "type": [ - "string" - ] - }, - "name": { - "description": "name of the team", - "example": "ops", - "readOnly": true, - "type": [ - "string" - ] - }, - "partner": { - "description": "total add-on credits used for third party add-ons", - "example": 12.34, - "readOnly": true, - "type": [ - "number" - ] - }, - "space": { - "description": "space credits used", - "example": 1.548, - "readOnly": true, - "type": [ - "number" - ] - } - }, - "links": [ - { - "description": "Retrieves usage for an enterprise team for a range of days. Start and end dates can be specified as query parameters using the date format, YYYY-MM-DD format. For example, '/teams/example-team/usage?start=2019-01-01&end=2019-01-31' specifies all days in January for 2019.", - "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fid)}/usage/daily", - "method": "GET", - "title": "Info", - "rel": "instances", - "targetSchema": { - "items": { - "$ref": "#/definitions/team-usage-daily" - }, - "type": [ - "array" - ] - } - } - ], - "properties": { - "addons": { - "$ref": "#/definitions/team-usage-daily/definitions/addons" - }, - "apps": { - "description": "app usage in the team", - "type": [ - "array" - ], - "items": { - "$ref": "#/definitions/team-usage-daily/definitions/app_usage_daily" - } - }, - "data": { - "$ref": "#/definitions/team-usage-daily/definitions/data" - }, - "date": { - "$ref": "#/definitions/team-usage-daily/definitions/date" - }, - "dynos": { - "$ref": "#/definitions/team-usage-daily/definitions/dynos" - }, - "id": { - "$ref": "#/definitions/team-usage-daily/definitions/id" - }, - "name": { - "$ref": "#/definitions/team-usage-daily/definitions/name" - }, - "partner": { - "$ref": "#/definitions/team-usage-daily/definitions/partner" - }, - "space": { - "$ref": "#/definitions/team-usage-daily/definitions/space" + }, + "id": { + "$ref": "#/definitions/account/definitions/id" + }, + "name": { + "$ref": "#/definitions/account/definitions/name" + } + }, + "strictProperties": true, + "type": [ + "object" + ] } } }, - "team-usage-monthly": { + "team-monthly-usage": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "Usage for an enterprise team at a monthly resolution.", "stability": "development", @@ -15644,19 +15613,19 @@ ], "properties": { "addons": { - "$ref": "#/definitions/team-usage-monthly/definitions/addons" + "$ref": "#/definitions/team-monthly-usage/definitions/addons" }, "app_name": { "$ref": "#/definitions/app/definitions/name" }, "data": { - "$ref": "#/definitions/team-usage-monthly/definitions/data" + "$ref": "#/definitions/team-monthly-usage/definitions/data" }, "dynos": { - "$ref": "#/definitions/team-usage-monthly/definitions/dynos" + "$ref": "#/definitions/team-monthly-usage/definitions/dynos" }, "partner": { - "$ref": "#/definitions/team-usage-monthly/definitions/partner" + "$ref": "#/definitions/team-monthly-usage/definitions/partner" } } }, @@ -15729,14 +15698,14 @@ }, "links": [ { - "description": "Retrieves usage for an enterprise team for a range of months. Start and end dates can be specified as query parameters using the date format, YYYY-MM format. For example, '/teams/example-team/usage?start=2019-01&end=2019-02' specifies usage in January and February for 2019. If no end date is specified, one month of usage is returned.", + "description": "Retrieves usage for an enterprise team for a range of months. Start and end dates can be specified as query parameters using the date format, YYYY-MM format. For example, '/teams/example-team/usage/monthly?start=2019-01&end=2019-02' specifies usage in January and February for 2019. If no end date is specified, one month of usage is returned.", "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fid)}/usage/monthly", "method": "GET", - "rel": "instances", "title": "Info", + "rel": "instances", "targetSchema": { "items": { - "$ref": "#/definitions/team-usage-monthly" + "$ref": "#/definitions/team-monthly-usage" }, "type": [ "array" @@ -15746,7 +15715,7 @@ ], "properties": { "addons": { - "$ref": "#/definitions/team-usage-monthly/definitions/addons" + "$ref": "#/definitions/team-monthly-usage/definitions/addons" }, "apps": { "description": "app usage in the team", @@ -15754,35 +15723,141 @@ "array" ], "items": { - "$ref": "#/definitions/team-usage-monthly/definitions/app_usage_monthly" + "$ref": "#/definitions/team-monthly-usage/definitions/app_usage_monthly" } }, "connect": { - "$ref": "#/definitions/team-usage-monthly/definitions/connect" + "$ref": "#/definitions/team-monthly-usage/definitions/connect" }, "data": { - "$ref": "#/definitions/team-usage-monthly/definitions/data" + "$ref": "#/definitions/team-monthly-usage/definitions/data" }, "dynos": { - "$ref": "#/definitions/team-usage-monthly/definitions/dynos" + "$ref": "#/definitions/team-monthly-usage/definitions/dynos" }, "id": { - "$ref": "#/definitions/team-usage-monthly/definitions/id" + "$ref": "#/definitions/team-monthly-usage/definitions/id" }, "month": { - "$ref": "#/definitions/team-usage-monthly/definitions/month" + "$ref": "#/definitions/team-monthly-usage/definitions/month" }, "name": { - "$ref": "#/definitions/team-usage-monthly/definitions/name" + "$ref": "#/definitions/team-monthly-usage/definitions/name" }, "partner": { - "$ref": "#/definitions/team-usage-monthly/definitions/partner" + "$ref": "#/definitions/team-monthly-usage/definitions/partner" }, "space": { - "$ref": "#/definitions/team-usage-monthly/definitions/space" + "$ref": "#/definitions/team-monthly-usage/definitions/space" + } + } + }, + "team-preferences": { + "description": "Tracks a Team's Preferences", + "$schema": "http://json-schema.org/draft-04/hyper-schema", + "stability": "development", + "strictProperties": true, + "title": "Heroku Platform API - Team Preferences", + "type": [ + "object" + ], + "definitions": { + "default-permission": { + "description": "The default permission used when adding new members to the team", + "example": "member", + "readOnly": false, + "enum": [ + "admin", + "member", + "viewer", + null + ], + "type": [ + "null", + "string" + ] + }, + "identity": { + "$ref": "#/definitions/team/definitions/identity" + }, + "addons-controls": { + "description": "Whether add-on service rules should be applied to add-on installations", + "example": true, + "readOnly": false, + "type": [ + "boolean", + "null" + ] + } + }, + "links": [ + { + "description": "Retrieve Team Preferences", + "href": "/teams/{(%23%2Fdefinitions%2Fteam-preferences%2Fdefinitions%2Fidentity)}/preferences", + "method": "GET", + "rel": "self", + "targetSchema": { + "$ref": "#/definitions/team-preferences" + }, + "title": "List" + }, + { + "description": "Update Team Preferences", + "href": "/teams/{(%23%2Fdefinitions%2Fteam-preferences%2Fdefinitions%2Fidentity)}/preferences", + "method": "PATCH", + "rel": "update", + "schema": { + "type": [ + "object" + ], + "properties": { + "addons-controls": { + "$ref": "#/definitions/team-preferences/definitions/addons-controls" + } + } + }, + "targetSchema": { + "$ref": "#/definitions/team-preferences" + }, + "title": "Update" + } + ], + "properties": { + "default-permission": { + "$ref": "#/definitions/team-preferences/definitions/default-permission" + }, + "addons-controls": { + "$ref": "#/definitions/team-preferences/definitions/addons-controls" } } }, + "team-space": { + "description": "A space is an isolated, highly available, secure app execution environment.", + "$schema": "http://json-schema.org/draft-04/hyper-schema", + "stability": "prototype", + "strictProperties": true, + "title": "Heroku Platform API - Team Space", + "type": [ + "object" + ], + "links": [ + { + "description": "List spaces owned by the team", + "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/spaces", + "method": "GET", + "rel": "instances", + "targetSchema": { + "items": { + "$ref": "#/definitions/space" + }, + "type": [ + "array" + ] + }, + "title": "List" + } + ] + }, "team": { "$schema": "http://json-schema.org/draft-04/hyper-schema", "description": "Teams allow you to manage access to a shared group of applications and other resources.", @@ -17361,159 +17436,31 @@ "$ref": "#/definitions/vpn-connection" }, "title": "Info" - } - ] - }, - "whitelisted-add-on-service": { - "description": "Entities that have been whitelisted to be used by an Team", - "$schema": "http://json-schema.org/draft-04/hyper-schema", - "stability": "prototype", - "strictProperties": true, - "title": "Heroku Platform API - Whitelisted Entity", - "type": [ - "object" - ], - "definitions": { - "added_at": { - "description": "when the add-on service was whitelisted", - "example": "2012-01-01T12:00:00Z", - "format": "date-time", - "readOnly": true, - "type": [ - "string" - ] - }, - "added_by": { - "description": "the user which whitelisted the Add-on Service", - "properties": { - "email": { - "$ref": "#/definitions/account/definitions/email", - "type": [ - "string", - "null" - ] - }, - "id": { - "$ref": "#/definitions/account/definitions/id", - "type": [ - "string", - "null" - ] - } - }, - "readOnly": true, - "type": [ - "object" - ] - }, - "addon_service": { - "description": "the Add-on Service whitelisted for use", - "properties": { - "id": { - "$ref": "#/definitions/add-on-service/definitions/id" - }, - "name": { - "$ref": "#/definitions/add-on-service/definitions/name" - }, - "human_name": { - "$ref": "#/definitions/add-on-service/definitions/human_name" - } - }, - "readOnly": true, - "type": [ - "object" - ] - }, - "id": { - "description": "unique identifier for this whitelisting entity", - "example": "01234567-89ab-cdef-0123-456789abcdef", - "format": "uuid", - "readOnly": true, - "type": [ - "string" - ] - }, - "identity": { - "anyOf": [ - { - "$ref": "#/definitions/whitelisted-add-on-service/definitions/id" - }, - { - "$ref": "#/definitions/add-on-service/definitions/name" - } - ] - } - }, - "links": [ - { - "description": "List all whitelisted Add-on Services for an Team", - "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/whitelisted-addon-services", - "method": "GET", - "rel": "instances", - "targetSchema": { - "items": { - "$ref": "#/definitions/whitelisted-add-on-service" - }, - "type": [ - "array" - ] - }, - "title": "List By Team" }, { - "description": "Whitelist an Add-on Service", - "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/whitelisted-addon-services", - "method": "POST", - "rel": "create", + "description": "Update a VPN connection in a private space.", + "href": "/spaces/{(%23%2Fdefinitions%2Fspace%2Fdefinitions%2Fidentity)}/vpn-connections/{(%23%2Fdefinitions%2Fvpn-connection%2Fdefinitions%2Fidentity)}", + "rel": "update", "schema": { - "type": [ - "object" - ], "properties": { - "addon_service": { - "description": "name of the Add-on to whitelist", - "example": "heroku-postgresql", - "type": [ - "string" - ] + "routable_cidrs": { + "$ref": "#/definitions/vpn-connection/definitions/routable_cidrs" } - } - }, - "targetSchema": { - "items": { - "$ref": "#/definitions/whitelisted-add-on-service" }, + "required": [ + "routable_cidrs" + ], "type": [ - "array" + "object" ] }, - "title": "Create By Team" - }, - { - "description": "Remove a whitelisted entity", - "href": "/teams/{(%23%2Fdefinitions%2Fteam%2Fdefinitions%2Fidentity)}/whitelisted-addon-services/{(%23%2Fdefinitions%2Fwhitelisted-add-on-service%2Fdefinitions%2Fidentity)}", - "method": "DELETE", - "rel": "destroy", "targetSchema": { - "$ref": "#/definitions/whitelisted-add-on-service" + "$ref": "#/definitions/vpn-connection" }, - "title": "Delete By Team" - } - ], - "properties": { - "added_at": { - "$ref": "#/definitions/whitelisted-add-on-service/definitions/added_at" - }, - "added_by": { - "$ref": "#/definitions/whitelisted-add-on-service/definitions/added_by" - }, - "addon_service": { - "$ref": "#/definitions/whitelisted-add-on-service/definitions/addon_service" - }, - "id": { - "$ref": "#/definitions/whitelisted-add-on-service/definitions/id" + "method": "PATCH", + "title": "Update" } - } + ] } }, "properties": { @@ -17610,14 +17557,14 @@ "dyno": { "$ref": "#/definitions/dyno" }, + "enterprise-account-daily-usage": { + "$ref": "#/definitions/enterprise-account-daily-usage" + }, "enterprise-account-member": { "$ref": "#/definitions/enterprise-account-member" }, - "enterprise-account-usage-daily": { - "$ref": "#/definitions/enterprise-account-usage-daily" - }, - "enterprise-account-usage-monthly": { - "$ref": "#/definitions/enterprise-account-usage-monthly" + "enterprise-account-monthly-usage": { + "$ref": "#/definitions/enterprise-account-monthly-usage" }, "enterprise-account": { "$ref": "#/definitions/enterprise-account" @@ -17769,6 +17716,9 @@ "team-app": { "$ref": "#/definitions/team-app" }, + "team-daily-usage": { + "$ref": "#/definitions/team-daily-usage" + }, "team-feature": { "$ref": "#/definitions/team-feature" }, @@ -17781,18 +17731,15 @@ "team-member": { "$ref": "#/definitions/team-member" }, + "team-monthly-usage": { + "$ref": "#/definitions/team-monthly-usage" + }, "team-preferences": { "$ref": "#/definitions/team-preferences" }, "team-space": { "$ref": "#/definitions/team-space" }, - "team-usage-daily": { - "$ref": "#/definitions/team-usage-daily" - }, - "team-usage-monthly": { - "$ref": "#/definitions/team-usage-monthly" - }, "team": { "$ref": "#/definitions/team" }, @@ -17810,9 +17757,6 @@ }, "vpn-connection": { "$ref": "#/definitions/vpn-connection" - }, - "whitelisted-add-on-service": { - "$ref": "#/definitions/whitelisted-add-on-service" } }, "description": "The platform API empowers developers to automate, extend and combine Heroku with other services.",