SPanel API

Nikolay Stoyanov shared this idea 10 months ago
Planned

As a website owner I want to be able to use API for my website for subdomain creation/deletion. Please integrate it in SPanel.

22 votes

Comments (17)

photo

waiting for this request 

photo

Please don't forget to vote for the feature request as that's what makes it developed quicker than other features.

photo
I also need an API script for creating addon domains.
photo

Part of the API is already developed and in use internally. Basically, the Softaculous integration runs via the SPanel API. We plan to have all the actions you can do via the SPanel GUI available in the API - creating addon domains will be there too.

photo

Hey @Vlad, any news on this? are there something available to check?... thanks

photo
It seems we'll get to the release of the API before we see enough demand for it with only 13 votes for this feature at the moment. I think the API will become available to users in ~3 months.
photo

Interesting, I would love this, just to be sure , you would basically be able to create cpanel or spanel for users using the api, right?


photo

SPanel users will be able to manage API users (add/remove users, modify permissions/access for each user).

In terms of functionality, each action that can be performed via the SPanel graphic interface will also be available in the API since the API is already available and actively used in SPanel internally (for the Softaculous integration for example). We'll document and make the API available to users as well to integrate with external applications such as WHMCS, for example (which we plan to build an integration with until the end of the year).

photo

I'd love to be able to edit DNS entries via the APi.  On my current hosting service,  I use Lego to generate non-wildcard LetsEncrypt certs for non-public hosts via dns Acme challenges (see https://github.com/go-acme/lego).  As you can see, here:

https://go-acme.github.io/lego/dns/

Lego has built in support for many DNS providers.  For most you just need set a few environment variables.

I think certbot has similar functionality.

I'm trying to plan a move to scalahosting VPS and want to be able to provision LetsEncrypt certs in the same way.  

If the spanel API were to have a method for editing DNS entries, I'd be willing to write a PR to support spanel-managed domains in Lego.



photo

Hi Evan,

SPanel automatically issues wildcard and non-wildcard Let's encrypt certificates and renews them automatically for all domains that point to your SPanel VPS.

The feature to generate a Let's encrypt certificate will be available in the API as well. We edit the DNS zone if only a wildcard certificate is required. For non-wildcard certificates we use the http authorization method.

photo

Vlad,So 

Thanks for the info.  My use case is issuing certs for a couple of my systems at home which are not online.  So I can't use the http auth approach.  I use lan.<mydomain.com> for these servers and so I'll get certs issued for specific <hosts>.lan.<mydomain.com>.  I suppose I could switch to scalahosting but leave my lan.<mydomain.com> zone on my old provider.  It would just be nicer to have all my DNS under one roof.  For that I'd need an API for creating and removing the TXT entry used during each DNS acme challenge. 

photo

That will be available at some point for sure but maybe not in the first release of the SPanel API.

photo

Vlad, what will the authentication model be for the API.  I'm trying to implement an automated approach using a headless browser.  Needing to first auth against spanel and then navigate into a domain account in order to get the browser seeded with the right cookie/session data so that subsequent API calls work is a pain.  In particular, the captchas are incredibly agressive, making testing very slow going.  Long-term it would be much nicer to have API keys and for the APIs to include a domain account path or query parameter so writing an API client to automate an action is much simpler.

photo

A follow up to my previous comment: is there an easier way to gain API access to a domain's account's spanel  that's just not documented yet?

photo

We haven't started working on the API functionality yet however it is planned and we'll probably get to it within a month. Authentication will happen with tokens sent via HTTP POST. We'll provide documentation with examples.

photo

Wow, does this means that we will be able to add billing and other initial automation with Spanel, right?

photo
Souvik, that is correct.
Leave a Comment