Previous Topic: GetObject

Next Topic: getReportList

getQueryList

Use the getQueryList command to list all the queries available in your CA Enterprise Log Manager environment. The XML response also contains the formatting data and any predefined filtering criteria for each query.

You can use the following optional parameters with the getQueryList command

tag

Defines a tag that exists in the system. You can include one or more tags to search for using the getQueryList command. If you specify an unknown tag the command returns an empty list.

tagLogic

Specifies how the getQueryList command treats multiple tags. Supported values are AND and OR. The default value is OR. You can only use one tagLogic value at a time.

Unfiltered Tag Example

https://ELMSERVER:5250/spin/calmapi/getObject.csp?type=getQueryList

Returns all queries and all formatting data associated with each one

OR TagLogic Example

https://ELMSERVER:5250/spin/calmapi/getObject.csp?type=getQueryList&tag=Unknown Category&tag=System

Returns all queries that are associated with the tags “Unknown Category” OR “System”

AND TagLogic Example

https://ELMSERVER:5250/spin/calmapi/getObject.csp?type=getQueryList&tag=Unknown Category&tag=System&tagLogic=and

Returns all queries that are associated with the tags “Unknown Category” AND “System”

Result Example

This abbreviated example shows only one query, "System Event Count by Event Category".

<?xml version="1.0" encoding="UTF-8" ?>
<Result>
	<Value>true</Value>
	<Description>Get Object Successful. Type [getQueryList]</Description>
	<Items>
	<Item edit="false">
		<Panel id="Subscription/panels/System_Event_Count_by_Event_Category" name="System Event Count by Event Category" subscription="true" version="12.0.46.8">
			<Description>Ranks system event count activity by event category</Description>
			<Tags>
				<Tag name="System" />
			</Tags>
			<Query id="">
				<Table>view_event</Table>
				<Args unique="false" />
				<Column columnname="event_datetime" datatype="T" displayname="Date" resultname="event_datetime" visible="true" />
				<Column columnname="event_category" datatype="S" displayname="Category" grouporder="1" notnull="true" resultname="event_category" sortdesc="" visible="true" />
				<Column columnname="event_count" datatype="I" displayname="Count" functionname="sum" resultname="event_count" sortdesc="true" sortorder="1" visible="true" />
			</Query>
			<Display>
				<X name="Category" resultname="event_category" />
				<Y name="Count" resultname="event_count" />
				<Visualization type="VizBarChart" />
				<Visualization type="VizPieChart" />
				<Visualization type="VizTable" />
			</Display>
		</Panel>
	</Item>
	<Item edit="false">

"Panel id=" shows that it is a subscription report, and its name.

Note: If the query is a prompt query, the "Prompt id=" tag appears rather than the "Panel id=" tag, "Prompt id=HostPrompt" for example.

"Tag Name=" indicates that it has the System Tag.

The "Column columname=" elements specify the event columns searched by the query, and how they are grouped and ordered.

The "Display" elements specify how the events are shown graphically.

More information:

getQueryViewer

Prompt Queries

runQuery