CLI Commands
Regulations
Section titled “Regulations”Browse
Section titled “Browse”midlyr regulations browse --query "provisional credit" --authorities cfpbCalls GET /api/v1/regulations.
midlyr regulations read 01HXZ3K4M7QR9VP2N8WYJF5GTBCalls GET /api/v1/regulations/{id} and returns the document’s metadata, total size, and table of contents.
Read Content
Section titled “Read Content”midlyr regulations content 01HXZ3K4M7QR9VP2N8WYJF5GTB --offset 0 --limit 40000Calls GET /api/v1/regulations/{id}/content and returns a slice of the document’s plain text.
Analysis
Section titled “Analysis”Screen
Section titled “Screen”midlyr analysis screen \ --scenario dispute \ --text "we can't provide a provisional dispute credit until the investigation is completed"Calls POST /api/v1/analysis/screen and returns a job id. --scenario is required; valid values are marketing_asset, dispute, debt_collection, complaint, and generic.
Get Job
Section titled “Get Job”midlyr jobs get job_01HY3K4M7QR9VP2N8WYJF5GTBCalls GET /api/v1/jobs/{id} and returns the current status plus typed result when complete.
Async Screening Example
Section titled “Async Screening Example”JOB_ID=$(midlyr analysis screen \ --scenario dispute \ --text "we can't provide a provisional dispute credit until the investigation is completed" \ --json | jq -r '.id')
midlyr jobs get "$JOB_ID"