AnsweredAssumed Answered

How do you programmatically find if a mapservice is AGOL Hosted or published on ArcGIS for Server?

Question asked by akmanchianand on Aug 4, 2014
Latest reply on Aug 4, 2014 by akmanchianand

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

Outcomes