/spectcl/rootree requests

This URI domain is only available in SpecTcl. It supports access to SpecTcl's ability to make root trees from the parameters created by its event processing pipeline. Since Rustogramer does not create root trees, this is not meaningful and making requests to these URIs for Rustogramer will result in a Generic response of the form:

{
    "status": "Root Tree output is not supported",
    "detail": "This is not SpecTcl"
}

unless otherwise noted (e.g. for reponses from SpecTcl that are not generic responses).

SpecTcl, supports the following URIs:

For more information about root tree support in SpecTcl, see the roottree command in the SpecTcl Command Reference.

/spectcl/roottree/create

Create a new root tree object.

Query parameters

  • name (string) - Required. Name of the new tree being created. Must be unique.
  • parameter (string) - At least one required. Each instance of the parameter query paramater provides a glob pattern. Parameters in the event which match the pattern are included in the output tree.
  • gate (string) - Optional. If provided the root tree will only output events that satisfy the specified gate. Note that:
    • If no gate is specified all events are written.
    • Changes to the gate dynamically affect the roottree output.
    • The point above means that if you delete the gate, the root tree will not output events as in SpecTcl a deleted gate is the same as a False gate.

Response format detail

detail is a generic response.

Sample Responses.

Success:

{
    "status" : "OK"
}

Failure:

{
    "status" : "'roottree create' command failed",
    "detail":  "<root tree create error message>"
}

/spectcl/roottree/delete

Delete an existing root tree object.

Query parameters

  • tree (string) - Required. The name of the tree to delete.

Response format detail

The response is a generic response.

Sample Responses.

Success:

{
    "status": "OK"
}

Failure:

{
    "status" : "'roottree delete' command failed",
    "detail" : "<error message from roottree delete command>"
}

/spectcl/roottree/list

Lists the properties of root trees.

Query parameters

  • Pattern (string) - Optional. If provided, only the root trees with names that match the glob pattern are included in the list. If not provided, the pattern defaults to * which matches all names.

Response format detail

detail is an array of objects. Each object describes one root tree and has the following attributes:

  • tree (string) - name of the tree.
  • params (array of strings) - Array of parameter patterns that are booked into the tree.
  • gate (string) - name of the tree's gate. If the tree does not have a gate, this will be an empty string.

Sample Responses.

Since the detail is not a string, the Rustogramer return object looks like this:

{
    "status" : "Root tree output is not implemented - this is not SpecTcl",
    "detail" : []
}

This shape is compatible with what's expected by SpecTcl clients.

SpecTcl success with one matching tree:

{
    "status" : "OK", 
    "detail" :[
        {
            "tree" : "atree",
            "params": [
                "event.raw.*",
                "event.sum"
            ],
            "gate": "tree-gate"
        }
    ]
}

SpecTcl failure is a generic response:

{
    "status" : "'roottree list' command failed",
    "detail" : "<roottree list error message>"
}