GetQuery Reference

GetQuery will take in a free-form SQL query and return the matching rows from a given resource. Supports Resource Chaining.


Parameter nameTypeDescription
fieldsComma separated alpha-numeric string Comma separated list of columns to return. Supports chained fields.
showSchemaBoolean Set to true to see all the field definitions in the response layers. Default: true
outputString The output type for the page. Possible types include 'XML', 'JSON', 'JSONXML', 'HTML', 'CSV', 'excel.sheet', and 'CUSTOM'.
obsIdString (Required for JSON/JSONXML output) The object listening for the JSON callback.
obsSuccessMethodString (Required for JSON/JSONXML output) The JSON success callback function.
obsErrorMethodString (Required for JSON/JSONXML output) The JSON error callback function.
transformerString (Required for CUSTOM output) The XSLT to use to transform the XML output.
dataSourceComma separated alpha-numeric string(Required) The name of the data source to query against.
inclusionGeometriesString Semi-colon separated WKT Geometries that will include any results that intersect any of them.
exclusionGeometriesString Semi-colon separated WKT Geometries that will exclude any results that intersect any of them.
contextPointWell-known text A WKT Point that is the starting point of a context query.
returnGeoTypeAlpha-numeric string The returning geometry type. There are 3 return types.
  • 1 = geometry ( the whole geometry is returned)
  • 2 = none ( no geometry is returned)
  • 3 = centroid ( only centroid)
queryString An SQL attribute criteria determining whether or not to use the database or a ShapeFileQuery.
attributeLinksComma separated alpha-numeric string A list of Links (see Resource Chaining) that correspond to each layer in layers. These Links will be used as attributes when applying styles.
orderByAlpha-numeric string The column name to sort by
sortDirAlphabetic string Direction of sort. Must be either:
  • Asc = ascending (default)
  • Desc = descending
maxCacheSizeInteger The maximum number of records that will be used in cache.
maxRecordsInteger The maximum amount of resulting records.
minRecordsInteger The minimum amount of resulting records.
geoBufferDistPositive decimal A distance to expand the geometry for a buffered search.
geoBufferUnitAlpha-numeric string The units used for geoBufferDist. Must be one of the following: 1 = mile, 2 = kilometer, 3 = meter (default), 4 = feet
cacheBoolean If set to true, results are cached on the server. Caching only occurs for the base query, but not the linked query.
useTransformerString Specifies the URI of the XSLT transformer to apply to the output if the output is XML. If the output parameter is specified then this parameter will have no effect (since it only works on XML output).

Supported URI protocols:

  • http://
  • file://
viewInTimeString Format (optional hh:mm:ss): YYYY-MM-DD hh:mm:ss. Gets a snapshot of the matching records at the specified point in time.
includeHistoryBoolean If set to true, allows creation of custom historical queries using DMP transaction fields.
activeVersionIdAlpha-numeric string Query will be performed on published records and records pending by the specified active version ID.


See Resource Chaining for the standard output format.

Depending on the given output parameter, GetQuery will give results in either a CSV file, Excel sheet, or an XML file. If useTransformer is specified then the resulting output can be anything that can be represented in an XML like language such as XHTML or possibly even Office 2007 XML formats.