Exports all tags as json from GatewayContext

Hi,

I want to export all tags from all the providers as a json file from a gateway scope. The goal is to have the same file layout as the file generated by the "Export tags" button in the designer. Thanks

So far, i have this code :

for (TagProvider tagProvider : gatewayContext.getTagManager().getTagProviders()) {
		Results<NodeDescription> r = tagProvider.browseAsync(tagPath, BrowseFilter.NONE).get(30, TimeUnit.SECONDS);
	}

What happens when you run your code?

Probably the easiest thing to do would be to call into the scripting system, believe it or not. The implementation of this function is non-trivial.

If you insist, you'll want to use getTagConfigsAsync, not browseAsync, and com.inductiveautomation.ignition.common.tags.TagUtilities#toJsonObject.