I'm looking to take periodic PDF snapshots of a SearchDisplay's output for archiving purposes.
I see Demerit's option as a possible solution, but in my tests so far the cv api4 SearchDisplay.download
call only generates a blank output file.
My code is similar to this sample code:
cv api4 SearchDisplay.download savedSearch=saved_search_name display=search_display_name format=csv > report.csv
When I run the same command in the API Explorer v4 with output to array
, I see the correct values.
But when I run the same code via a bash script, the output file is empty. It does generate the output file, but it's blank. I get the same empty file when I run the script with other output formats like csv
and pdf
.
It's probably something simple. I'm just stuck. Any ideas?
Thanks.
Civi 5.65.0 + Drupal 10.