<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article QlikView QMS API: Get services status (PowerShell) in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/QlikView-QMS-API-Get-services-status-PowerShell/ta-p/1712345</link>
    <description>&lt;P&gt;This article explains how to fetch services status using the QMS API with PowerShell.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;LI-PRODUCT title="QlikView" id="qlikView"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;12.0 and later&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Before performing a call, you need to get a Service Key. This is used for most of API calls towards the QMS API.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;## URL for the QMS API endpoint 
$url = "http://servername:4799/QMS/Service" 

$service = New-WebServiceProxy -Uri $url -Namespace QlikViewServer -UseDefaultCredential 
$serviceKey = $service.GetTimeLimitedServiceKey()&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;In return you will get a temporary&amp;nbsp;&lt;STRONG&gt;Service Key&amp;nbsp;&lt;/STRONG&gt;which will expired 60 seconds after it was generated.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Now that you have the Service Key, you can reuse it to perform API calls against the QMS API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Below is how you would fetch services IDs.&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;$hdrs = @{}
$hdrs.Add("SOAPACTION","http://ws.qliktech.com/QMS/12/2/IQMS2/GetServices")
$hdrs.Add("Content-Type", "text/xml;charset=utf-8")
$hdrs.Add('X-Service-Key',$serviceKey)

$body = @{}
$body = '&amp;lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&amp;gt;
&amp;lt;s:Body&amp;gt;
&amp;lt;GetServices xmlns="http://ws.qliktech.com/QMS/12/2/"&amp;gt;
&amp;lt;serviceTypes&amp;gt;All&amp;lt;/serviceTypes&amp;gt;
&amp;lt;/GetServices&amp;gt;
&amp;lt;/s:Body&amp;gt;
&amp;lt;/s:Envelope&amp;gt;'

$res = Invoke-WebRequest -Uri $url -Method Post -Body $body -UseDefaultCredential -Headers $hdrs

#Display result
$res.Content
&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;In order to fetch services status, the following API call can be used, services ID must be passed in the body.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;$hdrs = @{}
$hdrs.Add("SOAPACTION","http://ws.qliktech.com/QMS/12/2/IQMS2/GetServiceStatuses")
$hdrs.Add("Content-Type", "text/xml;charset=utf-8")
$hdrs.Add('X-Service-Key',$serviceKey)

$body = @{}
$body = '&amp;lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&amp;gt;
&amp;lt;s:Body&amp;gt;
&amp;lt;GetServiceStatuses xmlns="http://ws.qliktech.com/QMS/12/2/"&amp;gt;
&amp;lt;serviceIDs xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&amp;gt;
&amp;lt;a:guid&amp;gt;
&lt;STRONG&gt;f60820d9-da9d-4dba-904b-70adf5397b8b&lt;/STRONG&gt;
&amp;lt;/a:guid&amp;gt;
&amp;lt;a:guid&amp;gt;
&lt;STRONG&gt;ffef6257-7b01-4667-a5ce-ebdf66694e42&lt;/STRONG&gt;
&amp;lt;/a:guid&amp;gt;
&amp;lt;/serviceIDs&amp;gt;
&amp;lt;/GetServiceStatuses&amp;gt;
&amp;lt;/s:Body&amp;gt;
&amp;lt;/s:Envelope&amp;gt;'

$res = Invoke-WebRequest -Uri $url -Method Post -Body $body -UseDefaultCredential -Headers $hdrs
$res.Content
&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Note: For the QlikView Management Service (QMS), the status will only display "OK", for other services, further information such as "Running" will be displayed.&lt;BR /&gt;This is expected, in the case the&amp;nbsp;QlikView Management Service&amp;nbsp;is down the API call will just plainly fail as it is the service managing this API.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;To get the list of API Calls you can perform, please have a look at:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;For IQMS:&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://help.qlik.com/en-US/qlikview-developer/November2017/apis/QMS+API/html/T_PIX_Services_V12_IQMS.htm" target="_blank" rel="noopener"&gt;IQMS Interface&lt;/A&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;For IQMS2:&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://help.qlik.com/en-US/qlikview-developer/November2017/apis/QMS+API/html/T_PIX_Services_V12_Api2_IQMS2.htm" target="_blank" rel="noopener"&gt;IQMS2 Interface&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Aug 2021 11:35:29 GMT</pubDate>
    <dc:creator>Damien_V</dc:creator>
    <dc:date>2021-08-03T11:35:29Z</dc:date>
    <item>
      <title>QlikView QMS API: Get services status (PowerShell)</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/QlikView-QMS-API-Get-services-status-PowerShell/ta-p/1712345</link>
      <description>&lt;P&gt;This article explains how to fetch services status using the QMS API with PowerShell.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;LI-PRODUCT title="QlikView" id="qlikView"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;12.0 and later&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Before performing a call, you need to get a Service Key. This is used for most of API calls towards the QMS API.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;## URL for the QMS API endpoint 
$url = "http://servername:4799/QMS/Service" 

$service = New-WebServiceProxy -Uri $url -Namespace QlikViewServer -UseDefaultCredential 
$serviceKey = $service.GetTimeLimitedServiceKey()&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;In return you will get a temporary&amp;nbsp;&lt;STRONG&gt;Service Key&amp;nbsp;&lt;/STRONG&gt;which will expired 60 seconds after it was generated.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Now that you have the Service Key, you can reuse it to perform API calls against the QMS API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Below is how you would fetch services IDs.&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;$hdrs = @{}
$hdrs.Add("SOAPACTION","http://ws.qliktech.com/QMS/12/2/IQMS2/GetServices")
$hdrs.Add("Content-Type", "text/xml;charset=utf-8")
$hdrs.Add('X-Service-Key',$serviceKey)

