GetByKey Reference

GetByKey will take in a list of fields and values, and return a list of records with the passed field values. Moreover, optional inclusion geometry may be specified.  If specified, any results that intesect any of the inclusion geometry's extents are kept; otherwise, those rows are discarded.


Input

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.
keyNameComma separated alpha-numeric string(Required) Comma-separated list of field names
keyValueString(Required) List of field values in the following form: value1:value2:...:valueN,value1:value2:...:valueN.
For Example if keyName=LOCATION_ID,TAX_ID form will be LOCATION_ID1:TAX_ID1,LOCATION_ID2:TAX_ID2,LOCATION_IDN:TAX_IDN.
prefixAlpha-numeric string Prefix string to append to the result.
geoBufferDistPositive decimal The amount of buffer given to the inclusion geometry.
geoBufferUnitAlpha-numeric string The units used for geoBufferDist. Must be one of the following: 1 = mile, 2 = kilometer, 3 = meter (default), 4 = feet
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)
maxRecordsComma separated alpha-numeric string The maximum number of results to return. Comma separated link names and their maximum number of results to return may also be specified in the form LinkName(someNumber).
Ex. ...datasource=Parcels&fields=*,PropertyLocation(TAX_ID)&maxRecords=50,PropertyLocation(3)...
Means to return a max of 50 results for Pacels, and 3 results for the PropertyLocation link.)
geoFilterWell-known text Filters out results that intersect the given WKT geometry. May have more than one geometry by using semi-colon.
cacheBoolean If set to true, server will cache the results as a shape file. If set to false, server will return regular GetByKey.
maxCacheSizeInteger Default 1000. The maximum amount of records that will be used in cache.
indexFieldsComma separated alpha-numeric string Comma separated list of fields that will be searched on in the cache. This parameter is only applicable when cache is set to true.
customFieldsComma separated alpha-numeric string Comma separated list of user-defined fields. These fields will be added on top of the original GetByKey result. This parameter is only applicable when cache is set to true.
fieldTypesComma separated alpha-numeric string Comma separated list of types for each custom field. This parameter is only applicable when cache is set to true. Required if customFields are set.
fieldLengthsComma separated alpha-numeric string Comma separated list of lengths for each custom field. This parameter is only applicable when cache is set to true. Required if customFields are set.
fieldValuesString Comma separated list of values for each custom field. A newline character should be specified for each additional row.
E.g. customFields=myCustomField1,myCustomField2&fieldValues=abc,def%0A123,456
will result into the sub-table:
myCustomField1myCustomField2
abcdef
123456
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.
activeVersionIdAlpha-numeric string Query will be performed on published records and records pending by the specified active version ID.



Output

See Resource Chaining.