Querying for system types

To query Edgware for the list of available system types, a JSON message of the following form is sent to the local Edgware node:

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

The query:system-types message may also include the following optional fields:

Field Value Description
type <system-type-id> Query for a specific system type.
attr <system-type-attributes> Query for specific system type attributes; will match any system type containing these attributes exactly as specified.

Additionally, to query for a system type offering specific service types the a further set of optional fields may also be included:

Field Nested Field Value Description
services     Identifies the list of service types.
  type <service-type-id> Query for a specific service type.
  attr <service-type-attributes> Query for specific service type attributes; will match any service containing these attributes exactly as specified.

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

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

Example

A query of the form:

{
	"op" : "query:system-types",
	"correl" : "<correlation-id>",
	"services" : [
		{
			"type" : "<service-type-id>"
		}
	]
}

Will generate a response of the form:

{
	"op" : "query-result:system-types",
	"correl" : "<correlation-id>",
	"system-types" : [
		{
			"type" "<system-type-id>",
			"desc" : "<system-description>",
			"attr" : "<system-attributes>",
			"services" : [
				{
					"type" : "<service-type-id>",
					"desc" : "<service-description>",
					"attr" : "<service-attributes>",
				}
			]
		}
	]
}