Select to view content in your preferred language

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

735
2
08-04-2014 06:34 AM
WhereMatters
Frequent Contributor

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

0 Kudos
2 Replies
nicogis
MVP Frequent Contributor

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

0 Kudos
WhereMatters
Frequent Contributor

I can see the owningSystemUrl property on hosted services. However, i dont see it on 10.1.1 or 10.2 or 10.2.1 arcgis for server !

0 Kudos