Skip to content

REST API Reference

Complete endpoint list and usage conventions for PxeLab REST API v1.

Related: Config File Reference | Web UI Guide


General Conventions

Base URL: http://<host>:8080/api/v1

Request Format: JSON (Content-Type: application/json)

Response Format:

json
{
  "success": true,
  "data": { ... }
}

Error response:

json
{
  "success": false,
  "error": "Error description"
}

Authentication

POST /api/v1/auth/login     # Login
POST /api/v1/auth/logout    # Logout
GET  /api/v1/auth/session   # Check session

Sessions are maintained via cookies.


Endpoint List

Authentication

MethodEndpointDescription
POST/auth/loginLogin
POST/auth/logoutLogout
GET/auth/sessionCheck session

Hosts

MethodEndpointDescription
GET/hostsList hosts
POST/hostsCreate host
GET/hosts/{id}Get host
PUT/hosts/{id}Update host
DELETE/hosts/{id}Delete host
POST/hosts/{id}/wakeWOL wake
POST/hosts/{id}/powerIPMI power control
GET/hosts/{id}/boot-configPreview boot config
POST/hosts/batch/wakeBatch wake

Boot Config (Profile)

MethodEndpointDescription
GET/profilesList profiles
POST/profilesCreate profile
GET/profiles/{id}Get profile
PUT/profiles/{id}Update profile
DELETE/profiles/{id}Delete profile
POST/profiles/from-netbootCreate from netboot
GET/profiles/{id}/script-versionsScript version list
GET/profiles/{id}/script-diff/{verId}Version diff
POST/profiles/{id}/script-rollback/{verId}Version rollback

File Management

MethodEndpointDescription
GET/filesList files
GET/files/rootGet root directory
POST/files/uploadUpload file
DELETE/filesDelete file

Leases

MethodEndpointDescription
GET/leasesList leases
GET/leases/statsLease statistics
DELETE/leases/{mac}Delete lease
POST/leases/batch-deleteBatch delete
POST/leases/prunePrune expired leases

Settings

MethodEndpointDescription
GET/settings/generalGeneral settings
PUT/settings/generalUpdate general settings
GET/settings/interfacesInterface config
PUT/settings/interfacesUpdate interface config
GET/settings/netbootNetboot settings
PUT/settings/netbootUpdate netboot settings
GET/settings/loggingLogging settings
PUT/settings/loggingUpdate logging settings

Services

MethodEndpointDescription
GET/services/tftpTFTP settings
PUT/services/tftpUpdate TFTP
GET/services/dhcpDHCP settings
PUT/services/dhcpUpdate DHCP
GET/services/dnsDNS settings
PUT/services/dnsUpdate DNS
GET/services/nfsNFS settings
PUT/services/nfsUpdate NFS
GET/services/archmapArchitecture mapping
PUT/services/archmapUpdate architecture mapping
GET/services/archmap/defaultsDefault architecture mapping
GET/services/ipxe-scriptiPXE script
PUT/services/ipxe-scriptUpdate iPXE script

Service Lifecycle

MethodEndpointDescription
GET/servicesList all services
POST/services/{name}/startStart service
POST/services/{name}/stopStop service
POST/services/{name}/restartRestart service
POST/services/batch/{action}Batch operation
PUT/services/{name}/auto-startSet auto-start

Netboot

MethodEndpointDescription
GET/netboot/catalogOS catalog
GET/netboot/catalog/{distro}Distro details
GET/netboot/groupsGroup list
GET/netboot/check-filesCheck files
GET/netboot/cache-statsCache statistics
GET/PUT/DELETE/netboot/overlays/{distro}Overlay
GET/POST/PUT/DELETE/netboot/answer-templatesAnswer file templates
GET/POST/PUT/DELETE/netboot/tasksInstall tasks

Access Control

MethodEndpointDescription
GET/POST/DELETE/access/blacklistBlacklist
GET/POST/DELETE/access/whitelistWhitelist
GET/access/unauthorizedUnauthorized devices

DNS

MethodEndpointDescription
GET/POST/dns/recordsDNS records
GET/PUT/DELETE/dns/records/{id}Single record

BMC

MethodEndpointDescription
GET/POST/bmc/configsBMC config
POST/bmc/configs/importCSV import
POST/bmc/probeProbe BMC
POST/bmc/{id}/power-onPower on
POST/bmc/{id}/power-offPower off
POST/bmc/{id}/restartRestart
GET/bmc/{id}/statusQuery status
POST/bmc/{id}/boot-deviceSet boot device
POST/bmc/batch/power-onBatch power on
POST/bmc/batch/power-offBatch power off
POST/bmc/batch/restartBatch restart
POST/bmc/batch/statusBatch status query

DHCP Reservations

MethodEndpointDescription
GET/POST/dhcp/reservationsList / Create
GET/PUT/DELETE/dhcp/reservations/{id}Single operation

Network Diagnostics

MethodEndpointDescription
POST/network/pingPing
POST/network/ping/streamStreaming ping
POST/network/tracerouteTraceroute
POST/network/traceroute/streamStreaming traceroute
GET/network/interfacesNetwork interface list

WOL

MethodEndpointDescription
GET/POST/DELETE/wol/historyWake history
GET/POST/DELETE/wol/schedulesScheduled tasks
GET/wol/interfacesWOL interfaces

OS Images

MethodEndpointDescription
GET/POST/os-imagesList / Upload
GET/PUT/DELETE/os-images/{id}Single operation
POST/os-images/{id}/extractExtract
POST/os-images/{id}/mountMount
POST/os-images/{id}/unmountUnmount
GET/fs/browseFile browser

Miscellaneous

MethodEndpointDescription
GET/statusService status
GET/metricsPrometheus metrics
GET/eventsEvent list
GET/events/streamEvent stream (SSE)
GET/logs/streamLog stream (SSE)
GET/logs/filesLog file list
GET/logs/disk-usageLog disk usage
POST/logs/cleanupClean up logs
GET/interfacesNetwork interfaces
GET/bootloader/checkBoot file check
GET/bootloader/filesBoot file list

PxeLab - All-in-one PXE Network Boot Server