Skip To Content
ArcGIS Developer
Dashboard

Using the Services Directory

The Services Directory allows you to browse the contents of an ArcGIS Server and obtain information that can be useful when developing applications. The Services Directory is a view of the ArcGIS Server REST API in HTML format. Each ArcGIS Server instance has the Services Directory installed during the installation process.

With the Services Directory, you can do the following:

  • Browse the contents of the GIS Server and get service-level metadata.

    Navigate a series of links to view information about the services on your GIS Server. The links also allow you to preview how your service looks in ArcGIS Pro, a web browser, ArcGIS Earth, and so on.

  • Get information to help you develop applications.

    When you develop applications with the JavaScript APIs, you must provide URLs to services and the layers and functionality they expose. The Services Directory provides an interactive way for you to construct those URLs.

The Services Directory works using REST. REST is an architectural style that allows ArcGIS Server to reveal a hierarchy of information about itself through endpoints, or URLs. When you use the Services Directory, you navigate through a series of links to discover information about the server. Each time you click a link, you see a new page that reveals additional information about what's available on the server. The information that you see on the page is retrieved through REST using the page's URL.

Browsing the server contents

When you open the Services Directory, you first see the home page, which lists all services in the root directory along with any folders containing additional services. In addition to the name of the service, you can see the service type, such as MapServer or GeocodeServer.

Note:

The server administrator determines the folder structure. You cannot control this through the Services Directory.

Click a service name to get more information. The available information varies depending on the type of service. If you click a map service (MapServer), you'll see information such as layer names, document information, and supported interfaces. If you continue clicking through the levels of links, you can get information about the individual layers in the service. In this way, the Services Directory exposes a large amount of metadata for your services.

Viewing footprints of your server

A footprint is a geographic catalog of all your services. When you view the footprints of your server, it opens a feature collection in Map Viewer Classic showing a place-mark for each available service. Clicking the place-mark reveals more information about the service in a pop-up dialog box.

If you view footprints at the root level of the server, you'll see services from the root level. You can also view footprints at each folder level.

View footprints in

You can use footprints to show what's on your server. You can use the Services Directory to discover the URL to your footprint. Right-click the footprint link to copy the footprint URL. Then when you share the URL with others, they can always get the most up-to-date view of what's available on your server.

Note:

Map Viewer Classic supports the viewing of footprints only when the services are unsecured or when secured using token-based authentication.

Viewing maps

When you publish a map service, you can get the contents in several different formats using the Services Directory. When you navigate to a map service's page, you'll see the View In option to view it in different applications. These include the following:

  • ArcGIS JavaScript—This URL provides a simple preview of the map in a web browser. The preview uses ArcGIS API for JavaScript. The advantage of this option is that it does not require any special software on the client.
  • ArcGIS Online Map Viewer Classic—This URL provides a preview of a map service, image service, feature service, or feature service layer in ArcGIS Online Map Viewer Classic. For feature layers, this also provides access to the feature editing capability available in ArcGIS Online. Cached map services are displayed as a basemap in ArcGIS Online unless the map is in one of the Web Mercator projections (SR 102113, 102100, or 3857). This URL is not shown for secured services.
  • ArcGIS Earth—This URL provides the contents of the map as a KML network link (.kmz) and is suitable for use in ArcGIS Earth. The KML uses ground overlays to show a rasterized version of the map. If the map is cached in a supported coordinate system, KML regions are used. This link is not available if services are secured using token-based authentication.
    Legacy:

    At ArcGIS Enterprise 10.6, the View In Google Earth option is no longer available.

  • ArcGIS Explorer—This URL provides an ArcGIS Explorer map file (.nmf) referencing the service. Use this option to view your service in 3D using ArcGIS Explorer. This link is not available if services are secured using token-based authentication.

Generating KML

All map and image services have a KML network link available that you can browse to using the View In: ArcGIS Earth link. If you want a network link with properties or feature types other than the default, such as the vector feature type, you can use the Services Directory to generate your own KML network link.

To generate your own KML network link, navigate to the page of the map service you want to view. From the Map Operations list, click the Generate KML link.

Note:

The Generate KML link is not available if the server administrator has disabled the KML capability for the service. The link is also not available if services are secured using token-based authentication.

Generate KML link

On this page, you can set some basic properties for your KML network link, including the name, the layers to include, and the layer drawing options. To see vector features, choose the third option, Vector layers as vectors and raster layers as images.

Generate KML panel
Note:

The server administrator may have limited or disabled some of the options you might otherwise be able to set for your network link in the Services Directory. For example, the administrator may have disabled the ability for the server to return vector features, or the administrator may have set a limit on how many KML features the server can return.

Once you generate the network link, you can distribute it to others as needed. One advantage of distributing a network link instead of static KML is that the network link points to the KML capability on the map service. Referencing dynamic KML in this way ensures that you will always see the most up-to-date features.

Getting information for development

The Services Directory can help you get information that you need when developing JavaScript applications. The JavaScript APIs included with ArcGIS Server are based on REST, and every ArcGIS Server instance exposes its information through REST endpoints or URLs. Each endpoint returns some piece of information about the server or one of its services.

For example, using the ArcGIS Server JavaScript API, you can write some code that displays a map in a web browser. This code requires the REST endpoint of the map service, which might look something like the following:

https://sampleserver6.arcgisonline.com/arcgis/rest/services/Water_Network_Base_Map/MapServer

How do you know how to construct this endpoint? If you're familiar with ArcGIS Server, you may be able to construct the endpoint from memory. But it's more likely that you'll use the Services Directory to help you discover the endpoint. Using the Services Directory, you can browse through the contents of your server until you reach the map service. You can then copy the URL out of the browser and paste it in your code.

Using the Services Directory in your development

The code to add a cached map to your application looks something like this:

myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer
 ("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Water_Network_Base_Map/MapServer");
myMap.addLayer(myTiledMapServiceLayer);

Notice the URL for the REST endpoint of the map service (sampleserver6.arcgisonline.com/arcgis...). If you did not know this URL, the following steps could help you discover it using the Services Directory:

  1. Open a web browser to sampleserver6.arcgisonline.com/arcgis/rest/services. It's helpful to remember this URL pattern https://<server name>/<instance name>/rest/services, as this is how you open the Services Directory for a given GIS server.
  2. Click the Water_Network_Base_Map link, since this is the service whose URL you want to find.
  3. Copy the URL from the browser and paste it in your code.

Copy the URL from the browser.

Sometimes you need to work with an individual layer in the map. For example, the code to set up a query on a layer starts like this:

function init() {
 //build query
 myQueryTask = new esri.tasks.QueryTask
  ("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Water_Network_Base_Map/MapServer/78");
. . .

The URL used in the code above looks a lot like the URL for the map, with the addition of an index (in this case, 78) that tells which layer to get. The index comes from the position of the layer in the map's table of contents. Since you may not immediately know the index, you can use the Services Directory to find it.

To see how this works, see step 3 above. Before you copy the URL, notice the information on the page about the Water_Network_Base_Map map service. You'll see a clickable list of layers. Clicking any layer gives you a new URL with the layer index that you can use inside your code.

Learn more about the REST API and the Services Directory

For more details about the ArcGIS REST API and using the Services Directory to test URLs, see Getting started with ArcGIS Server REST API.