Querying for nodes

To query Edgware for the list of nodes connected to the bus, a JSON message of the following form is sent to the local Edgware node:

Field Value Description
op query:nodes Identifies a node query message.
correl <correlation-id> Client-defined correlation ID to identify the response.

The query:nodes message may also include the following optional fields:

Field Value Description
id <node-id> Query for a specific node.
address <node-address> Query for a node with a specific address (URI).
attr <node-attributes> Query for specific node attributes; will match any node containing these attributes exactly as specified.

If no optional fields are specified then the full list of available nodes will be returned. Each optional field can contain a wildcard character (“*”) matching any string. Wildcards can be used alone or with partial text. Omitting an optional field is equivalent to giving it the value “*”.

Matching platform types are returned in a JSON message of the form:

Field Nested Field Value Description
op query-result:nodes Identifies a node query result.
correl <correlation-id> Client-defined correlation ID to identify the response.
For each matching node the following information will be returned:
nodes Identifies the list of nodes.
id <node-id> The node ID.
address <node-address> The address (URI) of the node.
desc <node-description> The free text description of the node.
attr <node-attributes> The set of attributes associated with the node.


A query of the form:

	"op" : "query:nodes",
	"correl" : "<correlation-id>"

Will generate a response in the form:

	"op" : "query-result:nodes",
	"correl" : "<correlation-id>",
	"nodes" : [
			"id" "<node-id>",
			"address" : "<node-address>",
			"desc" : "<node-description>",
			"attr" : "<node-attributes>"