Render seems absolutely great to me due to the fact that they have a GraphQL api (I am super aware of the rest api) to handle custom domains: https://render.com/docs/api
Without a doubt, this is something super differential with respect to the competition.
However, I would like to know if there is any way to delete a custom domain by its name (example.com) and not by its id (cd-XXX) using the current GraphQL api while we wait for the rest api.
I think it would be much easier to save the domain name in my database and not be looking at the id (there should be no duplicates anyway).
Hey, thanks for the kind words! If you have the server ID of the service your domain is used for, you will be able to query for the domain ID like this:
query customDomains($serverId: String!) {
customDomains(serverId: $serverId) {
id
name
}
}
This gives you all the domains you are using for that given service, but then it will be easy to find the domain ID for the name you have in mind. Let me know if this helps.
Hi @eduardo.devop, there’s no endpoint for this in the GraphQL API, but the REST API will have endpoints for accessing/operating on specific domains by name or id. Are you interested in early access to the REST API?