I'm retrieving event details for a plugin, and thanks to some help here, I am now using the correct API to access the information. However, I am currently using the following to generate a registration link for an event, but I'd like to do the same using APIv4. I've searched the API reference and the API Explorer, with no luck.
$id = $event['id'];
$reglink = CRM_Utils_System::url( 'civicrm/event/register', "reset=1&id=$id" );