Book Image

Programming ArcGIS with Python Cookbook, Second Edition

By : Donald Eric Pimpler, Eric Pimpler
Book Image

Programming ArcGIS with Python Cookbook, Second Edition

By: Donald Eric Pimpler, Eric Pimpler

Overview of this book

Table of Contents (22 chapters)
Programming ArcGIS with Python Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Getting started with the ArcGIS REST API


Before we dive too far into the coding, you need to understand some basic concepts of the ArcGIS REST API. You need to specifically know how to construct a URL and interpret the response that is returned.

Getting ready

All the resources and operations of the ArcGIS REST API are exposed through a hierarchy of endpoints, which we'll examine as we move through the course of this book. For now, let's examine the specific steps that you need to understand to submit a request to the API through Python. In this recipe, you will learn how to use the ArcGIS Server Services directory to construct URL requests.

How to do it…

We're going to use a publicly available ArcGIS Server instance to learn how to use the tools provided by the Services directory to construct a URL request:

  1. Open a web browser (preferably Google Chrome or Firefox).

  2. Go to http://sampleserver1.arcgisonline.com/arcgis/rest/services:

  3. Next, we need to determine the well-known endpoint. This represents...