_probe-all-apigs.js 830 B

123456789101112131415161718
  1. /**
  2. * 查询所有 APIG 记录,找出每条 api 路径对应的 apigId
  3. */
  4. (async () => {
  5. const url = 'https://server.fmode.cn/parse/classes/APIG?limit=200&keys=objectId,title,path,count,cost,price,service,company';
  6. const r = await fetch(url, { headers: { 'X-Parse-Application-Id': 'ncloudmaster' } });
  7. const d = await r.json();
  8. console.log('全部 APIG 记录:');
  9. console.log('='.repeat(120));
  10. (d.results || []).forEach(x => {
  11. const c = typeof x.company === 'object' ? x.company?.objectId : x.company;
  12. console.log(` ${String(x.objectId).padEnd(12)} ${String(x.title||'').padEnd(25)} ${String(x.path||'').padEnd(40)} service=${x.service||'-'} company=${c||'-'}`);
  13. });
  14. console.log('');
  15. console.log(`共 ${(d.results||[]).length} 条记录`);
  16. })().catch(e => console.error('Error:', e.message));