SOAP Web Service - Execute an Internal Query


UseRestInsteadOfSoap

Note: Service Manager SOAP web services are no longer maintened since the Oxygen version. You can still use them but we recommend that you use the Service Manager REST API to take advantage of the latest enhancements and features.

Open url.png See Execute an internal query method of the Service Manager REST API.

EZV_SYS_ExecuteInternalQuery

  • This web service allows data in XML format of a specified Service Manager reporting to be obtained.

Notes

List of parameters

Mandatory parameters

You must enter the parameters below.

Object Type Description / Example
account string Service Manager account used.
example 50004: Production base ; 50005: Sandbox base
login, pass string Login / password used to connect to Service Manager.
requestguid string Identifier (GUID) of the parent query.

Optional parameters

Object Type Description / Example
custom_filter string Supplementary filter, allowing searching a precise record as an an SQL query.
  • The query and can use the extended Service Manager functions.
Best Practice icon.png To find the SQL syntax of a filter: Define the filter in assisted mode, switch into advanced mode and recopy the SQL query in a text editor.
filterguid string Identifiant (GUID) du filtre
  • If not specified, the Default filter is used.
Best Practice icon.png To find the GUID of a filter: Recopy the URL of the filter in a text editor and select the value of the q2_f parameter.
iscount string Result type to be returned by the web service.
Note: It will not take into account the maxlines parameter.
  • True: Number of records
  • False: Detail of the records
maxlines string Maximum number of records to be returned by the web service.
  • Note: Only for iscount = False.
send_php_object string Format of the object returned by the web service: PHP or XML.
  • By default, PHP format
  • 0 = XML format.
viewguid string dentifier (GUID) of the Service Manager view.
  • If not specified, the Default view is used.
Best Practice icon.png To find the GUID of a view: Recopy the URL of the view in a text editor and select the value of the q2_f parameter.

Description of the actions carried out

1. The parent query is executed with the filter / view and the conditions passed as parameters.

  • If the filterguid parameter is not specified, the Default filter is used.
  • If the viewguid parameter is not specified, the Default view is used.

2. The result of the request is returned in the selected format defined by the iscount parameter: either the number of records or the detailed records.

Examples

  • Obtain the result of a report with the Late incidents filter
<dataset recordcount= "-1" sumsofar= "0" identity= "0" previouspage= "0" nextpage= "0">
  <Fieldname _0= "Beneficiary" _1= "SD_REQUEST.SUBMIT_DATE_UT_0" _2= "Topic" _3= "Description" _4= "Incident Number" _5= "Requesting Person" _6= "Status" _7= "Urgency" _8= "SD_REQUEST.MAX_RESOLUTION_1"/>
  <Fieldtype _0= "char" _1= "datetime" _2= "char" _3= "Blob" _4= "char" _5= "char" _6= "char" _7= "char" _8= "datetime"/>
  <row _0= "ARNE, PATRICIA" _1= "28/08/2008 09:41:26" _2= "Desktop*" _3= "" _4= "I080828_000015" _5= "Amis, Lee" _6= "In Progress" _7= "2 - Average" _8= "28/08/2008 13:41:26"/>
  <row _0= "GOUNOD, FRANCK" _1= "27/05/2008 13:17:51" _2= "Oracle" _3= "test nm 02<BR>" _4= "I080527_000001" _5= "Leblanc, Fred" _6= "Related Incident" _7= "2 - Average" _8= "28/05/2008 13:17:51"/>
  <row _0= "GOUNOD, FRANCK" _1= "30/05/2008 15:23:23" _2= "Oracle" _3= "" _4= "I080530_000002" _5= "Leblanc, Fred" _6= "In Progress" _7= "2 - Average" _8= "02/06/2008 15:23:23"/>
</dataset>
  • Apply an additional filter using the custom_filter parameter to select only the beneficiary gounod
Custom_Filter = (UPPER(AM_RECIPIENT.LAST_NAME) like UPPER('%gounod'))

          ==> Result in XML format

<dataset recordcount= "-1" sumsofar= "0" identity= "0" previouspage= "0" nextpage= "0">
  <Fieldname _0= "Beneficiary" _1= "SD_REQUEST.SUBMIT_DATE_UT_0" _2= "Topic" _3= "Description" _4= "Incident Number " _5= "Requesting Person" _6= "Status" _7= "Urgency" _8= "SD_REQUEST.MAX_RESOLUTION_1"/>
  <Fieldtype _0= "char" _1= "datetime" _2= "char" _3= "Blob" _4= "char" _5= "char" _6= "char" _7= "char" _8= "datetime"/>
  <row _0= "GOUNOD, FRANCK" _1= "30/05/2008 15:24:06" _2= "Oracle" _3= "" _4= "I080530_000003" _5= "Leblanc, Fred" _6= "In Progress" _7= "2 - Average" _8= "02/06/2008 15:24:06"/>
  <row _0= "GOUNOD, FRANCK" _1= "30/05/2008 15:23:23" _2= "Oracle" _3= "" _4= "I080530_000002" _5= "Leblanc, Fred" _6= "In Progress" _7= "2 - Average" _8= "02/06/2008 15:23:23"/>
  <row _0= "GOUNOD, FRANCK" _1= "27/05/2008 13:17:51" _2= "Oracle" _3= "test nm 02<BR>" _4= "I080527_000001" _5= "Leblanc, Fred" _6= "Incident lie" _7= "2 - Average" _8= "28/05/2008 13:17:51"/>
</dataset>

Return codes for the web service

Code Error Corrective action
1 Request processed successfully
-1 Database not found Check that the account parameter matches a Service Manager account.
-2 Unable to connect to Service Manager Check and correct the login and pass parameters.
-3 Invalid entry parameter Check and correct the entry parameters. Check you have entered all the mandatory parameters.
-17 Missing query identifier Enter the requestguid parameter.
-18 Invalid query / filter / view identifiers Check and correct the requestguid, filterguid and viewguid parameters.
-19 Query / filter / view identifiers does not exist Check that the requestguid, filterguid and viewguid parameters match an existing query parent / filter / view.
-22 Maximum number of connections have been reached Check that your profile defined on the Service Manager account authorizes the execution of the action requested to the web service.
Tags:
Last modified by Unknown User on 2021/12/22 15:40
Created by Administrator XWiki on 2013/03/25 18:26

Shortcuts

Recent changes
•  EV Service Manager
•  Service Apps
•  EV Self Help
•  Service Bots

Powered by XWiki ©, EasyVista 2021