Domains in the beta-api

Hello,

I’m playing around with the new API beta, but having a bit of trouble performing certain requests. Namely, when trying to call any endpoint that takes domain as a parameter.

I’m on a solo plan, and so assumed that the domain in this instance would be davidsbond93.gmail.com.beta.tailscale.net, because that’s what I get when enabling MagicDNS. However, this returns me a 400, so do other permutations of that domain, like davidsbond93.gmail.com.

Am I understanding correctly what the domain parameter is? Or am I just limited to a feature that sets up domains not available in the solo plan?

Thanks

Hi,

I think your “domain” is davidsbond93@gmail.com in this case. The word “domain” is kind of confusing; we should probably use a different term. I guess this is why we beta test :slight_smile:

1 Like

Our documentation loosely describes this, but right now networks are defined by domain. For companies, this often looks like your corporate domain: the example.com network automatically includes user1@example.com and user2@example.com. But for solo users, we consider your domain your full email address. In your case, davidsbond93@gmail.com.

In the future we plan to expand the notion of networks beyond just a single domain, but for now, your “domain” is your primary identifier for your network, and you’ll use it throughout the API.

We’ll update the docs to make this more clear.

1 Like

Thanks both, it’s working for me now.

If it’s of any interest, I have a mostly untested terraform provider for Tailscale put together that can currently manage ACLs, nameservers, preferences and search paths using this API.

Amazing! I’m not too familiar with Terraform myself, but if you’re able to publish it, either here or on the Terraform registry, I’m sure that’d be helpful to a number of Tailscale users.

Will do! Out of curiosity, is it possible for a single api key to manage multiple domains? I see domains are typically a parameter in HTTP requests.

Pushed to a repository here:

@ross

Managed to publish it to the Terraform registry also:

https://registry.terraform.io/providers/davidsbond/tailscale