USB Interface for the nRF52840 USB Dongle

I would like to write a program to communicate directly to the Dongle over USB.  The plan is for manufacturing test fixtures to communicate with the 'device under test' over BLE.  They would connect to a service and perform test operations.  Is there an API over USB to the Dongle so I can get the basic operations that are also found in the nRFConnect; connect, discover services, read, write, and disconnect?  Or in other words, how does nRFConnect get its functionality?