Currently there is no out of the box support for such dynamic metrics.
Although we can imagine plugin.json generator based on data returned by your URL and automatically sending it to Dynatrace server. Due to some limitations regarding metric definition changes previous plugin should be deleted before sending the new one. That would lead to some data gaps but if metrics do not change very often that could work.
final MonitorMeasure dynamiccompletedCountMeasure = env.createDynamicMeasure(completedCountMeasure, "Platform Name", name);
I haven't tried from a plugin, but maybe you could register the custom metric dynamically using the Environment API and send the metrics:
I'm not sure if the plugin would stop you when trying to send data for metric keys that are not defined in the JSON. If it does, then you would just push the dynamic data using the Environment API and push the "statically" defined metrics using the plugin.