Fix EZP-22147: Use the template URI instead of manually building the URI with query parameters

JIRA issue: https://jira.ez.no/browse/EZP-22147

Implemented.