Using REST Endpoints

The modern web runs on Representational State Transfer, or REST, allowing applications to consume services from a variety of "RESTful" services in order to sustain a distributed architecture. In other words, you don't have to own all the hardware, software, and data simply to build a web application nowadays.

Each REST service is typically served up via a REST endpoint, at a browsable URL. Think of these endpoints as oak trees in a large forest, each producing consistently large amounts of acorns, to the point where they are available on demand. As a web developer, much like a squirrel, with very little effort you are free to browse around and gather acorns from as many trees as you need in order to build up your cache of food for the winter - or the application you hang your hat on.

This web site is not a REST endpoint, but a basic tutorial on how to use them in order to build an application using HTML, CSS, and Javascript. Using spatial services in the flavor of Esri's REST API (NOT the only RESTful service out there - here's an example API from USGS) for demonstration purpose, we'll show you how to browse a REST endpoint, use it to build queries via HTML and Javascript, demonstrate a classic spatial query, and show you how to get GeoJSON for modern web maps.

Along the way, in order to keep the demo code simple, we'll lean on frameworks like JQuery and Leaflet. But, much like how Esri's REST services are not the only such services out there, you are free to discover and use your own Javascript frameworks and mapping libraries out there.

Of course, there are plenty of in-depth tutorials out there on REST. (This blog from looks really well-done.) So, we'll keep these pages short, sweet, and focused on some common map-making techniques.