This topic provides a description of the components of a Query API SOAP request.
Every valid Query API SOAP request must contain the following elements:
These elements form the basic request body for every Query API request:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Header/> <S:Body> <Q:executeResultSetQuery xmlns:Q="http://www.bea.com/analytics/AnalyticsQueryService"> <arg0> </arg0> </q:executeResultSetQuery> </S:Body></S:Envelope>
The query elements for each request are contained within the <arg0> element. These elements are:
This element describes the event being queried. There must be one and only one of this element.
The content of the <eventName> is the namespace and name of the event, in this format:
<eventName>{namespace}event</eventName>
For more details on events and event namespaces, see Events and Dimensions.
This element defines a view on a property or dimension property of the event, or on an aggregate of either.
For details, see The <views> Element.
This element defines grouping on a property or dimension property of the event. Grouping may also be done by period of time.
For details, see The <groups> Element.
This element defines a filter to be placed on a property or a dimension property of the event.
For details, see The <filters> Element.
This element defines how you want the results to be ordered. The property used to order the results must be also represented in a <views> or <groups> element.
For details, see The <orders> Element.
The following is a complete example Query API SOAP request. This request returns the name and ID of all portlets that have been used in the Analytics Console community, ordered by portlet ID, along with a count of how many times each portlet was used.
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Header/> <S:Body> <q:executeResultSetQuery xmlns:q="http://www.bea.com/analytics/AnalyticsQueryService"> <arg0> <eventName>{http://www.bea.com/analytics/ali}portletUses</eventName> <views> <property>*</property> <aggregate>1</aggregate> </views> <groups> <dimension>portlet</dimension> <property>name</property> </groups> <groups> <dimension>portlet</dimension> <property>id</property> </groups> <filters xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <dimension>community</dimension> <property>name</property> <values xsi:type="xs:string" >Analytics Console</values> <operator>1</operator> </filters> <orders> <dimension>portlet</dimension> <property>id</property> <isAscending>1</isAscending> </orders> </arg0> </q:executeResultSetQuery> </S:Body></S:Envelope>