I have an ArcGIS Pro web layer that's sourced to an ArcGIS Server URL (not Portal). How do I use the Pro SDK to export the metadata? I know how to do this with File Geodatabases and SDE connection files:
var gdbItem = ItemFactory.Instance.Create("K:\\connection_files\\ice_production.sde\\ice_production.ICE_OWNER.ARCTIC_WEEKLY");
IMetadata gdbMetadataItem = gdbItem as IMetadata;
gdbMetadataItem.SaveMetadataAsHTML(metadataFile.FullName, MDSaveAsHTMLOption.esriArcGISFull);
And I know the web URL for the layer as a metadata link: https://server.esri.com/arcgis/rest/services/SIPAS/Arctic/FeatureServer/6/metadata
The metadata is a customer requirement for a data export from ArcGIS Pro as part of a larger ArcGIS Pro AddIn. I need to write this out to a file as HTML along with the exported data. I would like to use the ArcGIS Server as a source for the metadata instead of using a file path, but I can't seem to get it working or find examples on how to do it.