test-cloudfunc-name.ps1 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Query CloudFunction class to find actual function names
  2. $headers = @{ "X-Parse-Application-Id" = "ncloudmaster" }
  3. # Try to get the CloudFunction record by objectId
  4. Write-Host "=== CloudFunction t012qy4XVe ===" -ForegroundColor Cyan
  5. try {
  6. $r = Invoke-RestMethod -Uri "https://server.fmode.cn/parse/classes/CloudFunction/t012qy4XVe" -Method GET -Headers $headers -TimeoutSec 10
  7. Write-Host ($r | ConvertTo-Json -Depth 5) -ForegroundColor Green
  8. } catch {
  9. Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
  10. }
  11. Write-Host ""
  12. Write-Host "=== CloudFunction H7X7y9Wfc0 ===" -ForegroundColor Cyan
  13. try {
  14. $r2 = Invoke-RestMethod -Uri "https://server.fmode.cn/parse/classes/CloudFunction/H7X7y9Wfc0" -Method GET -Headers $headers -TimeoutSec 10
  15. Write-Host ($r2 | ConvertTo-Json -Depth 5) -ForegroundColor Green
  16. } catch {
  17. Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
  18. }
  19. Write-Host ""
  20. # Also try FunctionDeploy or other class names
  21. foreach ($cls in @("FunctionDeploy", "ServerFunction", "ParseFunction", "Function")) {
  22. Write-Host "=== $cls/t012qy4XVe ===" -ForegroundColor Cyan
  23. try {
  24. $r3 = Invoke-RestMethod -Uri "https://server.fmode.cn/parse/classes/$cls/t012qy4XVe" -Method GET -Headers $headers -TimeoutSec 5
  25. Write-Host ($r3 | ConvertTo-Json -Depth 3) -ForegroundColor Green
  26. } catch {
  27. $code = ""
  28. if ($_.Exception.Response) { $code = [int]$_.Exception.Response.StatusCode }
  29. Write-Host "$code" -ForegroundColor Yellow
  30. }
  31. }