How to identify a service type

805
3
07-13-2017 11:40 AM
HowardWard
New Contributor

We are working on a Geo Mashup project where we are given multiple data sources, including GeoServer WFS urls and Esri ArcGIS Feature Service urls. So we have the need to identify the service types (OGC WFS or Esri Feature Service) on the fly in the code.

Say we are given two ArcGIS Feature Service urls such as
https://gis.arkansas.gov/arcgis/rest/services/FEATURESERVICES/Boundaries/FeatureServer/0, or https://gis.arkansas.gov/arcgis/rest/services/FEATURESERVICES/Boundaries/FeatureServer

1)  Is there any signature in the url content telling us they are Esri Feature Services?
2)  Can we tell the version of ArcGIS Servers were used to publish the services?
3)  How can we tell the difference between the first link and the second link?

Thanks!

0 Kudos
3 Replies
KellyGerrow
Esri Frequent Contributor

Hi Howard,

Most of the answers to your questions can be queried through the REST API:

General Service Information including URL specifics:

1) Working_with_services_you_ve_published 

2) Version of ArcGIS Server

3) Feature Service Vs. Feature Layer

-Kelly

BoGuo
by
New Contributor II

Thanks, Kelly.

  1. Per "Getting started" section, the ArcGIS REST end point pattern is http://<host>/<site>/rest/services/<folder>/<serviceName>/<serviceType>.  I guess we could check the existence of "/rest/services/" in a given url to make the determination.  Is this the way to go?   
  2.  OK.
  3. Can one assume that an url matching ArcGIS REST end-point pattern plus "/" (where represent any numeric number) is "Feature Layer"?

Please kindly advise if there are more elegant ways than url pattern matching...

Bo

0 Kudos
KellyGerrow
Esri Frequent Contributor

Hi BO,

1. I think this is the way to go. I don't know of other software that uses this pattern, but I'll tag Developers‌, in case they have other strategies.

3. A feature layer will always have a layer number appended whereas the feature service will not have any numbers. From the feature service URL, you can find the feature layers and other properties for the entire service. The feature layer url provides layer specific access to information.

-Kelly