How sven-seyfert/apiprobe works
APIProbe is a Go CLI for running JSON-defined API checks, test-case variations, and response-change monitoring. The main workflow loads and filters request definitions, prepares bodies and secrets, executes HTTP requests (including auth-token dependencies), formats responses, compares them with saved outputs, and reports changes or errors through configured webhooks. The graph retains README-documented configuration, filtering, secret management, auth, diffing, logging, and notification capabilities. Source coverage is based on the excerpts and SOURCE INDEX; unsampled internals are represented only where documented.
Main entry points: main.go Run orchestrator · exec.go Request and test-case processing · flags.go CLI flags · notify.go Notification dispatch
Components 24
CLI and definitions
- CLI flags
internal/flags/flags.go - Request loading and filtering
internal/loader/loader.go - Input request JSON
data/input/reqres-api/users.json
Secrets and auth
- Secret handling
internal/crypto/obfuscator.go - Secret database
internal/db/sqlite.go - Auth token store
internal/auth/token.go - Token substitution
internal/auth/token-handler.go
Request execution
- Run orchestrator
main.go - HTTP request runner
internal/exec/curl.go - Response formatting
internal/exec/jq.go - Request and test-case processing
internal/exec/exec.go
Change and reporting
- Output path helper
internal/fileutil/path.go - Response change detection
internal/diff/diff.go - Saved responses
data/output/reqres-api/users-test-case-00.json - Run report
internal/report/report.go - Notification dispatch
internal/report/notify.go - WebEx delivery
internal/report/webex.go - Teams delivery
internal/report/msteams.go
Configuration and logging
- Run configuration
internal/config/config.go - Logging
internal/logger/logger.go
Other components
- CLI user
- API service
- Webhook endpoints
- jq processor
Connections 30
- CLI user → Run orchestrator: starts run
README.md - Run orchestrator → CLI flags: parses flags
main.go - Run orchestrator → Run configuration: loads config
main.go - Run orchestrator → Request loading and filtering: loads and filters
main.go - Request loading and filtering → Input request JSON: reads definitions
internal/loader/loader.go - CLI flags → Secret handling: generates IDs
internal/flags/flags.go - CLI flags → Secret database: stores secrets
internal/flags/flags.go - Run orchestrator → Secret database: seeds database
main.go - Run orchestrator → Secret handling: resolves secrets
main.go - Secret handling → Secret database: reads secrets
- Run orchestrator → Request and test-case processing: processes requests
main.go - Request and test-case processing → HTTP request runner: invokes HTTP
internal/exec/exec.go - HTTP request runner → API service: sends request
internal/exec/curl.go - API service → HTTP request runner: returns response
- Request and test-case processing → Response formatting: formats response
internal/exec/exec.go - Response formatting → jq processor: runs query
- Run orchestrator → Token substitution: substitutes auth token
main.go - Token substitution → Auth token store: looks up token
internal/auth/token-handler.go - Request and test-case processing → Auth token store: stores auth result
internal/exec/exec.go - Request and test-case processing → Output path helper: builds output path
internal/exec/exec.go - Request and test-case processing → Response change detection: compares response
internal/exec/exec.go - Response change detection → Saved responses: reads and writes
internal/diff/diff.go - Request and test-case processing → Run report: records outcomes
internal/exec/exec.go - Run orchestrator → Notification dispatch: sends notification
main.go - Notification dispatch → WebEx delivery: dispatches WebEx
- Notification dispatch → Teams delivery: dispatches Teams
- WebEx delivery → Webhook endpoints: posts alerts
- Teams delivery → Webhook endpoints: posts alerts
- Request and test-case processing → Logging: logs execution
- Run orchestrator → Logging: logs run
main.go