$body = @{}
$body = '&amp;lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&amp;gt;
&amp;lt;s:Body&amp;gt;
&amp;lt;GetServices xmlns="http://ws.qliktech.com/QMS/12/2/"&amp;gt;
&amp;lt;serviceTypes&amp;gt;All&amp;lt;/serviceTypes&amp;gt;
&amp;lt;/GetServices&amp;gt;
&amp;lt;/s:Body&amp;gt;
&amp;lt;/s:Envelope&amp;gt;'

$res = Invoke-WebRequest -Uri $url -Method Post -Body $body -UseDefaultCredential -Headers $hdrs

#Display result
$res.Content
&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;In order to fetch services status, the following API call can be used, services ID must be passed in the body.&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE class="ckeditor_codeblock"&gt;$hdrs = @{}
$hdrs.Add("SOAPACTION","http://ws.qliktech.com/QMS/12/2/IQMS2/GetServiceStatuses")
$hdrs.Add("Content-Type", "text/xml;charset=utf-8")
$hdrs.Add('X-Service-Key',$serviceKey)

$body = @{}
$body = '&amp;lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&amp;gt;
&amp;lt;s:Body&amp;gt;
&amp;lt;GetServiceStatuses xmlns="http://ws.qliktech.com/QMS/12/2/"&amp;gt;
&amp;lt;serviceIDs xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&amp;gt;
&amp;lt;a:guid&amp;gt;
&lt;STRONG&gt;f60820d9-da9d-4dba-904b-70adf5397b8b&lt;/STRONG&gt;
&amp;lt;/a:guid&amp;gt;
&amp;lt;a:guid&amp;gt;
&lt;STRONG&gt;ffef6257-7b01-4667-a5ce-ebdf66694e42&lt;/STRONG&gt;
&amp;lt;/a:guid&amp;gt;
&amp;lt;/serviceIDs&amp;gt;
&amp;lt;/GetServiceStatuses&amp;gt;
&amp;lt;/s:Body&amp;gt;
&amp;lt;/s:Envelope&amp;gt;'

$res = Invoke-WebRequest -Uri $url -Method Post -Body $body -UseDefaultCredential -Headers $hdrs
$res.Content
&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Note: For the QlikView Management Service (QMS), the status will only display "OK", for other services, further information such as "Running" will be displayed.&lt;BR /&gt;This is expected, in the case the&amp;nbsp;QlikView Management Service&amp;nbsp;is down the API call will just plainly fail as it is the service managing this API.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;To get the list of API Calls you can perform, please have a look at:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;For IQMS:&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://help.qlik.com/en-US/qlikview-developer/November2017/apis/QMS+API/html/T_PIX_Services_V12_IQMS.htm" target="_blank" rel="noopener"&gt;IQMS Interface&lt;/A&gt;&lt;BR /&gt;&lt;SPAN style="color: #000000;"&gt;For IQMS2:&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://help.qlik.com/en-US/qlikview-developer/November2017/apis/QMS+API/html/T_PIX_Services_V12_Api2_IQMS2.htm" target="_blank" rel="noopener"&gt;IQMS2 Interface&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2021 11:35:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/QlikView-QMS-API-Get-services-status-PowerShell/ta-p/1712345</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2021-08-03T11:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView QMS API: Get services status (PowerShell)</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/QlikView-QMS-API-Get-services-status-PowerShell/tac-p/1866602#M4959</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I am trying to use&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;GetTimeLimitedServiceKey in postman, when I sent the post request it doesnt fail but there is no response returned. its blank .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;here is my configuration:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Qlik version: 12.5&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;Post Url:&amp;nbsp;&lt;SPAN&gt;&lt;A href="http://SERVERNAME:4799/QMS/Service" target="_blank"&gt;http://SERVERNAME:4799/QMS/Service&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;SPAN&gt;Autentication: BASIC (DOMAIN\USER, password)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-family: inherit;"&gt;&lt;SPAN&gt;Body:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;s:Envelope&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;xmlns:s&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="http://schemas.xmlsoap.org/soap/envelope/" target="_blank"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;s:Body&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;GetTimeLimitedServiceKey&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;xmlns&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="http://ws.qliktech.com/QMS/12/IQMS/GetTimeLimitedServiceKey" target="_blank"&gt;http://ws.qliktech.com/QMS/12/IQMS/GetTimeLimitedServiceKey&lt;/A&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;GetTimeLimitedServiceKey&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;s:Body&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN&gt;s:Envelope&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;but I did not receive any&amp;nbsp;X-Service-Key .&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 15:41:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/QlikView-QMS-API-Get-services-status-PowerShell/tac-p/1866602#M4959</guid>
      <dc:creator>CYRUS</dc:creator>
      <dc:date>2021-12-03T15:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: QlikView QMS API: Get services status (PowerShell)</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/QlikView-QMS-API-Get-services-status-PowerShell/tac-p/1868482#M4991</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/11474"&gt;@CYRUS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post your query in the dedicated&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-Integrations/bd-p/qlikview-integration" target="_blank" rel="noopener"&gt;Integration&lt;/A&gt;&amp;nbsp;forum for QlikView to be able to make use of our active community and engineers monitoring the forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the best,&lt;BR /&gt;Sonja&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 09:34:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/QlikView-QMS-API-Get-services-status-PowerShell/tac-p/1868482#M4991</guid>
      <dc:creator>Sonja_Bauernfeind</dc:creator>
      <dc:date>2021-12-09T09:34:24Z</dc:date>
    </item>
  </channel>
</rss>

