I would like to know how to bind the methods used by the "Connect" button which retrieve services capabilities through the OWSConnect to correctly build the URL with paramas (or QgsDataSourceURI) from each layer capacity without opening the dialog or request the GetCapabilities URL by myself.
I'm looking for a "pure" PyQGIS solution, not using a dependency like OWSLib because I need parse ArcGIS Server services (Map and Features).
Any idea?
I'm interested in PyQGIS 2.18.x and 3.x.

OWSLib because I need parse ArcGIS Server services (Map and Features).but OWSLib deals in interface standards such as WMS and WMST, so will work with services provided by ArcGIS, just as well as Mapserver or Geoserver. I'm assuming that you mean OGC interface standards such as those mentioned because you talk about GetCapabilities, which is an operation of such standards. – nmtoken Apr 13 '18 at 15:45ArcGIS Server services (Map and Features).in combination with your phase endingwithout opening the dialog or request the GetCapabilities URL by myself.means you want to access OGC WMS and OGC WFS supplied by ArcGIS, and owslib can handle those. If you don't mean such services using such standards, then you might want to ask a different question! I take on board though you want a pure approach and not use owslib, it's just the reasoning seems a little misguided. – nmtoken Apr 13 '18 at 15:55In PyQGIS, you can add a layer if you know everything about it: "(CRS, layername...) : QgsVectorLayer(service_layer_uri(), 'Manual - Esri Feature Service', 'arcgisfeatureserver')".
What I ask is how to obtain the details about the service, exactly as QGIS UI does (in https://qgis.org/api/2.18/classQgsSourceSelectDialog.html#details)
– Guts Apr 13 '18 at 16:35