How do I make a chart’s source dynamic via the API?

To set the source as dynamic, specify the source name in the metric as the percent sign “%”.  See the API doc for more details.