View .md

DNS Hosts endpoints (Admin API)

6 FeatherPanel Admin API endpoints from admin/dns-hosts.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Last synced from FeatherPanel 15b94e9 on .

On this page

Defined in backend/app/routes/admin/dns-hosts.php. Authentication used here: Admin. Read Authentication for how to send credentials and Rate limits and errors for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

Endpoints

GET/api/admin/dns-hosts

Auth: AdminPermission: admin.webspaces.viewRoute name: admin-dns-hostsController: DnsHostsController::indexroute source

List DNS hosts

curl -X GET "$PANEL_URL/api/admin/dns-hosts" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

GET/api/admin/dns-hosts/{id}

Auth: AdminPermission: admin.webspaces.viewRoute name: admin-dns-hosts-showController: DnsHostsController::showroute source

Show DNS host

ParameterInTypeRequiredDescription
idpath-yes
curl -X GET "$PANEL_URL/api/admin/dns-hosts/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

PUT/api/admin/dns-hosts

Auth: AdminPermission: admin.webspaces.createRoute name: admin-dns-hosts-createController: DnsHostsController::createroute source

Create DNS host

curl -X PUT "$PANEL_URL/api/admin/dns-hosts" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Plugin events: featherpanel:admin:dns_hosts:host:created

PATCH/api/admin/dns-hosts/{id}

Auth: AdminPermission: admin.webspaces.editRoute name: admin-dns-hosts-updateController: DnsHostsController::updateroute source

Update DNS host

ParameterInTypeRequiredDescription
idpath-yes
curl -X PATCH "$PANEL_URL/api/admin/dns-hosts/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Plugin events: featherpanel:admin:dns_hosts:host:updated

DELETE/api/admin/dns-hosts/{id}

Auth: AdminPermission: admin.webspaces.deleteRoute name: admin-dns-hosts-deleteController: DnsHostsController::deleteroute source

Delete DNS host

ParameterInTypeRequiredDescription
idpath-yes
curl -X DELETE "$PANEL_URL/api/admin/dns-hosts/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"

Plugin events: featherpanel:admin:dns_hosts:host:deleted

POST/api/admin/dns-hosts/{id}/test

Auth: AdminPermission: admin.webspaces.viewRoute name: admin-dns-hosts-testController: DnsHostsController::testroute source

Test PowerDNS on DNS host web node

ParameterInTypeRequiredDescription
idpath-yes
curl -X POST "$PANEL_URL/api/admin/dns-hosts/$ID/test" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"