A Bash implementation of this: https://www.ovirt.org/develop/release-management/features/storage/backup-restore-api-integration/
Read the script, fill in your details (like username & password). $ovbackup is the virtual machine doing the backup (and runs this script).
There is a new python version of this script at: https://github.com/voidloop/ovirt-python-backup