Search

MENU

For Developers

All of the data available through the data portal is stored on the GSTORE platform. The Geographic Storage, Transformation and Retrieval Engine (GSTORE) has been developed as a flexible, scalable data management, discovery and delivery platform that supports a combination of Open and Community standards for client access. It is built upon the principle of a services oriented architecture that provides a layer of abstraction between data and metadata management technologies and the client applications that consume the services published by the platform.

The GSTORE API is the basis for all of the data portal’s functionality - dataset search, dataset access, documentation access, and OGC service access.

Basic API Services
Search Parameters
Request
Output
JSON Response
Dataset Access
Elements to Note
Dataset Streaming Request
OGC Services
Basic Request Structure

Basic API Services

For a full listing of the API services, please visit the GSTORE site.

Host: http://gstore.unm.edu/apps/epscor

top

Search Parameters:

  • version: optional. 2 or 3. Strongly recommend using version 3 for any new development.
  • limit: optional. Integer. Defaults to 15.
  • offset: optional. Integer. Defaults to 0.
  • start_time: optional. Date as yyyyMMDD. UTC. Start date for the date added search.
  • end_time: optional. Date as yyyyMMDD. UTC. End date for the date added search.
  • box: optional. Bounding box coordinates in WGS84 as a comma-delimited list (minx, miny, maxx, maxy)
  • theme: optional. Search term for the theme (category level 1). Use + to separate words.
  • subtheme: optional. Search term for the theme (category level 2). Use + to separate words.
  • groupname: optional. Search term for the theme (category level 3). Use + to separate words.
  • query: optional. Keyword search terms. Use + to separate words.
  • sort: optional. lastupdate (sort by date added) or text (sort alphabetically by dataset title). Defaults to lastupdate.
  • dir: optional. asc or desc. Sort order of the result set

top

Request:

/search/datasets.json?version=3&limit=10&theme=Biota
/search/datasets.kml?version=3&limit=10&theme=Forest+Homestead+Act+of+1906

top

Output:

Search results are rendered as JSON or KML. The KML file contains the dataset bounding boxes as the geometry data.

top

JSON Response:

total: number of datasets that meet the filter requirements (excluding limit/offset)
results: list of dataset elements

Example:

