Retrieve a list of unique field values using template variables

I have a field -> tags: { context:“blah”, key:“blah”, value:“blah” } in elastic search.

I want to get all the unique keys available so I can create a template variable and allow user to select one tags.key in Grafana.

The query I am using is {“find”: “terms”, “field”: “tags.key.keyword”}, but I don’t seem to be getting anything back.

Thanks for the help!