Getting Started Guide

The What?

The UGRC Web API is an http enabeled service for accessing (via the internet) the geospatial data that UGRC stores in the State Geographic Information Database (SGID). These services are a great way to add geospatial functionality to your web pages and applications.

The Who?

This guide and API are designed for people familiar with programming concepts to get started quickly and start making cool apps.

The Why?

The demand for geospatial and location based information has increased dramatically as many disciplines realize the power of spatial data. A customers address stored in a database has only so many uses. With this API, the door opens to many spatial opportunities from visually seeing customer locations on a map to being able to spatially analyze their relationship or patterns in conjunction with other events such as disease occurrence, natural disaster affected areas, and other location based occurrences.

If there is a need to geocode addresses or find out useful information from a physical entity stored in the SGID using your favorite programming language, then this API for you.

The How?

Make a GET or POST http request to our API and it will reply with the answer. The API Explorer lists all the services we currently provide. The explorer also shows you the url pattern for the service, all the required and optional parameters, what http verb to use, as well as a place to make a sample request. The exact url for the request will be displayed and the response will also be displayed. The response will be serialized as JSON. In order to make a successful request, you will have to generate a unique API Key.

Account Creation

We require you to create an account. Your account gives you access to create and manage your API keys. It also give you insight to how often your keys are being used. You can judge the popularity of the functionality based on these numbers. Be sure to confirm your email address or API requests will not complete.

Key Creation

Once you have have an account, you can create API keys. Each key is specific to an application you have created; Either a browser or desktop based application.

When creating a browser key, you provide the base url for the application. In the example of http://atlas.utah.gov, the url for the key would be atlas.utah.gov/* which is sudo regular expression syntax. All requests that originate from the url provided will authenticate properly and the API will handle your request. Each key you create will track usage and you can look at your analytics in your Console.

URL Pattern Description
www.example.com
or
www.example.com/
or
www.example.com/*
Matches all referrers in the domain www.example.com
example.com/* Matches only referrers at example.com, but no subdomains
*.example.com Matches all referrers at all subdomains of example.com
www.examples.com/test
or
www.example.com/test/
or
www.example.com/test/*
Matches all referrers in www.examples.com/test/ and all subpaths

It is important to note, that when developing on a local computer you create a Development code. localhost or machine name will only work with Development API keys.

When creating a desktop key, you provide the ip address of that computer. For example, if I was running a python script on my local computer, I would generate a key with my computers ip address - lets call it 123.199.0.1.

Wrap Up

  1. You've created an account.
  2. You've confirmed your email address.
  3. You've generated a key.
  4. You've chosen what services you want to use.

All that is left to do is choose your favorite programming language or framework and start making http requests.