.. highlight:: rst .. _wsiris: ###### wsiris ###### **Provide IRIS webservices.** Description =========== wsiris is a server that provides IRIS Web services from a SeisComP3 database and an SDS waveform archive. The following services are implemented: .. csv-table:: :header: "Service", "Retrieves this...", "In this format" "`ws-event `_", "contributed earthquake origin and magnitude estimates", "`QuakeML `_, `SC3ML `_" "`ws-station `_", "network, station, channel, response metadata", "`StationXML `_, `SC3ML `_" "`ws-availability `_", "information about what time series data is available from the DMC", "XML, Query parameters for ws-bulkdataselect, ws-dataselect, or ws-timeseries" "`ws-dataselect `_", "single channel of time series data in miniSEED format. Use this to pass data to other workflow services", "`miniSEED `_" "`ws-bulkdataselect `_", "multiple channels of time series data", "`miniSEED `_" If wsiris is started, it accepts connections by default on port 8080 which can be changed in the configuration. Event ----- * contributed earthquake origin and magnitude estimates * request type: HTTP-GET * events may be filtered e.g. by hypocenter, time and magnitude, see http://www.iris.edu/ws/event/ URL ^^^ * http://localhost:8080/event * http://localhost:8080/event/query Example ^^^^^^^ * http://localhost:8080/event?starttime=2012-09-12&minlat=30&maxlat=60&minlon=-10&maxlon=30 Feature Notes ^^^^^^^^^^^^^ * SeisComP does not distinguish between catalogs and contributors, but supports agencyIDs. Hence, if specified, the value of the catalog or contributor parameter is mapped to the agencyID. If both parameters are supplied, the value of the contributor is used. * origin and magnitude filter parameters are always applied to preferred origin resp. preferred magnitude * additional request parameters: * ``output: [qml, qml-rt, sc3ml]``, default: ``qml`` * ``includecomments``: boolean, default: ``true`` * ``formatted``: boolean, default: ``false`` Station ------- * network, station, channel, response metadata * request type: HTTP-GET * stations may be filtered e.g. by geographic region and time, also the information depth level is selectable, see http://www.iris.edu/ws/station/ URL ^^^ * http://localhost:8080/station * http://localhost:8080/station/query Example ^^^^^^^ * http://localhost:8080/station?net=GE&level=sta Feature Notes ^^^^^^^^^^^^^ * ``updatedafter`` request parameter not implemented: The last modification time in SeisComP is tracked on the object level. If a child of an object is updated the update time is not propagated to all parents. In order to check if a station was updated all children must be evaluated recursively. This operation would be much to expensive. * additional request parameters: * ``output: [stationxml, sc3ml]``, default: ``stationxml`` * ``formatted``: boolean, default: ``false`` .. _sec-availability: Availability ------------ * information about what time series data is available from the DMC * request type: HTTP-GET * data may be filtered e.g. by geographic, time and channel information, see http://www.iris.edu/ws/availability/ * supports different output formats: * ``xml`` – StationXML like * ``query`` – HTTP-GET parameter list, used as input for `ref:sec-dataselect` * ``bulkdataselect`` – Lines of stream parameters, used for `ref:sec-bulkdataselect` URL ^^^ * http://localhost:8080/availability * http://localhost:8080/availability/query Example ^^^^^^^ * http://localhost:8080/availability?start=2010&output=query Feature Notes ^^^^^^^^^^^^^ * data availability is only based on SDS file names (not miniSEED content), hence date precision is limited to days .. _sec-dataselect: Data select ----------- * single channel of time series data in miniSEED format * request type: HTTP-GET URL ^^^ * http://localhost:8080/dataselect * http://localhost:8080/dataselect/query Example ^^^^^^^ * http://localhost:8080/dataselect?net=AD&sta=DLV&loc=--&cha=BHE&start=2010-11-08T00:00:00&end=2010-11-09T23:59:59 Feature Notes ^^^^^^^^^^^^^ * ``quality`` parameter not implemented (information not available in SeisComP ) * ``ref`` parameter is limited to direct, no ICAB (IRIS Caching Artifact Builder) support .. _sec-bulkdataselect: Bulk data select ---------------- * multiple channels of time series data * request type: HTTP-POST URL ^^^ * http://localhost:8080/bulkdataselect * http://localhost:8080/bulkdataselect/query Example ^^^^^^^ In the following example the command line tool ``curl`` is used to first retrieve a stream request list from the `ref:sec-availablity` service and then to post the list to the `ref:sec-bulkdataselect` service. .. code-block:: sh sysop@host:~$ curl -o request.txt "http://localhost:8080/availability?start=2011&output=bulkdataselect&net=ge&sta=M*&cha=BHE" sysop@host:~$ curl -o data.mseed --data-urlencode selection@request.txt "http://localhost:8080/bulkdataselect" Feature Notes ^^^^^^^^^^^^^ * ``quality`` parameter not implemented (information not available in SeisComP ) * ``minimumlength`` parameter is not implemented * ``longestonly`` parameter is not implemented Configuration ============= | :file:`etc/defaults/global.cfg` | :file:`etc/defaults/wsiris.cfg` | :file:`etc/global.cfg` | :file:`etc/wsiris.cfg` | :file:`~/.seiscomp3/global.cfg` | :file:`~/.seiscomp3/wsiris.cfg` wsiris inherits :ref:`global options`. .. confval:: listenAddress Type: *IP* Defines the bind address of the server. \"0.0.0.0\" allows any interface to connect to this server whereas \"127.0.0.0\" only allows connections from localhost. Default is ``0.0.0.0``. .. confval:: port Type: *int* Server port to listen for incoming requests. Default is ``8080``. .. confval:: sdsPath Type: *string* Defines the path to the waveform archive for waveform requests. Default is ``@ROOTDIR@/var/lib/archive``. .. confval:: queryObjects Type: *int* Maximum number of objects per query, used in ws\-station and ws\-event services to limit main memory consumption. Default is ``10000``. .. confval:: connections Type: *int* Number of maximum simultaneous requests. Default is ``5``. Command-line ============ .. program:: wsiris Generic ------- .. option:: -h, --help show help message. .. option:: -V, --version show version information .. option:: --config-file arg Use alternative configuration file. When this option is used the loading of all stages is disabled. Only the given configuration file is parsed and used. To use another name for the configuration create a symbolic link of the application or copy it, eg scautopick \-> scautopick2. .. option:: --plugins arg Load given plugins. .. option:: -D, --daemon Run as daemon. This means the application will fork itself and doesn't need to be started with \&. .. option:: --auto-shutdown arg Enable\/disable self\-shutdown because a master module shutdown. This only works when messaging is enabled and the master module sends a shutdown message \(enabled with \-\-start\-stop\-msg for the master module\). .. option:: --shutdown-master-module arg Sets the name of the master\-module used for auto\-shutdown. This is the application name of the module actually started. If symlinks are used then it is the name of the symlinked application. .. option:: --shutdown-master-username arg Sets the name of the master\-username of the messaging used for auto\-shutdown. If \"shutdown\-master\-module\" is given as well this parameter is ignored. Verbosity --------- .. option:: --verbosity arg Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info, 4:debug .. option:: -v, --v Increase verbosity level \(may be repeated, eg. \-vv\) .. option:: -q, --quiet Quiet mode: no logging output .. option:: --component arg Limits the logging to a certain component. This option can be given more than once. .. option:: -s, --syslog Use syslog logging back end. The output usually goes to \/var\/lib\/messages. .. option:: -l, --lockfile arg Path to lock file. .. option:: --console arg Send log output to stdout. .. option:: --debug Debug mode: \-\-verbosity\=4 \-\-console\=1 .. option:: --log-file arg Use alternative log file. Database -------- .. option:: --db-driver-list List all supported database drivers. .. option:: -d, --database arg The database connection string, format: service:\/\/user:pwd\@host\/database. \"service\" is the name of the database driver which can be queried with \"\-\-db\-driver\-list\". .. option:: --config-module arg The configmodule to use. .. option:: --inventory-db arg Load the inventory from the given database or file, format: [service:\/\/]location .. option:: --db-disable Do not use the database at all