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 vwp
    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
    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
    model_run_uuid The model run uuid that is specific to all model sets uuid F
    model_set Defines the set of data you are searching for string inputs, outputs, analytics F
    model_set_type Defines the type of data to search for within a model set string raw, binary, vis F
    externalapp limit search to only the datasets that are assoiated with external app. string F
    externaluserid limit search to only the datasets that are assoiated with external userid. UUID F
    model_set_taxonomy Defines the taxonomy of data to search for within a model set string grid, vector, file F
    parent_model_run_uuid The parent model run uuid for this model run set uuid F
    modelname Name of model used for this dataset string F
    timestamp_start Start Date and Time for timestamp range search string yyyy-MM-ddThh:mm:ss F
    timestamp_end End Date and Time for timestamp range search string yyyy-MM-ddThh:mm:ss F
    state The state the model run was run in string New Mexico, Idaho, Nevada F
    location Name of Watershed in this state string F
    model_run_name Descriptive name of this model run string F
    model_vars Comma delimited string of variables represented by inputs and outputs string F

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

    Examples

    Search for Virtual Watershed datasets in ISNOBAL model and return results as JSON:

    /apps/vwp/search/datasets.json?version=3&limit=10&offset=0&modelname=isnobal

    Search for Virtual Watershed datasets in ISNOBAL model and return the first 10 results as a KML file:

    /apps/vwp/search/datasets.kml?limit=10&offset=0&modelname=isnobal

    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://vwp-dev.unm.edu/apps/vwp/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://vwp-dev.unm.edu/apps/vwp/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/FGDC-STD-012-2002.xml",
                        "html": "http://vwp-dev.unm.edu/apps/vwp/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/FGDC-STD-012-2002.html"
                    }},
                    {"ISO-19115:2003": {
                        "xml": "http://vwp-dev.unm.edu/apps/vwp/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/ISO-19115:2003.xml",
                        "html": "http://vwp-dev.unm.edu/apps/vwp/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/ISO-19115:2003.html"
                    }},
                    {
                        "ISO-19119:WMS": {"xml": "http://vwp-dev.unm.edu/apps/vwp/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/metadata/ISO-19119:WMS.xml"},
                        "ISO-19119:WCS": {"xml": "http://vwp-dev.unm.edu/apps/vwp/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://vwp-dev.unm.edu/apps/vwp/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/services/ogc/wms?SERVICE=wms&REQUEST=GetCapabilities&VERSION=1.1.1"},
                    {"wcs": "http://vwp-dev.unm.edu/apps/vwp/datasets/233adca8-5131-4ca1-aac1-669f6be4c530/services/ogc/wcs?SERVICE=wcs&REQUEST=GetCapabilities&VERSION=1.1.2"}
                ],
                "preview": "http://vwp-dev.unm.edu/apps/vwp/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://vwp-dev.unm.edu/apps/vwp/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://vwp-dev.unm.edu/apps/vwp/datasets/c32e7830-4ee0-4624-8b9c-c386cad3cff4/metadata/FGDC-STD-001-1998.xml",
                        "html": "http://vwp-dev.unm.edu/apps/vwp/datasets/c32e7830-4ee0-4624-8b9c-c386cad3cff4/metadata/FGDC-STD-001-1998.html"
                    }},
                    {"ISO-19115:2003": {
                        "xml": "http://vwp-dev.unm.edu/apps/vwp/datasets/c32e7830-4ee0-4624-8b9c-c386cad3cff4/metadata/ISO-19115:2003.xml",
                        "html": "http://vwp-dev.unm.edu/apps/vwp/datasets/c32e7830-4ee0-4624-8b9c-c386cad3cff4/metadata/ISO-19115:2003.html"
                    }},
                    {"ISO-19110": {"xml": "http://vwp-dev.unm.edu/apps/vwp/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://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.derived.shp",
                    "zip": "http://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.original.zip",
                    "gml": "http://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.derived.gml",
                    "kml": "http://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.derived.kml",
                    "geojson": "http://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.derived.geojson",
                    "json": "http://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.derived.json",
                    "csv": "http://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/scan_201402_2015.derived.csv",
                    "xls": "http://vwp-dev.unm.edu/apps/vwp/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://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/metadata/FGDC-STD-001-1998.xml",
                        "html": "http://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/metadata/FGDC-STD-001-1998.html"
                    }},
                    {"ISO-19115:2003": {
                        "xml": "http://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/metadata/ISO-19115:2003.xml",
                        "html": "http://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/metadata/ISO-19115:2003.html"
                    }},
                    {
                        "ISO-19119:WMS": {"xml": "http://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/metadata/ISO-19119:WMS.xml"},
                        "ISO-19119:WFS": {"xml": "http://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/metadata/ISO-19119:WFS.xml"}
                    },
                    {"ISO-19110": {"xml": "http://vwp-dev.unm.edu/apps/vwp/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://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/services/ogc/wms?SERVICE=wms&REQUEST=GetCapabilities&VERSION=1.1.1"},
                    {"wfs": "http://vwp-dev.unm.edu/apps/vwp/datasets/bf9e4928-d76c-4973-addd-b3efa96c70c5/services/ogc/wfs?SERVICE=wfs&REQUEST=GetCapabilities&VERSION=1.0.0"}
                ],
                "preview": "http://vwp-dev.unm.edu/apps/vwp/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 vwp, vwp, 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 vwp, vwp, 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/vwp/search/categories.json

    Return any child facets for Socioeconomic Data in vwp:

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

    Return any child facets for Boundaries/General in vwp:

    /apps/vwp/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 vwp, vwp, 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 20)
    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/vwp/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"
        }
    ]}
                                    
  • GET /apps/{app}/inventory.json Search Inventory

    Search for an inventory of requested items. Returns a list of items for each parameter passed, including a number of total options.

    Future work will include a total amount for each individual option.

    Request Parameters

    Route Parameters
    Parameter Description Type Options
    app Application alias string vwp
    Query Parameters
    Parameter Description Type Options Required
    researchers Returns list of researchers (selected from existing user ids)
    modelname Returns list of model names in the database
    statename Returns list of state names in the database
    watershedname Returns list of model names in the database
    keywords Returns list of keywords in the database
    Examples

    Return lists of model names, state names and watershed names

    /apps/vwp/inventory.json?modelname&statename&watershedname

    Response

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

    Response for a model name -> state name -> watershed name search:

    [
        {
            "num": 1,
            "param": "watershedname",
            "watershedname": [
                {
                    "watershed":
                        ["Dry Creek"]
                }
            ]
        },
        {
            "modelname": [
                {
                    "model":
                        ["isnobal"]
                },
                {
                    "model":
                        ["reference"]
                }
            ],
            "num": 2,
            "param": "modelname"
        },
        {
            "num": 1,
            "param": "statename",
            "statename": [
                {
                    "state":
                        ["Idaho"]
                }
            ]
        }
    ]