Web Services

  • GET /apps/{app}/datasets/{uuid}/services/ogc/{wxs} Access WxS service

    Request Parameters

    Route Parameters
    Parameter Description Type Options
    app Application alias string rgis, epscor, elseweb
    uuid Dataset identifier uuid
    wxs OGC Service Type string wms, wfs, wcs
    Query Parameters

    GSToRE uses MapServer to provide OGC services. Please see MapServer for more information regarding the required query parameters and their definitions.

    To identify which OGC services are supported for a given dataset, please refer to the dataset's service response (Get dataset description). This information can also be found in the dataset's documentation (Download dataset documentation).

    Examples

    View the WMS GetCapabilities response for the 2013 Jaroso Post Fire Imagery, 32 raster dataset:

    /apps/rgis/datasets/43db7a5d-67ec-4635-aef6-97131bf390cb/services/ogc/wms?SERVICE=wms&REQUEST=GetCapabilities&VERSION=1.1.1

    Response

    The structure of the response varies depending on the OGC service and query parameters selected.

    Note that the WCS response is a multi-part response and should be handled accordingly.

    Notes

    The OGC services have been successfully tested against QGIS 2.2 (Valmiera), ArcGIS 10.2 and gdal/ogr.

  • GET /gettoken Receive Swift Authorization Information

    Obtain authentication information to utilize Swift file transfer services with the Virtual Watershed Platform.

    Requires proper authentication.

    Request Parameters

    Route Parameters
    Query Parameters
    Examples

    Obtain a token using python

    s = requests.Session()
    login = s.get('https://vwp-dev.unm.edu/apilogin', auth=('yourusername','yourpassword'), verify=False)
    rawtoken = s.get('https://vwp-dev.unm.edu/gettoken')
    tokenjson = json.loads(rawtoken.text)
    print tokenjson['preauthurl']
    print tokenjson['preauthtoken']
                               

    Response

    Returns a json with two fields.

    preauthurl: the url to use for swift uploads

    preauthtoken: the authentication token to use for swift uploads

    Use these tokens to establish a connection to swift as in the following example:

    swift upload [modelid] -S 1073741824 [filename] --os-storage-url=[preauthurl] --os-auth-token=[preauthtoken]

    This will upload a file to a container with the model id of your model run to the url you were passed using the token for authentication.

    For a full use case, see documentation for Dataset Upload (Swift).