Is there a way to find if a map/feature service is AGOL hosted or is published through ArcGIS Server?
We need to identify this programmatically. Tried to look and compare the service infos, but they look very identical and unable to latch on to an attribute that tells you if a service is published on ArcGIS Server or AGOL Hosted.
The url patterns are quite different though.
For arcgis server it is always http:://<hostname>/<arcgisinstance>/rest/services
For hosted services it is always http:://services.arcgis.com/<orgid>/arcgis/rest/services
I'm not sure but you can see Server Information
http://services.arcgis.com/yourid/arcgis/rest/info?f=pjson
and see "owningSystemUrl" : 'http://www.arcgis.com' If it's arcgis.com it's hosted.
The property owningSystemUrl is added in 10.1 SP1