Pretty sure it is possible with a small simple script in the Web API Playground,
there are a lot of examples on the community, haven’t seen this request before but maybe you get inspired by one of this,
Developer Web API Playground - Notes of geeky oneliners
or one of the many other posts.