Getting Started with the REST API
Get to know about REST APIs.
Requirements
-
Geo Addressing SDK (GA SDK) distribution (ga-sdk-{version}.zip)
- Once unzipped, you will need the GA SDK CLI located in "{directory}/ga-sdk-{version}/cli"
- Dataset(s) in the Spectrum data format (*.spd)
- For additional detail, see System Requirements.
Placeholders
The following conventions are used as placeholders for some common items:- {directory} Any directory where you would like to install the resources for the SDK.
- {version} The version of the GA SDK such as 3.0.0.
- {spd} Dataset in the Spectrum data format. For example, KGD082019.spd.
Configure using the GA-SDK CLI
- Create a location where datasets will be installed.
- Windows:
mkdir {directory}/data - Linux:
mkdir-p {directory}/data
- Windows:
- Run the GA-SDK CLI. The command below starts the CLI in autocomplete mode. Note:The GA-SDK CLI can be run in autocomplete or batch mode. [About the CLI Batch Process.]
- Windows:
cd{directory}/ga-sdk-{version}/clicli.cmd - Linux:
cd {directory}/ga-sdk-{version}/cli cli.sh
- Windows:
- Locate .spd file(s) and extract the dataset(s). [About the Extract command.]
extract -s "{spd}" -d "{directory}/data" - Configure data for the SDK, based on the dataset location, by running this
command from within the autocomplete CLI. [About the Configure
command.]
configure -s "{directory}/data" -d "{directory}/ga-sdk-{version}/resources/config"
Sample Application
As you explore the REST services, you may find the Geo Addressing SDK Sample useful. This is a web application with autocomplete functionality that demonstrates how service requests and responses work. The URL is relative to the server context, depending on where the WAR file is deployed. URL: http://{server}:{port}/{:context}/sample/index.html
For example, to try the typeahead feature, click in the sample application.
Note:
Before using the sample application, make sure you have installed and configured your geocoding datasets with the GA-SDK CLI, as described in the previous steps.