3 Mapfluence REST Paths
As described in Mapfluence REST Overview, all of the information needed for Mapfluence to respond to a client request is built into the path used to make that request, which means that understanding how to build the path is key to getting the server to respond with the kind of map or data you want. These paths are covered in the following sections:
|3.1 About Mapfluence Paths||go: top|
The paths that are passed to the Mapfluence server generally appear in one of two contexts:
The following examples show these two different forms of the same path, which requests a list of the datasets in the Mapfluence Data Catalog:
GET /2.0/<apiKey>/catalog/datasets HTTP/1.1
As shown above, Mapfluence REST paths include the following parts:
While these basic path components (except version) are present in all Mapfluence REST requests, the structure of the complete path varies depending whether the request is for mapping or text data.
Note: For brevity, example paths in the remainder of this document will be expressed in the HTML link form described above. These paths may be used in the address field of a browser to see the returned map or data.
|3.2 Mapping Paths||go: top|
The following example illustrates the path structure used for a mapping request to the Mapfluence visual API, in this case for a map with a base layer and one simple layer overlay showing school district boundaries:
In this mapping example, the path is composed of the following parts:
|3.3 Spatial Query Paths||go: top|
The following example illustrates the path structure used for a non-mapping request, in this case a spatial query that asks for a feature named "Alaska" from the data catalog's geometry table of U.S. states (from the U.S. Census dataset):
In this query example, the path is composed of the following parts:
In spatial queries (/spatialquery, /estimate, /spatialops, and /geocoder) many different parameters may be specified using the query string (for specifics, refer to the REST reference for each type of spatial query).
Note: Query strings are case sensitive.
|3.4 Data Catalog Paths||go: top|
The path structure described in Spatial Query Paths is used not only for spatial queries but also for data catalog queries (/catalog), such as the following request for a list of datasets in the Mapfluence data catalog:
In data catalog queries the query string is optional. The only currently supported query string parameter is start, which is used to specify the index of the first item when a query returns a list. In a catalog/datasets query, for example, if start=50 then the first dataset in the returned list will be the dataset at index 50 in the collection of datasets.