# Test enhanced action templates with new metadata # Login $loginResponse = Invoke-RestMethod -Uri "http://localhost:8000/api/v1/auth/login" ` -Method POST ` -Body (@{username="admin"; password="admin123"} | ConvertTo-Json) ` -ContentType "application/json" $token = $loginResponse.access_token Write-Host "Logged in successfully" -ForegroundColor Green # Test PanStop action (has enhanced metadata) Write-Host "`nTesting enhanced PanStop template..." -ForegroundColor Cyan try { $response = Invoke-RestMethod -Uri "http://localhost:8000/api/v1/configuration/action-types/PanStop" ` -Headers @{Authorization = "Bearer $token"} ` -Method GET Write-Host "Action: $($response.action_name)" -ForegroundColor Yellow Write-Host "Description: $($response.description)" -ForegroundColor White Write-Host "Category: $($response.category)" -ForegroundColor White Write-Host "Parameters: $($response.parameters -join ', ')" -ForegroundColor White Write-Host "Required Caption: $($response.required_caption)" -ForegroundColor White Write-Host "Supports Delay: $($response.supports_delay)" -ForegroundColor White } catch { Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red } # Test CrossSwitch action (has parameter types) Write-Host "`n`nTesting enhanced CrossSwitch C -> M template..." -ForegroundColor Cyan try { $response = Invoke-RestMethod -Uri "http://localhost:8000/api/v1/configuration/action-types/CrossSwitch C -> M" ` -Headers @{Authorization = "Bearer $token"} ` -Method GET Write-Host "Action: $($response.action_name)" -ForegroundColor Yellow Write-Host "Description: $($response.description)" -ForegroundColor White Write-Host "Category: $($response.category)" -ForegroundColor White Write-Host "Parameters: $($response.parameters -join ', ')" -ForegroundColor White Write-Host "Required Caption: $($response.required_caption)" -ForegroundColor White Write-Host "Supports Delay: $($response.supports_delay)" -ForegroundColor White if ($response.parameter_types) { Write-Host "Parameter Types:" -ForegroundColor White foreach ($param in $response.parameter_types.PSObject.Properties) { Write-Host " - $($param.Name): $($param.Value)" -ForegroundColor Gray } } } catch { Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red }