test-getapig-parse.ps1 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Query Parse classes directly to find the APIG record
  2. $appId = "ncloudmaster"
  3. $headers = @{ "X-Parse-Application-Id" = $appId }
  4. # 1. Query APIG class for Vo3ROWEvDy
  5. Write-Host "=== Query APIG class ===" -ForegroundColor Cyan
  6. try {
  7. $r1 = Invoke-RestMethod -Uri "https://server.fmode.cn/parse/classes/APIG/Vo3ROWEvDy" -Method GET -Headers $headers -TimeoutSec 15
  8. Write-Host "APIG record:" -ForegroundColor Green
  9. $r1 | ConvertTo-Json -Depth 5
  10. } catch {
  11. Write-Host "APIG not found: $($_.Exception.Message)" -ForegroundColor Yellow
  12. }
  13. Write-Host ""
  14. # 2. Query APIGAuth class for Vo3ROWEvDy
  15. Write-Host "=== Query APIGAuth class ===" -ForegroundColor Cyan
  16. try {
  17. $r2 = Invoke-RestMethod -Uri "https://server.fmode.cn/parse/classes/APIGAuth/Vo3ROWEvDy" -Method GET -Headers $headers -TimeoutSec 15
  18. Write-Host "APIGAuth record:" -ForegroundColor Green
  19. $r2 | ConvertTo-Json -Depth 5
  20. } catch {
  21. Write-Host "APIGAuth not found: $($_.Exception.Message)" -ForegroundColor Yellow
  22. }
  23. Write-Host ""
  24. # 3. Try getApig with different param names
  25. Write-Host "=== getApig with apigid ===" -ForegroundColor Cyan
  26. $body3 = @{ apigid = "Vo3ROWEvDy" } | ConvertTo-Json -Compress
  27. try {
  28. $r3 = Invoke-RestMethod -Uri "https://server.fmode.cn/api/apig/getApig" -Method POST -ContentType "application/json" -Body $body3 -TimeoutSec 15
  29. Write-Host "Response:" -ForegroundColor Green
  30. $r3 | ConvertTo-Json -Depth 5
  31. } catch {
  32. Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
  33. }
  34. Write-Host ""
  35. # 4. Try getApig with objectId
  36. Write-Host "=== getApig with objectId ===" -ForegroundColor Cyan
  37. $body4 = @{ objectId = "Vo3ROWEvDy" } | ConvertTo-Json -Compress
  38. try {
  39. $r4 = Invoke-RestMethod -Uri "https://server.fmode.cn/api/apig/getApig" -Method POST -ContentType "application/json" -Body $body4 -TimeoutSec 15
  40. Write-Host "Response:" -ForegroundColor Green
  41. $r4 | ConvertTo-Json -Depth 5
  42. } catch {
  43. Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
  44. }