<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<application xmlns="http://wadl.dev.java.net/2009/02">
    <doc title="FDSN dataselect web service 1.0"/>
    <grammars/>
    <resources base="http://service.scedc.caltech.edu/fdsnws/dataselect/1/">
        <resource path="/">
            <method name="GET" id="root">
                <response>
                    <representation mediaType="text/html"/>
                </response>
            </method>
            <resource path="query">
                <method name="GET" id="query">
		    <request>
		      <param name="starttime" style="query" type="xs:date" required="true">
			<doc xml:lang="english" title="Limit to channels that are active on or after the specified start date/time. Format is YYYY-MM-DDTHH:MM:SS">
			Example: starttime=2016-01-01 or 2016-01-01T00:00:00
			</doc>
		      </param>	
		      <param name="endtime" style="query" type="xs:date" required="true">
		      <doc xml:lang="english" title="Limit to channels that are active on or before the specified start date/time. Format is YYYY-MM-DDTHH:MM:SS">	
		      Example: endtime=2016-01-01 or 2016-01-01T00:00:00
		      </doc>
		      </param>		
		      <param name="network" style="query" type="xs:string" required="true">
			<doc xml:lang="english" title="Select net code for the query. Lists and wildcards are allowed.">
			Example : network=CI or network=CI,CE or network=C?
			</doc>
		      </param>		
		      <param name="station" style="query" type="xs:string" required="true">
			<doc xml:lang="english" title="Select station code for the query. Lists and wildcards are allowed.">
			  Example : station=ADO or station=ADO,ALP or station=AD? 
			  </doc>
		      </param>
		      <param name="location" style="query" type="xs:string" required="true">
			<doc xml:lang="english" title="Select location code for query. Use -- for blank blank location code. Lists and wildcards are allowed.">
			  Example: location=-- or location=1? or location=00,10
			  </doc>
		      </param>
		      <param name="channel" style="query" type="xs:string" required="true">
			<doc xml:lang="english" title="Select channel code for query. Lists and wildcards are allowed.">
			  Example: channel=BHE or channel=BHE,HNE or channel=?H?
			  </doc>
		      </param>
		      <param name="quality" style="query" type="xs:string" required="false">
			<doc xml:lang="english" title="Select data quality (refer SEED manual)">
			  Example: quality=D
 			</doc>
		      </param>
		      <param name="format" style="query" type="xs:string" required="false">
			<doc xml:lang="english" title="Select output format. The SCEDC only supports miniSEED as of now.">
			  Example: format=miniseed or format=mseed
 			</doc>
		      </param>
		    </request>
                    <response>
                      <representation mediaType="text/plain"/>
                      <representation mediaType="application/vnd.fdsn.mseed"/>
                    </response>
                </method>
                <method name="POST" id="postQuery">
                    <request>
                      <representation mediaType="*/*"/>
		      <param name="selection" style="query" type="xs:string">
			<doc xml:lang="english" title="Specify one or more queries, separated by new line. Each query must consist of SNCL and start and end times" >
			  Example:
			  CI BAK -- BHZ 2014-01-01T00:00:00 2014-01-01T01:00:00
			  CI PASC 00 BHZ 2014-02-01T10:00:00 2014-02-01T11:00:00
			  </doc>
			</param>
			
                    </request>
                    <response>
                      <representation mediaType="text/plain"/>
                      <representation mediaType="application/vnd.fdsn.mseed"/>
                    </response>
                </method>
            </resource>
            <resource path="version">
                <method name="GET" id="version">
                    <response>
                      <representation mediaType="text/plain"/>
                    </response>
                </method>
            </resource>
            <resource path="application.wadl">
                <method name="GET" id="application.wadl">
                    <response>
                      <representation mediaType="application/xml"/>
                    </response>
                </method>
            </resource>
        </resource>
    </resources>
</application>
