|
|
|||
|
||||
Please note that the interface described here is still a prototype, and subject to change.
/are mapped to datasets
/and
/catalog.xmlare mapped to directories
_metadata.xmlrefer to the metadata associated with that directory or dataset
Double slashes are removed. Spaces are replaced with underscores.
If the path does not exist a priori, a new resource will be created. For a valid request, all path elements (tokens in the path) for the new resource are created. If a path exists a priori, the resource will be updated.
Note that datasets and metadata are handled separately. The client must ensure that the two are properly synchronized by performing the appropriate operations.
In creating a new resource, the user name that is provided via Tomcat authentication is used as the "owner" of a resource. The server does not include this name in any way in the path provided by the client. If the client wants a user name in the path, then it must be provided explicitly as part of the path.
It is an error to update a resource by a user that is not the owner of that resource.
| PUT | http://server:8080/tdr/lead/<path> | data file to be uploaded | Puts or updates data file in location specified | |
| PUT | http://server:8080/tdr/lead/<path>/ | none | Creates a container in location specified | If container exists a priori, nothing is changed. |
| PUT | http://server:8080/tdr/lead/<path>&unpack=<type> | data file to be uploaded | Puts or updates data file in location specified, unpacks it. | The collection is put under the <path>, e.g., a path
testand a tar file rooted by a directory called codewould result in a path test/code/.... The type must be one of these file name extensions: .tar, .tar.Z, .tar.zip, .tar.gzip, .tar.gz, and .tar.bz2. |
| PUT | http://server:8080/tdr/lead/<path>/&unpack=<type> | none | Error, can't unpack a container | |
| PUT | http://server:8080/tdr/lead/<path>/_metadata.xml | XML file of metadata values | Puts metadata for dataset or container | Depends on existence of dataset or container, error otherwise. Values for keys defined in keyset are placed with those keys. Values for keys not defined in keyset are placed as properties. See section on "TDR Metadata XML Schema" for further information. |
Add a container called "wxChallenge" and a nested dataset called "experiment_notes" to the above:
PUT http://servername:8080/tdr/lead/Anne/wxChallenge/experiment_notes
(file is attached as body)
Add metadata to
"experiment_notes" to the above:
PUT http://servername:8080/tdr/lead/Anne/wxChallenge/experiment_notes_metadata.xml
(metadata is attached as body in XML format)
Update the dataset called
"Anne/wxChallenge/experiment_notes":
PUT http://servername:8080/tdr/lead/Anne/wxChallenge/experiment_notes
(file is attached as body)
Update metadata to
"experiment_notes" to the above:
PUT http://servername:8080/tdr/lead/Anne/wxChallenge/experiment_notes_metadata.xml
(metadata is attached as body in XML format)
| GET | http://server:8080/tdr/lead/<path> | Returns data file from location specified | |
| GET | http://server:8080/tdr/lead/<path>/ | Returns THREDDS catalog from location specified | |
| GET | http://server:8080/tdr/lead/<path>_metadata.xml | Returns metadata for dataset or container in XML | Depends on existence of dataset or container, error otherwise. |
Get the dataset called "Anne/wxChallenge/experiment_notes":
GET http://servername:8080/tdr/lead/Anne/wxChallenge/experiment_notes
Get the metadata associated with "experiment_notes" in XML format:
GET http://servername:8080/tdr/lead/Anne/wxChallenge/experiment_notes_metadata.xml
It is an error to remove a resource by a user that is not the owner of that resource.
| DELETE | http://server:8080/tdr/lead/<path> | Deletes data file from location specified | Also deletes metadata |
| DELETE | http://server:8080/tdr/lead/<path>/ | Deletes container and everything below it from location specified | Also deletes metadata |
| DELETE | http://server:8080/tdr/lead/<path>_metadata.xml | Deletes metadata for dataset or container in XML | Depends on existence of dataset or container, error otherwise. |
Remove the metadata associated with "experiment_notes" in XML format:
DELETE http://servername:8080/tdr/lead/Anne/wxChallenge/experiment_notes_metadata.xml
Remove the dataset called "Anne/wxChallenge/experiment_notes":
DELETE http://servername:8080/tdr/lead/Anne/wxChallenge/experiment_notes
Remove the the container called "Anne" and everything below it:
DELETE http://servername:8080/tdr/lead/Anne/
<?xml version="1.0" encoding="UTF-8"?>
<document>
<NVPair name="name">regexp</NVPair>
<NVPair name="dataType">Image</NVPair>
<NVPair name="dataFormatType">BUFR</NVPair>
<NVPair name="summary">the quick brown fox</NVPair>
<NVPair name="startTime">2007-06-28 11:40:00Z</NVPair>
<NVPair name="endTime">2007-06-28 11:40:00Z</NVPair>
<NVPair name="north">20.0</NVPair>
<NVPair name="south">10.0</NVPair>
<NVPair name="east">40.2</NVPair>
<NVPair name="west">30.1</NVPair>
<NVPair name="title">New User Title</NVPair>
<NVPair name="publisherName">Anne</NVPair>
<NVPair name="publisherUrl">www.unidata.ucar.edu</NVPair>
<NVPair name="publisherEmail">anne@unidata.ucar.edu</NVPair>
<NVPair name="xlink" title="unidata">http://www.unidata.ucar.edu</NVPair>
<NVPair name="new name 1">value</NVPair>
<NVPair name="new name 2">5.2</NVPair>
</document>
Predefined metadata elements are defined in the section below.
These keys are mapped directly to THREDDS metadata elements. Other keys and their values are stored in THREDDS metadata as properties.
Note that currently the xlink
key requires an attribute
that is the title of the xlink.
| title | A title. | Any value provided by the client. | ||
| publisherName | Name of person publishing. | Any value provided by the client. | ||
| publisherEmail | Email address for publisher. | Any value provided by the client. | ||
| publisherURL | URL for publisher. | Any value provided by the client. | ||
| north | Northern latitude boundary. | A numeric value. | Default is 50.0. | |
| west | Western longitude boundary. | A numeric value. | Default is -115.0. | |
| east | Eastern longitude boundary. | A numeric value. | Default is -60.0. | |
| south | Southern latitude boundary. | A numeric value. | Default is 25.0. | |
| summary | A textual description. | Any string. | ||
| startTime | Beginning time coverage. | Must be in form: "2007-06-28T11:40:00". | ||
| endTime | End time coverage | Must be in form: "2007-06-28T11:40:00". | ||
| xlinkTitle_0 | Title of URI 0. | Any string. | ||
| xlinkURI_0 | URI 0 | A valid URI. | ||
| xlinkTitle_1 | Title of URI 1. | Any string. | ||
| xlinkURI_1 | URI 1 | A valid URI. | ||
| xlinkTitle_2 | Title of URI 2. | Any string. | ||
| xlinkURI_2 | URI 2 | A valid URI. | ||
| dataType | One of: Grid, Image, Point, Radial, Station, Swath, Trajectory, other/unknown | |||
| dataFormatType | One of: BUFR, ESML, GEMPAK, GINI, GRIB-1, GRIB-2, HDF4, HDF5, HTML, image/gif, image/jpeg, image/tiff, McIDAS-AREA, NetCDF, NEXRAD2, NcML, NIDS, text/plain, text/tab-separated-values, text/xml, video/mpeg, video/quicktime, video/realtime, other/unknown. | |||
| Contact Us Site Map Search Terms and Conditions Privacy Policy Participation Policy | ||||||
|
||||||