ArcGIS Services published to GIS Servers should hold the information of the registered Datastore(s) that contain the data in the service. For example, I have an enterprise geodatabase with vector data registered with a GIS Server. When I add feature classes or tables from a connection that matched the one registered to a map that I publish, the map service should store in the manifest the ID of the datastore (The one that displays in the REST Admin API at admin/data/items/enterpriseDatabases/<Registered Datastore Name>).
Currently, it seems that there is an ID for the datastore in the manifest, but it looks unique to each service, so the same database with the same connection properties has different IDs if its data is added to two different map services.
Once this gets implemented, This should also be exposed to the ServiceManager object in the arcgis.gis.server module of the ArcGIS Python API