Hi team — feature request to bring DNS management into the public REST API.
Context I automate Ploi site setup via a script that uses your public API. Site creation, repository linking, nginx config, certificates, deploy script, and quick deploy all work cleanly via the public API. The one gap is DNS — to issue Let's Encrypt certs successfully and bring a site fully online without touching the browser, I need the following to be public API endpoints:
Set DNS provider + credential + zone ID for a site — equivalent to PATCH /panel/servers/{server}/sites/{site}/update-dns-settings (currently CSRF-only). Create / list / update / delete DNS records on a site — equivalent to POST/GET/PATCH/DELETE /panel/servers/{server}/sites/{site}/dns-records[/{id}] (currently CSRF-only). What's already there (works great) POST /api/servers/{s}/sites — create site POST /api/servers/{s}/sites/{id}/repository — install repo PATCH /api/servers/{s}/sites/{id}/deploy/script — set deploy script PATCH /api/servers/{s}/sites/{id}/nginx-configuration — set nginx POST /api/servers/{s}/sites/{id}/certificates — request SSL POST /api/servers/{s}/sites/{id}/repository/quick-deploy — toggle quick deploy What's missing (must use browser) Probed via curl with my API token:
GET /api/servers/{s}/sites/{id}/dns-records → 500 (route exists but rejects without CSRF — panel-only) GET /api/servers/{s}/sites/{id}/dns → 404 GET /api/servers/{s}/sites/{id}/dns-settings → 404 GET /api/servers/{s}/sites/{id}/dns-provider → 404 GET /panel/servers/.../dns-records → 401 (browser session required) The AI suggested-answer pointed me to the providers' own APIs (Cloudflare, Hetzner, etc.), but that's not what I'm asking — I want to manage DNS through Ploi the same way I manage everything else, so that Ploi's stored zone ID + credential is used and SSL provisioning Just Works.
Proposed API Most natural shape:
GET /api/servers/{s}/sites/{id}/dns-settings → returns {provider, credential_id, zone_id} PATCH /api/servers/{s}/sites/{id}/dns-settings → body {provider, credential, id} (matches the panel route's body) GET /api/servers/{s}/sites/{id}/dns-records → list records POST /api/servers/{s}/sites/{id}/dns-records → body {type, name, content, ttl, proxied} PATCH /api/servers/{s}/sites/{id}/dns-records/{record_id} DELETE /api/servers/{s}/sites/{id}/dns-records/{record_id} Auth via the existing API token (no CSRF needed for public API).
This would close the last manual step in fully scripted site provisioning. Today my automation has to print 'go to Ploi UI and add DNS provider/A record' as a manual checklist item, which defeats the purpose.
Happy to help test if you spin this up.
Thanks!
-
Keith Mander moved item to project Sites
2 days ago -
Keith Mander created the item
2 days ago