You can retrieve a list of all content library IDs in your virtual environment, regardless of their type, by using the Library service.

You can use the list() function to retrieve all local and subscribed libraries in your system.