Skip to content

REST API Reference

Complete endpoint list and usage conventions for the 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

Session is maintained via Cookie.


Endpoint List

Authentication

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

Version

MethodEndpointDescription
GET/versionCurrent version info
POST/version/checkCheck for updates
POST/version/downloadDownload update

Audit Logs

MethodEndpointDescription
GET/audit-logsAudit log list

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 WOL 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/{profileId}/script-versionsScript version list
GET/profiles/{profileId}/script-versions/{verId}Get a single script version
GET/profiles/{profileId}/script-diff/{verId}Version diff
POST/profiles/{profileId}/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/settingsFull settings (backward compatible)
PUT/settingsUpdate full settings
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
GET/netboot/cache-statsNetboot cache statistics

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
POST/services/nfs/validate-pathValidate NFS path
GET/services/nfs/browse-pathBrowse NFS path
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/overlaysOverlay list
GET/netboot/overlays/{distro}Get overlay
PUT/netboot/overlays/{distro}Create/update overlay
DELETE/netboot/overlays/{distro}Delete overlay
GET/netboot/answer-templatesAnswer template list
POST/netboot/answer-templatesCreate answer template
GET/netboot/answer-templates/{id}Get template
PUT/netboot/answer-templates/{id}Update template
DELETE/netboot/answer-templates/{id}Delete template
GET/netboot/answer-templates/presetsBuilt-in presets
POST/netboot/answer-templates/validateValidate template
GET/netboot/answer-templates/{id}/versionsVersion list
GET/netboot/answer-templates/{id}/versions/{version}Get specific version
POST/netboot/answer-templates/{id}/previewRender preview
POST/netboot/answer-templates/{id}/rollback/{version}Rollback to version
POST/netboot/answer-templates/{id}/validateValidate single template
GET/netboot/tasksInstall task list
POST/netboot/tasksCreate install task
GET/netboot/tasks/{id}Get task
PUT/netboot/tasks/{id}Update task
DELETE/netboot/tasks/{id}Delete task
GET/netboot/task/by-mac/{mac}Get task by MAC (PXE runtime, no auth)
GET/netboot/answer/{task_id}Get answer file (PXE runtime, no auth)

Access Control

MethodEndpointDescription
GET/access/blacklistBlacklist list
POST/access/blacklistAdd to blacklist
DELETE/access/blacklist/{id}Delete blacklist entry
GET/access/whitelistWhitelist list
POST/access/whitelistAdd to whitelist
DELETE/access/whitelist/{id}Delete whitelist entry
GET/access/unauthorizedUnauthorized device list
POST/access/unauthorized/add-to-whitelistAdd unauthorized device to whitelist
POST/access/unauthorized/add-to-blacklistAdd unauthorized device to blacklist
DELETE/access/unauthorized/{id}Delete unauthorized device record

DNS

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

BMC

MethodEndpointDescription
GET/bmc/configsBMC config list
POST/bmc/configsCreate BMC config
GET/bmc/configs/{id}Get BMC config
PUT/bmc/configs/{id}Update BMC config
DELETE/bmc/configs/{id}Delete BMC config
POST/bmc/configs/importCSV import
POST/bmc/probeProbe BMC
POST/bmc/{id}/refreshRefresh BMC status
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/wol/historyWake history list
GET/wol/history/{mac}Wake history by MAC
DELETE/wol/history/{id}Delete single history entry
DELETE/wol/historyClear all wake history
POST/wol/scheduleCreate scheduled wake
GET/wol/schedulesScheduled wake list
DELETE/wol/schedule/{id}Delete scheduled wake
GET/wol/interfacesWOL interfaces

OS Images

MethodEndpointDescription
GET/os-imagesImage list
POST/os-images/uploadUpload image
GET/os-images/{id}Get image details
PUT/os-images/{id}Update image
DELETE/os-images/{id}Delete image
POST/os-images/importImport existing image file
GET/os-images/{id}/fileDownload image file
POST/os-images/{id}/extractExtract image
POST/os-images/{id}/reprocessReprocess image
POST/os-images/{id}/mountMount image
POST/os-images/{id}/unmountUnmount image
GET/fs/browseFile browser

Bootloader

MethodEndpointDescription
GET/bootloader/checkBoot file integrity check
GET/bootloader/filesBoot file list
POST/bootloader/check-fileCheck a single boot file

Baselines

MethodEndpointDescription
GET/baselinesBaseline list
POST/baselinesCreate baseline
GET/baselines/{id}Get baseline
PUT/baselines/{id}Update baseline
DELETE/baselines/{id}Delete baseline
GET/baselines/{id}/scriptsBaseline script list
PUT/baselines/{id}/scriptsSet baseline scripts
GET/baselines/assignedQuery machine's assigned baseline

Scripts

MethodEndpointDescription
GET/scriptsScript list
POST/scriptsCreate script
GET/scripts/{id}Get script
PUT/scripts/{id}Update script
DELETE/scripts/{id}Delete script

Store

MethodEndpointDescription
GET/store/catalogCommunity template/script catalog
GET/store/items/{type}/{id}Catalog item details
POST/store/importImport catalog item
POST/store/import-localImport local item

Miscellaneous

MethodEndpointDescription
GET/statusService status
GET/metricsMetrics snapshot (JSON)
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

PxeLab - All-in-one PXE Network Boot Server