we are missing a way to invoke the GetStorageDomainsByImageId query in the REST API.
this query is being used in the GUI in the 'Disks -> Storage' sub-tab.
[this query returns the list of storage domains on which a specified image resides. this list can contain more than 1 item in case the specified image is a template image (as template images can be cloned across multiple storage domains]
This is already available for disks, as each disk has a reference to the storage domain where it resides, and there can be only one in this case:
#!/bin/sh -ex
url="https://ovirt.example.com/ovirt-engine/api";
user="admin@internal"
password="****"
curl \
--verbose \
--insecure \
--request GET \
--user "${user}:${password}" \
--header "Accept: application/xml" \
"${url}/disks/9409b1fa-f653-498b-97b8-f4bb4fb0e4a3"
<disk id="...">
<name>mydisk</name>
<alias>mydisk</name>
<storage_domains>
<storage_domain id="23bae86f-0da9-4a1b-a0a1-f13c6d503984"/>
</storage_domains>
...
</disk>
To fix this bug what remains to be done is to add this same "storage_domains" section to templates.