Finds Webex Calling locations with zero PEOPLE-owned phone numbers
(the "we lost the store users, no one told us" pattern) by diffing
two paginated pulls:
GET /v1/telephony/config/locations → every location
GET /v1/telephony/config/numbers → every provisioned number
with owner + location
Verdicts per location:
- has-users → ≥1 PEOPLE owner (excluded from report)
- needs-cleanup-first → 0 PEOPLE but workspaces / AA / HG / etc
still present; needs Control Hub attention
before delete
- safe-to-delete → 0 of everything, ghost location shell
Console prints a per-location inventory table (top 20) plus a
summary. --report writes the full set to CSV with location id,
name, address, timezone, and per-owner-type counts.
--execute deletes safe-to-delete locations via
DELETE /v1/telephony/config/locations/{id}. Guarded by a mandatory
--i-am-sure flag and run serial (concurrency=1) with the shared
callWithRetry so 429/503 gets a Retry-After-aware backoff.
--limit / --offset let the operator pilot on a subset. Every
delete produces an audit line under `webex:emptyloc:audit`.
Also added a generic fetchAllPaginated helper to
scripts/lib/webexBulk.js (Link-header cursor pagination, configurable
array key) so subsequent bulk scripts can reuse it.
.gitignore: whitelisted findEmptyLocations.js; added
empty-locations-*.csv to the report-artifact ignore list.
87 lines
1.7 KiB
Text
87 lines
1.7 KiB
Text
# Dependencies
|
|
node_modules/
|
|
|
|
# Environment & Secrets
|
|
.env
|
|
.env.local
|
|
.env.*.local
|
|
*.pem
|
|
*.cer
|
|
*.key
|
|
debug_cert_*.pem
|
|
|
|
# The rotating service token file must be provided locally for Docker mounts (and runtime writes).
|
|
# Never commit real tokens.
|
|
config/webex-service-tokens.json
|
|
|
|
# Logs & Runtime data
|
|
logs/
|
|
*.log
|
|
npm-debug.log*
|
|
yarn-debug.log*
|
|
yarn-error.log*
|
|
|
|
# Storage / Certificates / Debug artifacts (provide aeoroots.cer etc. locally for your clone; volume mounted in Docker)
|
|
storage/
|
|
|
|
# Dev / test artifacts (local only)
|
|
characterization-runs/
|
|
scripts/*
|
|
# Tracked operational scripts (whitelisted; keep local dev helpers ignored above)
|
|
!scripts/reclaimWebexHosts.js
|
|
!scripts/removeAdvancedMessaging.js
|
|
!scripts/findEmptyLocations.js
|
|
!scripts/lib/
|
|
!scripts/lib/**
|
|
characterize-*.js
|
|
|
|
# Backup & temp files
|
|
*.bak
|
|
*~
|
|
*.swp
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# IDE / Editor
|
|
.idea/
|
|
.vscode/
|
|
*.sublime-project
|
|
*.sublime-workspace
|
|
.history/
|
|
|
|
# Build / Output
|
|
dist/
|
|
build/
|
|
coverage/
|
|
.nyc_output/
|
|
|
|
# DECT relay agent deploy bundles produced by dect-relay-agent/bundle.sh.
|
|
# The datestamped zip lands at repo root and shouldn't be committed —
|
|
# it's ~40MB (Docker image tarball) and rebuildable on demand.
|
|
dect-relay-agent-bundle-*.zip
|
|
dect-relay-agent-bundle-*/
|
|
|
|
# Docker / Misc
|
|
docker-compose.override.yml
|
|
|
|
# OS generated
|
|
.AppleDouble
|
|
.LSOverride
|
|
._*
|
|
.Spotlight-V100
|
|
.Trashes
|
|
|
|
# Misc project artifacts
|
|
testobjects.json
|
|
meraki-store-topology-demo.html
|
|
config/config.json
|
|
config/config.bak
|
|
|
|
# Local spike samples pulled from lab DBS-210 (never commit)
|
|
.dect-samples/
|
|
|
|
# Per-user report CSVs written by the bulk admin scripts.
|
|
# These contain emails, personIds, and per-user outcome — PII, never commit.
|
|
reclaim-*.csv
|
|
remove-*.csv
|
|
empty-locations-*.csv
|