The url templates provided for call of the API with space information was missing the /api/ section in it.
(cherry picked from commit 35f1cc16eaa29666d7212402f57ab17858ebc96d)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>