Browsing REST Endpoints

One of the best things about Esri's REST endpoints (and others like this one from the Ed-Fi Alliance) is how you can explore them with your browser just by clicking links. At the "top" of a server you'll find a list of all the services (of type Map, Feature, Geocode, etc) and if you click into those services, you'll see the layers and tables available. At the bottom of each service you'll see the supported functions. Click a layer or table and you'll see the columns available. At the bottom of those pages you'll find links to forms like Query, where you can interactively build a query with a form.

Let's use one of Esri's Sample Servers to explore. Keep in mind that they are always going to publish and un-publish services in this endpoint in order to demonstrate whatever they need. So, when this tutorial uses specific names of things like services and layers, be prepared for them to be wrong. But, we'll still try to provide a peek into the guts of the service. But go ahead and open that link up in another window or tab, then come back here to follow along.

Lots to see there at the top of an endpoint. The version (critical for some functions) is good to know, but below that, in the "Folders:" section is a list of just that - folders - that group services. (Some REST endpoints will have services showing up right here at the "root.") Click the "Energy" folder to get to the next level and see some individual services. Then go back to the root, scroll down under "Services", and click the "Census" link, which brings you to this "endpoint" URL: https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer

Now we can browse through some of the key things developers (and users!) can get out of a REST endpoint:

Click the "Detailed Counties" link. This takes you to details about the individual layer. There's a whole lot of important info here, too, but scroll down to the "Fields:" section. Wow, there's a lot of attributes attached to each county record! Take note of the uppercase field names, you'll need these soon. The Aliases are nice, but they typically only show up if you code specifically for them. Esri has kept things simple here by just making them match the base field names.

Finally, at the bottom of the Layer description, you'll find a "REST" link that is a JSON-version of all this information, and a "Query" link that will lead to a form you can use in the Building Queries section.