Index patterns search not finding results of existing index patterns

Worked out how to use the API to target different Spaces from this post:

Looks like my issue will be fixed by recreating the index patterns in each space with new IDs and relinking the visualisations to the new index-pattern.

A bit of work but should sort everything out.