follows on from #21940. The API endpoints existed for this already, so this PR just adds CLI functionality which uses those API endpoints. Generated with the help of Mux