I dont have a JMeter example but it should be very straight forward. I think I cover the API itself in one of my recent Perf Clinics - the one where I talk about the Spring Boot, Microservice App.
Also - keep in mind that using the External Test API will only generate these metrics in the Test Automation Dashlet. Which is great if you want to use it for what it was intended. You also get baselining per build, ... -> but - remember: these metrics wont be available as regular metrics.
If you have a script running it would be great to put it out there on GitHub