@univ-lehavre/atlas-redcap-stats-cli
v1.0.2
Published
CLI to test REDCap project tokens and inspect API responses
Readme
@univ-lehavre/atlas-redcap-stats-cli
CLI de test des réponses HTTP REDCap par projet.
La commande lit un fichier redcap-token.csv, résout l'URL API depuis les options ou l'environnement, puis teste un projet précis ou tous les projets du CSV. Elle peut changer le content REDCap interrogé, appliquer un timeout, afficher un extrait de corps HTTP et produire une sortie JSON.
Installation (monorepo)
pnpm installUsage
Test one project
pnpm --filter @univ-lehavre/atlas-redcap-stats-cli build
node cli/redcap-stats/dist/bin/atlas-redcap-stats.js --project 25Test all projects
node cli/redcap-stats/dist/bin/atlas-redcap-stats.js --allOptions
--project <id>: test a singleproject_id--all: test all projects from the CSV--api-url <url>: override REDCap API URL--tokens-file <path>: override CSV path (default:redcap-token.csv)--content <name>: REDCap content to test (default:log)--timeout-ms <n>: HTTP timeout in ms (default:12000)--show-body: display a response body preview--json: JSON output
REDCAP_API_URL resolution
Priority order:
--api-urlREDCAP_API_URLenvironment variableapps/redcap-dashboard/.env- root
.env
Example output
[redcap] project 25: HTTP 403 Forbidden
Summary: {"403":1}