Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This will eventually be simplified to make use of the Brown Dog Tools Catalog (analogous to an app store).

Calling the DAP

The DAP can be accessed at:

http://dap.ncsa.illinois.edu:8184/convert/<output_format>/<input_file>

For example posting the file below to the following endpoint will convert the native Ameriflux data over the range specified in the XML to the PEcAn netCDF CF format:

http://browndog.ncsa.illinois.edu/examples/US-Dk3-2001-2003.xml

http://dap.ncsa.illinois.edu:8184/convert/pecan.zip/

In the case of web hosted files as the XML file above one can simply URL encode it directly at the end of the REST endpoint above:

http://dap.ncsa.illinois.edu:8184/convert/pecan.zip/http%3A%2F%2Fbrowndog.ncsa.illinois.edu%2Fexamples%2FUS-Dk3-2001-2003.xml

Note this will actually execute if clicked on.  The endpoint will returne immeidiatley with a URL pointing to the eventual location of the resutling output file.  This file will not exist until the Software Servers needed pick up the job and carry out the conversion.  If the result URL is accessed before the job is completed a 404 File Note Found will be returned.  This can be used by an application to poll the DAP until the job is completed.  One should note also that as a distributed service it may never return (e.g. if the needed Software Servers are all killed) thus programs should be smart enough to handle this. Most modern program languages provide means of making HTTP requests, which is what is required to access a REST service.  For example in R one option is:

http://cran.r-project.org/web/packages/httpRequest/index.html