REST API (Pode)¶
The API is the only interface the web front-end talks to. It runs on the Windows deployment server.
Starting the API¶
# From the project folder
pwsh -File .\API\Deploy-API.ps1 -Port 8080
# Or with HTTPS (requires a certificate)
pwsh -File .\API\Deploy-API.ps1 -Port 8443 -Https `
-CertPath 'C:\Certs\pswindeploy.pfx' -CertPassword 'CertPassword'
Running it as a Windows service¶
# Create a Windows service via NSSM (Non-Sucking Service Manager)
# Download NSSM: https://nssm.cc
nssm install PSWinDeployAPI `
"C:\Program Files\PowerShell\7\pwsh.exe" `
"-NonInteractive -File C:\Deploy\API\Deploy-API.ps1 -Port 8080"
nssm set PSWinDeployAPI AppDirectory C:\Deploy
nssm start PSWinDeployAPI
Available endpoints¶
| Method | Route | Description |
|---|---|---|
| GET | /api/health |
API health check |
| GET | /api/profiles |
List all profiles |
| GET | /api/profiles/:id |
Profile detail |
| GET | /api/catalogue |
Full catalogue |
| GET | /api/catalogue/:category |
Catalogue filtered by category |
| GET | /api/wim |
Available WIM images |
| GET | /api/sequences |
List sequences |
| POST | /api/deploy/prepare |
Resolve profile + selected apps into a runtime sequence |
| GET | /api/deploy/status/:id |
Deployment status |
| GET | /api/deploy/logs/:id |
Latest log lines for a deployment |
Example: preparing a deployment¶
curl -X POST http://SERVER:8080/api/deploy/prepare \
-H "Content-Type: application/json" \
-d '{
"profileId": "profil-poste-rh",
"selectedApps": ["app-chrome", "app-sap-gui"],
"machineName": "RH-PC-050"
}'
Response:
{
"success": true,
"runtimeId": "a1b2c3d4",
"runtimePath": "\\\\SERVER\\Deploy\\Runtime\\seq-a1b2c3d4.json",
"sequenceName": "Windows 11 Pro — Standard domain workstation",
"stepCount": 11,
"steps": [ "..." ]
}