{
    "total": 2,
    "results": [
        {
            "downloads": [{"zip": "http://gstore.unm.edu/apps/epscor/datasets/1e340e75-f527-46c6-b80e-4924f0b567c5/BioBlitz_Results_2013-5.original.zip" target="}],
            "lastupdate": "20130716",
            "uuid": "1e340e75-f527-46c6-b80e-4924f0b567c5",
            "taxonomy": "file",
            "description": "Sandia Mountain Natural History Center BioBlitz (May 2013)",
            "valid_dates": {
                "start": "20130517",
                "end": "20130518"
            },
            "gr": 0,
            "spatial": {
                "epsg": 4326,
                "bbox": [
                    -106.379139,
                    35.124919,
                    -106.379139,
                    35.124919
                ]
            },
            "services": [],
            "metadata": [{
                "FGDC-STD-001-1998": {
                    "xml": "http://gstore.unm.edu/apps/epscor/datasets/1e340e75-f527-46c6-b80e-4924f0b567c5/metadata/FGDC-STD-001-1998.xml",
                    "html": "http://gstore.unm.edu/apps/epscor/datasets/1e340e75-f527-46c6-b80e-4924f0b567c5/metadata/FGDC-STD-001-1998.html"
                },
                "ISO-19115:2003": {
                    "xml": "http://gstore.unm.edu/apps/epscor/datasets/1e340e75-f527-46c6-b80e-4924f0b567c5/metadata/ISO-19115:2003.xml",
                    "html": "http://gstore.unm.edu/apps/epscor/datasets/1e340e75-f527-46c6-b80e-4924f0b567c5/metadata/ISO-19115:2003.html"
                }
            }],
            "metadata-modified": {"all": "2013-08-30T21:08:34Z"},
            "id": 351565,
            "categories": [{
                "subtheme": "Inventory",
                "theme": "Biota",
                "groupname": "New Mexico"
            }],
            "name": "BioBlitz_Results_2013-5"
        },
        {
            "downloads": [{"zip": "http://gstore.unm.edu/apps/epscor/datasets/f8eddee7-c826-4012-abf9-c511798d3663/BioBlitz_Results_2012-2.original.zip"}],
            "lastupdate": "20121019",
            "uuid": "f8eddee7-c826-4012-abf9-c511798d3663",
            "taxonomy": "file",
            "description": "Sandia Mountain Natural History Center BioBlitz (August 2012)",
            "valid_dates": {
                "start": "20120810",
                "end": "20120811"
            },
            "spatial": {
                "epsg": 4326,
                "bbox": [
                    -106.379139,
                    35.124919,
                    -106.379139,
                    35.124919
                ]
            },
            "services": [],
            "metadata": [{
                "FGDC-STD-001-1998": {
                    "xml": "http://gstore.unm.edu/apps/epscor/datasets/f8eddee7-c826-4012-abf9-c511798d3663/metadata/FGDC-STD-001-1998.xml",
                    "html": "http://gstore.unm.edu/apps/epscor/datasets/f8eddee7-c826-4012-abf9-c511798d3663/metadata/FGDC-STD-001-1998.html"
                },
                "ISO-19115:2003": {
                    "xml": "http://gstore.unm.edu/apps/epscor/datasets/f8eddee7-c826-4012-abf9-c511798d3663/metadata/ISO-19115:2003.xml",
                    "html": "http://gstore.unm.edu/apps/epscor/datasets/f8eddee7-c826-4012-abf9-c511798d3663/metadata/ISO-19115:2003.html"
                }
            }],
            "gr": 0,
            "id": 277001,
            "categories": [{
                "subtheme": "Inventory",
                "theme": "Biota",
                "groupname": "New Mexico"
            }],
            "name": "BioBlitz_Results_2012-2"
        }
    ]
}

top

Dataset Access

Access to an individual dataset is accomplished through the service request:

/datasets/{UUID}/services.json
/datasets/bc68ffde-5ea6-4de3-aa1a-182b6b2aeab2/services.json

This return the dataset element, identical to each dataset element in the search results, for one dataset.

Example:

{
    "lastupdate": "20130924",
    "uuid": "bc68ffde-5ea6-4de3-aa1a-182b6b2aeab2",
    "taxonomy": "geoimage",
    "downloads": [{
        "tif": "http://gstore.unm.edu/apps/epscor/datasets/bc68ffde-5ea6-4de3-aa1a-182b6b2aeab2/m_3310631_nw_13_1_20110521.original.tif",
        "sid": "http://gstore.unm.edu/apps/epscor/datasets/bc68ffde-5ea6-4de3-aa1a-182b6b2aeab2/m_3310631_nw_13_1_20110521.derived.sid"
    }],
    "description": "BULL GAP SW, NW NAIP DOQQ (3310631) - 2011",
    "metadata": [{
        "FGDC-STD-012-2002": {
            "xml": "http://gstore.unm.edu/apps/epscor/datasets/bc68ffde-5ea6-4de3-aa1a-182b6b2aeab2/metadata/FGDC-STD-012-2002.xml",
            "html": "http://gstore.unm.edu/apps/epscor/datasets/bc68ffde-5ea6-4de3-aa1a-182b6b2aeab2/metadata/FGDC-STD-012-2002.html"
        },
        "ISO-19119:WMS": {"xml": "http://gstore.unm.edu/apps/epscor/datasets/bc68ffde-5ea6-4de3-aa1a-182b6b2aeab2/metadata/ISO-19119:WMS.xml"},
        "ISO-19115:2003": {
            "xml": "http://gstore.unm.edu/apps/epscor/datasets/bc68ffde-5ea6-4de3-aa1a-182b6b2aeab2/metadata/ISO-19115:2003.xml",
            "html": "http://gstore.unm.edu/apps/epscor/datasets/bc68ffde-5ea6-4de3-aa1a-182b6b2aeab2/metadata/ISO-19115:2003.html"
        },
        "ISO-19119:WCS": {"xml": "http://gstore.unm.edu/apps/epscor/datasets/bc68ffde-5ea6-4de3-aa1a-182b6b2aeab2/metadata/ISO-19119:WCS.xml"}
    }],
    "spatial": {
        "epsg": 4326,
        "bbox": [
            -106.253325,
            33.5590527778,
            -106.184144444,
            33.6284583333
        ]
    },
    "services": [
        {"wms": "http://gstore.unm.edu/apps/epscor/datasets/bc68ffde-5ea6-4de3-aa1a-182b6b2aeab2/services/ogc/wms?SERVICE=wms&REQUEST=GetCapabilities&VERSION=1.1.1"},
        {"wcs": "http://gstore.unm.edu/apps/epscor/datasets/bc68ffde-5ea6-4de3-aa1a-182b6b2aeab2/services/ogc/wcs?SERVICE=wcs&REQUEST=GetCapabilities&VERSION=1.1.2"}
    ],
    "preview": "http://gstore.unm.edu/apps/epscor/datasets/bc68ffde-5ea6-4de3-aa1a-182b6b2aeab2/mapper",
    "id": 352669,
    "categories": [{
        "subtheme": "2011 NAIP",
        "theme": "Digital Orthophotography",
        "groupname": "NAIP Imagery - New Mexico (1m)"
    }],
    "name": "m_3310631_nw_13_1_20110521"
}

top

Elements to note:

  • description: the dataset title
  • lastupdate: the date the dataset was added to the system (yyyyMMdd)
  • spatial: contains the dataset bbox in WGS84 and the original EPSG of the dataset.
  • metadata: a list of metadata options available for the dataset. We currently support FGDC, ISO 19115 and ISO 19119 for most datasets.
  • downloads: a list of download options for the dataset.
  • services: a list of service options for the dataset. In most cases, these are pointers to the OGC GetCapabilities request.

Note: every download generated by the system is provided as a compressed (ZIP) file with the data file and the metadata file.

Vector datasets can also be accessed through the dataset streaming request. This request is uncompressed, is limited to text-based formats and does not include any metadata options.

top

The dataset streaming request:

/datasets/{UUID}/dataset.{ext}
/datasets/027303aa-635f-4a14-8dd0-4e6d3b95d452/dataset.json

The exact structure of the response is dependent on the format requested (limited to csv, kml, gml, json, geojson), but includes the dataset identifier, a complete set of attribute data, and a UTC timestamp (if the dataset is based on timeseries data).

top

OGC Services

For any spatial dataset, GSTORE provides a few OGC service options: WMS, WFS or WCS.

The basic request structure:

/datasets/{UUID}/services/ogc/{service}?SERVICE={service}&REQUEST={request}&VERSION={service version}

For more information on the OGC service options (supported services, supported methods and supported query parameters), visit the MapServer OGC documentation. GSTORE uses MapServer to generate the WxS responses and supports all options (as listed in the GetCapabilities).

top

Networks: 

NM EPSCoR contributes its data to the DataONE network as a member node. Through participation in this network, whose mission is to enhance search and discovery of Earth and environmental data, NM EPSCoR is able to reach a wider audience with and maintain high availability of its data.