Querying for bearers (networks)

To query Edgware for the list of available bearers (networks), a JSON message of the following form is sent to the local Edgware node:

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

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

Field Value Description
id <bearer-id> Query for a specific bearer.
available <bearer-availability> The availability of the network (bearer), the string "true" or "false").
attr <bearer-attributes> Query for specific bearer attributes; will match any bearer containing these attributes exactly as specified.

If no optional fields are specified then the full list of available bearers 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 bearers are returned in a JSON message of the form:

Field Nested Field Value Description
op query-result:bearers Identifies a bearer query result.
correl <correlation-id> Client-defined correlation ID to identify the response.
For each matching bearer the following information will be returned:
bearers Identifies the list of bearers.
id <bearer-id> The bearer ID.
available <bearer-availability> The availability of the bearer (the string "true" or "false").
desc <bearer-description> The free text description of the bearer.
attr <bearer-attributes> The set of attributes associated with the bearer.

Example

A query of the form:

{
	"op" : "query:bearers",
	"correl" : "<correlation-id>"
}

Will generate a response in the form:

{
	"op" : "query-result:bearers",
	"correl" : "<correlation-id>",
	"bearers" : [
		{
			"id" "<bearer-id>",
			"availability" : "<bearer-availability>",
			"desc" : "<bearer-description>",
			"attr" : "<bearer-attributes>"
		}
	]
}