Search

  • GET /apps/{app}/search/{datatype}.{ext} Search for data objects

    Search for data objects within an application.

    Search results are provided as a JSON response or as a KML file. The KML file provides the data object's bounding box, title and service definition URL for any geospatial object.

    Request Parameters

    Route Parameters
    Parameter Description Type Options
    app Application alias string rgis, epscor, elseweb
    datatype Type of object to include in the search string datasets, collections, tileindexes (as unordered, comma-delimited list; 1+)
    ext Output format string json, kml
    Query Parameters
    Parameter Description Type Options Required
    version Version of the response JSON to return integer 2 or 3 F (defaults to 2; strongly encouraged to use 3)
    limit Number of data objects to return integer F (defaults to 15)
    offset Start of result set integer F (defaults to 0)
    dir Sort order of the result set string ASC or DESC F (defaults to DESC)
    sort Element to use when sorting the result set. string lastupdate or text F (defaults to date published or georelevance if performing a spatial search)
    start_time Start date for date added comparison. string yyyyMMdd (UTC) F
    end_time End date for date added comparison. string yyyyMMdd (UTC) F
    valid_start Start date for valid date range comparison string yyyyMMdd (UTC) F
    valid_end End date for valid date range comparison string yyyyMMdd (UTC) F
    box Bounding box coordinates as a comma-delimited list string minx,minyy,maxx,maxy F
    epsg EPSG code of the provided BOX geometry string F
    theme Theme keyword (see Return category facets) string F
    subtheme Subtheme keyword (see Return category facets) string F
    groupname Group name keyword (see Return category facets) string F
    query Keyword term(s) string F
    format Filter by supported format type, ex. shp, tif or pdf string F
    service Filter by supported service type string wms, wfs, wcs F
    taxonomy Type of dataset string file, vector, geoimage, table or service F
    geomtype Geometry type (only supported for the taxonomy=vector filter) string any valid OGR geometry type F

    Encode spaces as + if providing a phrase for the query, theme, subtheme, and groupname parameters.

    Examples

    Search for RGIS datasets in Digital Orthophotography and return results as JSON:

    /apps/rgis/search/datasets.json?version=3&limit=10&offset=0&theme=Digital+Orthophotography

    Search for NM EPSCoR datasets and collections that contain the keyword "Quality" and return results as JSON:

    /apps/epscor/search/datasets,collections.json?version=3&limit=10&offset=0&query=Quality

    Search for RGIS datasets in Digital Orthophotography and return the first 10 results as a KML file:

    /apps/rgis/search/datasets.kml?limit=10&offset=0&theme=Digital+Orthophotography

    Response

    JSON response containing a raster, vector and file dataset. See specific data object reference for JSON schema specifications.

    Schema

    This refers only to the JSON response.

    total (integer): number of data objects matching the filters
    subtotal (integer): number of data objects returned in the response
    results (array[dict]): [see data object reference(s) for schema specifications]
    {
        "total": 3,
        "subtotal": 3,
        "results": [
            {
                "downloads": [{"tif": "http://gstore.unm.edu/apps/rgis/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/treslagunasfire2013_1.original.tif"}],
                "lastupdate": "20140325",
                "uuid": "233adca8-5131-4ca1-aac1-669f6be4c530",
                "taxonomy": "geoimage",
                "description": "2013 Tres Lagunas Post Fire, 1",
                "metadata": [
                    {"FGDC-STD-012-2002": {
                        "xml": "http://gstore.unm.edu/apps/rgis/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/FGDC-STD-012-2002.xml",
                        "html": "http://gstore.unm.edu/apps/rgis/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/FGDC-STD-012-2002.html"
                    }},
                    {"ISO-19115:2003": {
                        "xml": "http://gstore.unm.edu/apps/rgis/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/ISO-19115:2003.xml",
                        "html": "http://gstore.unm.edu/apps/rgis/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/ISO-19115:2003.html"
                    }},
                    {
                        "ISO-19119:WMS": {"xml": "http://gstore.unm.edu/apps/rgis/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/ISO-19119:WMS.xml"},
                        "ISO-19119:WCS": {"xml": "http://gstore.unm.edu/apps/rgis/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/ISO-19119:WCS.xml"}
                    }
                ],
                "metadata-modified": {"all": "2014-03-26T03:56:16Z"},
                "spatial": {
                    "epsg": 26913,
                    "bbox": [
                        -105.719133333,
                        35.7587972222,
                        -105.697138889,
                        35.7738111111
                    ]
                },
                "services": [
                    {"wms": "http://gstore.unm.edu/apps/rgis/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/services/ogc/wms?SERVICE=wms&REQUEST=GetCapabilities&VERSION=1.1.1"},
                    {"wcs": "http://gstore.unm.edu/apps/rgis/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/services/ogc/wcs?SERVICE=wcs&REQUEST=GetCapabilities&VERSION=1.1.2"}
                ],
                "preview": "http://gstore.unm.edu/apps/rgis/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/mapper",
                "type": "dataset",
                "id": 367375,
                "categories": [{
                    "subtheme": "2013 Wildfire Data",
                    "theme": "Digital Orthophotography",
                    "groupname": "Tres Lagunas - Post Fire"
                }],
                "name": "treslagunasfire2013_1"
            },
            {
                "downloads": [{"zip": "http://gstore.unm.edu/apps/rgis/datasets/c32e7830-4ee0-4624-8b9c-c386cad3cff4/nm_usfws_lcc.original.zip"}],
                "lastupdate": "20140128",
                "uuid": "c32e7830-4ee0-4624-8b9c-c386cad3cff4",
                "taxonomy": "file",
                "description": "Landscape Conservative Cooperatives for New Mexico",
                "metadata-modified": {"all": "2014-01-29T03:01:31Z"},
                "spatial": {
                    "epsg": 4326,
                    "bbox": [
                        -109.050183,
                        31.332177,
                        -103.001973,
                        37.000299
                    ]
                },
                "services": [],
                "metadata": [
                    {"FGDC-STD-001-1998": {
                        "xml": "http://gstore.unm.edu/apps/rgis/datasets/c32e7830-4ee0-4624-8b9c-c386cad3cff4/metadata/FGDC-STD-001-1998.xml",
                        "html": "http://gstore.unm.edu/apps/rgis/datasets/c32e7830-4ee0-4624-8b9c-c386cad3cff4/metadata/FGDC-STD-001-1998.html"
                    }},
                    {"ISO-19115:2003": {
                        "xml": "http://gstore.unm.edu/apps/rgis/datasets/c32e7830-4ee0-4624-8b9c-c386cad3cff4/metadata/ISO-19115:2003.xml",
                        "html": "http://gstore.unm.edu/apps/rgis/datasets/c32e7830-4ee0-4624-8b9c-c386cad3cff4/metadata/ISO-19115:2003.html"
                    }},
                    {"ISO-19110": {"xml": "http://gstore.unm.edu/apps/rgis/datasets/c32e7830-4ee0-4624-8b9c-c386cad3cff4/metadata/ISO-19110.xml"}}
                ],
                "type": "dataset",
                "id": 354872,
                "categories": [{
                    "subtheme": "General",
                    "theme": "Boundaries",
                    "groupname": "New Mexico"
                }],
                "name": "nm_usfws_lcc"
            },
            {
                "downloads": [{
                    "shp": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.derived.shp",
                    "zip": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.original.zip",
                    "gml": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.derived.gml",
                    "kml": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.derived.kml",
                    "geojson": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.derived.geojson",
                    "json": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.derived.json",
                    "csv": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.derived.csv",
                    "xls": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.derived.xls"
                }],
                "lastupdate": "20140303",
                "uuid": "bf9e4928-d76c-4973-addd-b3efa96c70c5",
                "taxonomy": "vector",
                "description": "SCAN Adams Ranch, NM (Feb, 2014)",
                "valid_dates": {
                    "start": "20140201",
                    "end": "20140301"
                },
                "metadata": [
                    {"FGDC-STD-001-1998": {
                        "xml": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/metadata/FGDC-STD-001-1998.xml",
                        "html": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/metadata/FGDC-STD-001-1998.html"
                    }},
                    {"ISO-19115:2003": {
                        "xml": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/metadata/ISO-19115:2003.xml",
                        "html": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/metadata/ISO-19115:2003.html"
                    }},
                    {
                        "ISO-19119:WMS": {"xml": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/metadata/ISO-19119:WMS.xml"},
                        "ISO-19119:WFS": {"xml": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/metadata/ISO-19119:WFS.xml"}
                    },
                    {"ISO-19110": {"xml": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/metadata/ISO-19110.xml"}}
                ],
                "metadata-modified": {"all": "2014-03-03T23:40:37Z"},
                "spatial": {
                    "epsg": 4269,
                    "bbox": [
                        -105.416666667,
                        34.25,
                        -105.416666667,
                        34.25
                    ]
                },
                "services": [
                    {"wms": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/services/ogc/wms?SERVICE=wms&REQUEST=GetCapabilities&VERSION=1.1.1"},
                    {"wfs": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/services/ogc/wfs?SERVICE=wfs&REQUEST=GetCapabilities&VERSION=1.0.0"}
                ],
                "preview": "http://gstore.unm.edu/apps/rgis/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/mapper",
                "type": "dataset",
                "id": 363331,
                "categories": [{
                    "subtheme": "SCAN",
                    "theme": "Climate",
                    "groupname": "New Mexico"
                }],
                "name": "scan_201402_2015"
            }
        ]
    }
    
                                    
  • GET /apps/{app}/search/collection/{uuid}/datasets.{ext} Search for datasets within a collection

    Request Parameters

    Route Parameters
    Parameter Description Type Options
    app Application alias string rgis, epscor, elseweb
    uuid Collection identifier uuid
    ext Response format string json
    Query Parameters

    Note: the collection filters are the same as the data object search filters. See Search for data objects for more information.

    Examples

    Coming soon.

  • GET /apps/{app}/search/categories.json Return category facets

    Return the facets available at the specified level and description.

    Request Parameters

    Route Parameters
    Parameter Description Type Options
    app Application alias string rgis, epscor, elseweb
    Query Parameters
    Parameter Description Type Options Required
    node Facet definition string F

    Encode spaces as + if providing a phrase for the node parameter.

    Separate the theme, subtheme, groupname terms (in that order) with __|__ for the node parameter.

    Examples

    Return all root facets for RGIS:

    /apps/rgis/search/categories.json

    Return any child facets for Socioeconomic Data in RGIS:

    /apps/rgis/search/categories.json?node=Socioeconomic+Data

    Return any child facets for Boundaries/General in RGIS:

    /apps/rgis/search/categories.json?node=Boundaries__|__General

    Response

    Schema
    total (integer): number number of facet elements returned
    results (array[dict]):
    text (string): facet name
    leaf (boolean): indicates facet order; if true, the facet has no sub-facets
    id (string): facet hierarchy
    cls (string):

    Response for any higher order facet (will contain children):

    {
        "total": 14,
        "results": [
            {
                "text": "American Community Survey (ACS) - Tabular",
                "leaf": false,
                "id": "Socioeconomic Data__|__American Community Survey (ACS) - Tabular"
            },
            {
                "text": "Annual City Data",
                "leaf": false,
                "id": "Socioeconomic Data__|__Annual City Data"
            }
        ]
    }
                                    

    Response for lowest order facet (no children):

    {
        "total": 11,
        "results": [
            {
                "text": "Accommodation and Food Services",
                "leaf": true,
                "id": "Socioeconomic Data__|__Economic Census 2002__|__Accommodation and Food Services",
                "cls": "folder"
            },
            {
                "text": "Administrative & Support & Waste Management & Remediation Service",
                "leaf": true,
                "id": "Socioeconomic Data__|__Economic Census 2002__|__Administrative & Support & Waste Management & Remediation Service",
                "cls": "folder"
            }
        ]
    }
                                    
  • GET /apps/{app}/search/{geolookup}.json Search geospatial lookups

    Search one of the supported geospatial lookup sets (USGS quad names, GNIS placenames, etc) for bounding box identification. Supports the data object spatial searches.

    Note: occasionally USGS quad names change. Whenever possible, the set is updated to reflect those changes.

    Note: this service is limited to New Mexico.

    Request Parameters

    Route Parameters
    Parameter Description Type Options
    app Application alias string rgis, epscor, elseweb
    geolookup Geospatial lookup set string nm_quads, nm_gnis, nm_counties
    Query Parameters
    Parameter Description Type Options Required
    limit Number of data objects to return integer F (defaults to 25)
    offset Start of result set integer F (defaults to 0)
    dir Sort order of the result set string ASC or DESC F (defaults to DESC)
    query Keyword search string F (encode spaces as "+")
    epsg EPSG code for the result set bounding boxes. integer F (defaults to WGS84)

    Encode spaces as + if providing a phrase for the query parameter.

    Examples

    Return the first 20 USGS quads containing "Clovis" in any alias for RGIS:

    /apps/rgis/search/nm_quads.json?query=clovis&limit=20

    Response

    Schema
    results (array[dict]):
    box (array[double]): bounding box coordinates as minx, miny, maxx, maxy
    text (string): object name

    Response for a quad name search:

    {"results": [
        {
            "box": [
                -106.375,
                32.75,
                -106.25,
                32.875
            ],
            "text": "Heart of the Sands - 32106-G3"
        },
        {
            "box": [
                -106.375,
                32.8749961853027,
                -106.25,
                33.0000038146973
            ],
            "text": "Heart of the Sands NE - 32106-H3"
        }
    ]}