Skip to main content
Retrieve total count of subdomains created for specific parent domain
// See documentation to set up the client first

let apiInstance = new superlink.SubdomainApi();
let parentDomain = "supertest.me";

apiInstance.subdomainTotal(parentDomain, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log(`${data.count}`)
  }
});
// See documentation to set up the client first

parentDomain := "supertest.me"
resp, r, err := superlinkClient.SubdomainAPI.SubdomainTotal(context.Background(), parentDomain).Execute()
if err != nil {
  fmt.Fprintf(os.Stderr, "Error when calling `SubdomainAPI.SubdomainTotal``: %v\n", err)
  fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}

fmt.Fprintf(os.Stdout, "%s\n", *resp.Count)
# See documentation to set up the client first

api_instance = superlink.SubdomainApi(api_client)
parent_domain = 'supertest.me'

try:
    api_response = api_instance.subdomain_total(parent_domain)
    print(api_response.count)
except Exception as e:
    print("Exception when calling SubdomainApi->subdomain_total: %s\n" % e)