Yeah, the --json parameter wasn’t added until v7.82 (released March 5, 2022).
The newer --json parameter is a shortcut alternative to this:
curl --silent --header "Content-Type: application/json" --header "Accept: application/json" --data 'JSON' https://api.pushover.net/1/messages.json
Replace the word “JSON” with the contents of your report.tmpl
file. It’ll be easier if you strip all of the newlines so that it’s one long string – e.g., from this…
{
"BackupResult": "{{.result}}",
"BeginTime": "{{.start_time}}",
"TotalFiles": "{{.total_files}}",
"Storage": "{{.storage_url}}",
"token": "YOUR_APP_TOKEN",
"user": "YOUR_USER_TOKEN",
"message": "Backup {{.result}}. {{.total_files}} files in {{.directory}}",
"title": "Backup Completed"
}
… to this:
{ "BackupResult": "{{.result}}", "BeginTime": "{{.start_time}}", "TotalFiles": "{{.total_files}}", "Storage": "{{.storage_url}}", "token": "YOUR_APP_TOKEN", "user": "YOUR_USER_TOKEN", "message": "Backup {{.result}}. {{.total_files}} files in {{.directory}}", "title": "Backup Completed" }