lobster_profile_domain_validation.ps1 740 B

123456789101112131415161718192021222324
  1. # Profile domain validation (Plan B P2/P3)
  2. param(
  3. [string]$ApiBase = "http://127.0.0.1:8006",
  4. [int]$CompanyId = 338,
  5. [int]$TenantId = 33,
  6. [string]$OpsSecret = "lobster-dev-ops"
  7. )
  8. $ErrorActionPreference = "Stop"
  9. $headers = @{
  10. "Content-Type" = "application/json"
  11. "X-Lobster-Ops-Secret" = $OpsSecret
  12. }
  13. $uri = "$($ApiBase.TrimEnd('/'))/api/lobster/admin/validation/profile-domain/${CompanyId}?tenantId=${TenantId}"
  14. Write-Host "POST $uri"
  15. $resp = Invoke-RestMethod -Uri $uri -Method Post -Headers $headers -TimeoutSec 120
  16. $json = $resp | ConvertTo-Json -Depth 20
  17. Write-Host $json
  18. if ($resp.passed) {
  19. Write-Host "RESULT: PASS" -ForegroundColor Green
  20. exit 0
  21. }
  22. Write-Host "RESULT: FAIL" -ForegroundColor Red
  23. exit 1