pagerduty-cli
pagerduty-cli copied to clipboard
feature-request: --data= via file
Right now --data for rest put expects the entire JSON to be provided.
For ease of tooling, it would be very nice to support data via file.
AWSCLI has precedent for this: --data=@filename - if the first character is @, then the rest of the arg is a filename, and should be slurped before processing as before.
It would also permit easy changes like:
pd rest get -e teams/$ID | jq '.team.name|="newname"' | pd rest put -e teams/$ID --data=@/dev/stdin