3.17. Accessing the filter command (New in 5.5

Filters can be created using URLs of the form:

http://host:port/spectcl/filter/new?name=filtername&gate=gatename&parameter=p1[&parameter=p2...]

In this URL, the query parameters are:

name

The name of the filter to create.

gate

Specifies the name of a gate that will determine which events are output by the filter.

parameter

Each occurance of this query parameter specifies the name of a parameter that will be written to the filter output. Note that neither the server nor SpecTcl check for name uniqueness, it is therefore possible, although pathalogical, to output the same parameter in an event more than once.

To delete a filter use URLs of the form:

http://host:port/spectcl/filter/delete?name=filtername

The query parameter name specifies the name of the filter to delete. If the filter is enabled it is first disabled which results in a properly terinated file.

Filters can be enabled using URLs of the following form:

http://host:port/spectcl/filter/enable?name=filtername

Where the query parameter name specifies the name of the filter to enable.

Similarly:

http://host:port/spectcl/filter/disable?name=filtername

Disables the filter specified by the name query parameter.

URLs of the form

http://host:port/spectcl/filter?name=filtername&file=path

Specify the output file for the filter. name specifies the filter name and path the filter output file path. Note that SpecTcl is writing the filter file and therefore the path is interpreted as a path in the context of the server not the client. Furthermore, the path value must specify a file that can be written by SpecTcl (not the client).

Urls of the form

http://host:port/spectcl/filter/list

Returns, for the detail part of the JSON returned object an array of objects. Each object will describe a single filter and contains the following attributes:

name

Name of the filter.

gate

Name of the gate applied to the filter.

file

Name of the output file to which the filter writes.

parameters

An array of parameter names written to the output file for each event that passes the gate.

enabled

If the filter is enabled, this attribute has the value enabled otherwise disabled.

format

Contains the format string e.g. xdr.

The format of the filter output can be extended. URLs of the form:

http://host:port/spectcl/filter/format?name=filtername&format=format

Specify the format of a filter. name specifies the filter name and format the format type string.