Difference between revisions of "Web Services Example - queryReport"

From SmartWiki
Jump to: navigation, search
m (edit formatting)
m
 
Line 7: Line 7:
  
 
==Sample #1==
 
==Sample #1==
 +
Run a simple report that does not prompt for criteria.
 
* Endpoint: https://smart.smartsimple.com/WS/services/UtaUpdate
 
* Endpoint: https://smart.smartsimple.com/WS/services/UtaUpdate
 
* Action: http://uta.WS.SmartSimple2.com/queryReport
 
* Action: http://uta.WS.SmartSimple2.com/queryReport
Line 26: Line 27:
  
 
==Sample #2==
 
==Sample #2==
 +
Run a simple report that does not prompt for criteria, but we wish to add our own dynamic run-time criteria.
 
* Endpoint: https://smart.smartsimple.com/WS/services/UtaUpdate
 
* Endpoint: https://smart.smartsimple.com/WS/services/UtaUpdate
 
* Action: http://uta.WS.SmartSimple2.com/queryReport
 
* Action: http://uta.WS.SmartSimple2.com/queryReport
Line 45: Line 47:
  
 
==Sample #3==
 
==Sample #3==
 +
Run a simple report that does prompt for criteria.
 
* Endpoint: https://smart.smartsimple.com/WS/services/UtaUpdate
 
* Endpoint: https://smart.smartsimple.com/WS/services/UtaUpdate
 
* Action: http://uta.WS.SmartSimple2.com/queryReport
 
* Action: http://uta.WS.SmartSimple2.com/queryReport

Latest revision as of 10:05, 6 February 2015

The following are sample SOAP messages that will query SmartSimple to run a report and return the results in an XML format.

This example applies to the following:

Sample #1

Run a simple report that does not prompt for criteria.

<soapenv:Envelopexmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"xmlns:uta="http://uta.WS.SmartSimple2.com"> <soapenv:Header/> <soapenv:Body> <uta:queryReport> <uta:alias>smart</uta:alias> <uta:username>user@smartsimple.com</uta:username> <uta:password>password</uta:password> <uta:reportid>12345</uta:reportid> <uta:criteria></uta:criteria> </uta:queryReport> </soapenv:Body> </soapenv:Envelope>

Sample #2

Run a simple report that does not prompt for criteria, but we wish to add our own dynamic run-time criteria.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uta="http://uta.WS.SmartSimple2.com"> <soapenv:Header/> <soapenv:Body> <uta:queryReport> <uta:alias>smart</uta:alias> <uta:username>user@smartsimple.com</uta:username> <uta:password>password</uta:password> <uta:reportid>12345</uta:reportid> <uta:criteria>$$column 1 = "criteria 1" and column 2 = "criteria 2"</uta:criteria> </uta:queryReport> </soapenv:Body> </soapenv:Envelope>

Sample #3

Run a simple report that does prompt for criteria.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uta="http://uta.WS.SmartSimple2.com"> <soapenv:Header/> <soapenv:Body> <uta:queryReport> <uta:alias>smart</uta:alias> <uta:username>user@smartsimple.com</uta:username> <uta:password>password</uta:password> <uta:reportid>67890</uta:reportid> <uta:criteria>criteria 1;;criteria 2</uta:criteria> </uta:queryReport> </soapenv:Body> </soapenv:Envelope>