diff --git a/providers/hostingde/api.go b/providers/hostingde/api.go index 79ce4c6f1..895ca3420 100644 --- a/providers/hostingde/api.go +++ b/providers/hostingde/api.go @@ -14,10 +14,11 @@ import ( const endpoint = "%s/api/%s/v1/json/%s" type hostingdeProvider struct { - authToken string - ownerAccountID string - baseURL string - nameservers []string + authToken string + ownerAccountID string + filterAccountId string + baseURL string + nameservers []string } func (hp *hostingdeProvider) getDomainConfig(domain string) (*domainConfig, error) { @@ -285,6 +286,12 @@ func (hp *hostingdeProvider) getAllZoneConfigs() ([]*zoneConfig, error) { params := request{ Limit: 10000, } + if hp.filterAccountId != "" { + params.Filter = &filter{ + Field: "accountId", + Value: hp.filterAccountId, + } + } resp, err := hp.get("dns", "zoneConfigsFind", params) if err != nil { diff --git a/providers/hostingde/hostingdeProvider.go b/providers/hostingde/hostingdeProvider.go index c92ca510c..5c721636b 100644 --- a/providers/hostingde/hostingdeProvider.go +++ b/providers/hostingde/hostingdeProvider.go @@ -46,7 +46,7 @@ type providerMeta struct { } func newHostingde(m map[string]string, providermeta json.RawMessage) (*hostingdeProvider, error) { - authToken, ownerAccountID, baseURL := m["authToken"], m["ownerAccountId"], m["baseURL"] + authToken, ownerAccountID, filterAccountId, baseURL := m["authToken"], m["ownerAccountId"], m["filterAccountId"], m["baseURL"] if authToken == "" { return nil, fmt.Errorf("hosting.de: authtoken must be provided") @@ -58,10 +58,11 @@ func newHostingde(m map[string]string, providermeta json.RawMessage) (*hostingde baseURL = strings.TrimSuffix(baseURL, "/") hp := &hostingdeProvider{ - authToken: authToken, - ownerAccountID: ownerAccountID, - baseURL: baseURL, - nameservers: defaultNameservers, + authToken: authToken, + ownerAccountID: ownerAccountID, + filterAccountId: filterAccountId, + baseURL: baseURL, + nameservers: defaultNameservers, } if len(providermeta) > 0 {