Discovering Services
The ArcGIS Runtime SDK for Android consumes ArcGIS Server services using the REST API. The ArcGIS Server REST infrastructure provides the ArcGIS Services Directory application to discover information about the services available on an ArcGIS Server site.
Use ArcGIS Services Directory to search for available services (including secure services with proper login) and view service details such as:
- the REST url to consume the service
- tile levels for cached map services
- extent and supported operations
- layer information
- required input for locator services
- input and output types for tools in a geoprocessing service
Opening the ArcGIS Services Directory
To open the ArcGIS Services Directory for an ArcGIS Server site, you must know the url of the server instance. The ArcGIS Server instance is typically available off the Web server's root in the "arcgis" directory. The ArcGIS Services Directory is in the "rest/services" folder inside the instance. For example, if an ArcGIS Server instance is available at www.example.com, the ArcGIS Services Directory would be located at http://www.example.com/arcgis/rest/services
Contact your ArcGIS Server system administrator if you are uncertain about the server url or ArcGIS instance.
Finding information about a service
Use the ArcGIS Services Directory to obtain information about a service you need to use with the ArcGIS Runtime SDK for Android. In most cases you will copy a service's url from the address bar in your browser and paste it in your code. For example, a map service named "California" and hosted on the server serverapps.esri.com might have a url of http://serverapps.esri.com/arcgis/rest/services/California/MapServer.
For all ArcGIS Server services, the server type is appended to the end of the url and is required to specify the type of service used.
Services Directory also allows you to search for layer IDs you can use to identify and query features within particular layers. The layer IDs can be found in the Layers list on a map service's properties page. Each layer also contains a list of attribute field names which can be used to create a query and define return fields in a query result.
Some services may be secure so that only authorized users may access them. Log in to the ArcGIS Services Directory to see which services you have access to.