When using PyQgis for QGIS 3.4 is it possible to add a new WMS/WMTS Server to the Data Source Manager?
If yes and once created, is it then possible to add a new WMS layer to the map using the new connection within a Python plugin?
I have been trying to add a layer using authentication but my server needs to pre-authenticate so that is not working and in any case the only way it works using the normal GUI is to select the two ignore GetCapabilities options in the Data Source Manager anyway so it is unlikely it would work via QgsRasterLayer anyway.