# Response-decode pipeline (#515): the payload is a base64-encoded, gzipped CSV
# inside a JSON envelope (the shape of many "report bytes" export APIs).
#
# faucet validate cli/examples/rest_decode_report.yaml
# faucet run cli/examples/rest_decode_report.yaml
version: 1
name: decode_report
pipeline:
source:
type: rest
config:
base_url: "https://api.example.com"
path: /reports/latest
auth: { type: bearer, config: { token: "${env:AUTH_TOKEN}" } }
pagination: { type: none }
decode:
- extract: "$.d.reportBytes" # pull the encoded blob out of the envelope
- base64
- gunzip
- parse: { format: csv }
sink:
type: jsonl
config: { path: ./out/report.jsonl }