Retrieving Mock ID via script

Hi,
Since Adding a mock always generate a new ID (eg.
https://a4c72e3c-4er4-e444-874e-5df4233f9a6.mock.pstmn.io), is it possible to retrieve that ID and feed it into the environment variable somehow rather than just manually doing it ?
Any suggestions ?

Found it! You can use the postman API (https://api.getpostman.com/mocks) to get all the mocks and drill down to find the mockUrl you are looking for