test-find-apigauth.ps1 878 B

1234567891011121314151617
  1. # Find APIGAuth records linked to APIG Vo3ROWEvDy
  2. $headers = @{ "X-Parse-Application-Id" = "ncloudmaster" }
  3. $where = '{"api":{"__type":"Pointer","className":"APIG","objectId":"Vo3ROWEvDy"}}'
  4. $encoded = [System.Uri]::EscapeDataString($where)
  5. $url = "https://server.fmode.cn/parse/classes/APIGAuth?where=$encoded"
  6. Write-Host "=== APIGAuth records for APIG Vo3ROWEvDy ===" -ForegroundColor Cyan
  7. try {
  8. $r = Invoke-RestMethod -Uri $url -Method GET -Headers $headers -TimeoutSec 15
  9. Write-Host "Found $($r.results.Count) records" -ForegroundColor Green
  10. foreach ($rec in $r.results) {
  11. Write-Host " objectId: $($rec.objectId) count: $($rec.count) user: $($rec.user.objectId) company: $($rec.company.objectId)" -ForegroundColor Yellow
  12. }
  13. $r.results | ConvertTo-Json -Depth 5
  14. } catch {
  15. Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
  16. }