Table of Contents

Search

  1. Preface
  2. Overview, Downloading, and Installing
  3. Administration API
  4. Identity Service API
  5. Screenflow Programming and SDK
  6. ActiveVOS WSHT API
  7. Embedding Request Forms in Standalone Web Pages
  8. XML-JSON for Process Central

7. APIs, SDKs, and Services

7. APIs, SDKs, and Services

Query

Query

A query operation is essentially a read operation on the host provider; however, it isn't limited to reading a single object. Query requests can provide complex WHERE clause statements that filter objects by any of the object's field. Other query options, besides a WHERE clause, can query by the
ObjectName
or a collection of object Ids.
Code Example: Query Response
The following example queries for the first and last name of the three objects defined in the id element. The response for this query request will result in three items returned.
<ns:query limit="100" name="Object Query" objectType="contacts" xmlns:ns="http://schemas.active-endpoints.com/appmodules/ screenflow/2011/06/avosHostEnvironment.xsd"> <ns:field>FirstName</ns:field> <ns:field>LastName</ns:field> <ns:id>925cdc8b-f8e5-467e-ad1b-9270afb97b8f</ns:id> <ns:id>b6f0f0b2-9f38-4771-8365-58eb4f7b7d41</ns:id> <ns:id>d75e2a5e-6ae2-44e2-b3df-ea10b6b17d82</ns:id> </ns:query>
The following query request looks for contacts objects that contain a "D" in their display name.
<ns:query limit="100" name="Object Query" objectType="contacts" xmlns:ns="http://schemas.active-endpoints.com/appmodules/ screenflow/2011/06/avosHostEnvironment.xsd"> <ns:field>FirstName</ns:field> <ns:field>LastName</ns:field> <ns:name exactMatch='false'>D</ns:name> </ns:query>
The following query looks for contacts with a first name property containing "B" and which is associated with
AccountId 13.
<ns:query limit="100" name="Object Query" objectType="contacts" xmlns:ns="http://schemas.active-endpoints.com/appmodules/ screenflow/2011/06/avosHostEnvironment.xsd"> <ns:field>FirstName</ns:field> <ns:field>LastName</ns:field> <ns:where>FirstName like '%B%' and AccountId = 13</ns:where> </ns:query>
Code Example: Query Response Return
The response for the queries in the three previous code examples return response messages that looks something like what is shown in the next code example. Each entry in the query returns a
fieldValue
for each field requested and additionally marks the
fieldValue
that serves as the
ObjectName
with a
displayName
attribute of true.
<types1:queryResponse name="Object Query" objectType="contacts"> <types1:entry id="925cdc8b-f8e5-467e-ad1b-9270afb97b8f"> <types1:fieldValue name="FirstName">Mark</types1:fieldValue> <types1:fieldValue displayName="true" name="LastName">Ford</types1:fieldValue> </types1:entry> <types1:entry id="b6f0f0b2-9f38-4771-8365-58eb4f7b7d41"> <types1:fieldValue name="FirstName">John</types1:fieldValue> <types1:fieldValue displayName="true" name="LastName">Acme</types1:fieldValue> </types1:entry> <types1:entry id="d75e2a5e-6ae2-44e2-b3df-ea10b6b17d82"> <types1:fieldValue name="FirstName">Joe</types1:fieldValue> <types1:fieldValue displayName="true" name="LastName">Biden</types1:fieldValue> </types1:entry> </types1:queryResponse>