Previous page

Next page

Locate page in Contents

Print this page

get

Summary:

Retrieves service information.

Request specification:

Name

Min/Max

Type

Description

get

 

 

 

{

 

 

 

name

0..1

string

The name of the service to retrieve the information for. If absent, the information for all services will be retrieved.

state

0..1

none

If present, current service state will be retrieved.

level

0..1

none

Linux If present, the service levels will be retrieved.

dependencies

0..1

none

WindowsIf present, the service dependencies information will be retrieved.

}

 

 

 

Returns:

Name

Min/Max

Type

Description

service

1..[]

serviceType

Service information.

Description:

The call retrieves a list of services from the current server. You can retrieve the information for a particular service or for all available services at once. You can also control which service properties will be retrieved by supplying the appropriate parameters. Retrieving such properties as state, level, and dependencies can be a time consuming operation, please keep that in mind when retrieving a complete list of services. The best practice would be to retrieve just the base service information (all optional parameters are omitted) and then to retrieve the details for each service individually when needed.

The readonly element, if present, indicates that the service has the highest possible severity level, therefore it is not recommended to change its settings. The element will also be present if there's no entry in the Agent vocabulary for this service, in which case it is up to you to decide how to handle it.

WindowsExample 1:

Retrieving the TlntSvr (Telnet) service details, including state, and dependencies from the specified server.

Input

<packet version="4.0.0">

<dst>

<host>74ee4ead-577a-438d-a22b-978922ecdac0</host>

</dst>

<target>servicem</target>

<data>

<servicem>

<get>

<name>TlntSvr</name>

<state/>

<dependencies/>

</get>

</servicem>

</data>

</packet>

Output

<?xml version="1.0" encoding="UTF-8"?><ns1:packet xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/servicem" xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="0" id="6c460004b2t2cd6rd7c" time="2007-03-20T15:59:13+0000" priority="0" version="4.0.0">

<ns1:origin>74ee4ead-577a-438d-a22b-978922ecdac0</ns1:origin>

<ns1:dst>

<director>gend</director>

<target>vzclient2</target>

</ns1:dst>

<ns1:data>

<ns2:servicem>

<ns2:service>

<ns2:name>TlntSvr</ns2:name>

<ns2:readonly/> <ns2:description>RW5hYmxlcyBhIHJlbW90ZSB1c2VyIHRvIGxvZyBvbiB0byB0aGlzIGNvbXB1dGVyIGFuZCBydW4gcHJvZ3JhbXMsIGFuZCBzdXBwb3J0cyB2YXJpb3VzIFRDUC9JUCBUZWxuZXQgY2xpZW50cywgaW5jbHVkaW5nIFVOSVgtYmFzZWQgYW5kIFdpbmRvd3MtYmFzZWQgY29tcHV0ZXJzLiBJZiB0aGlzIHNlcnZpY2UgaXMgc3RvcHBlZCwgcmVtb3RlIHVzZXIgYWNjZXNzIHRvIHByb2dyYW1zIG1pZ2h0IGJlIHVuYXZhaWxhYmxlLiBJZiB0aGlzIHNlcnZpY2UgaXMgZGlzYWJsZWQsIGFueSBzZXJ2aWNlcyB0aGF0IGV4cGxpY2l0bHkgZGVwZW5kIG9uIGl0IHdpbGwgZmFpbCB0byBzdGFydC4=</ns2:description>

<ns2:state>0</ns2:state>

<ns2:display_name>VGVsbmV0</ns2:display_name>

<ns2:status>Stopped</ns2:status>

<ns2:startup_type>Disabled</ns2:startup_type>

<ns2:logon_as>NT AUTHORITY\LocalService</ns2:logon_as>

<ns2:depended_on>RPCSS</ns2:depended_on>

<ns2:depended_on>TCPIP</ns2:depended_on>

<ns2:depended_on>NTLMSSP</ns2:depended_on>

</ns2:service>

</ns2:servicem>

</ns1:data>

<ns1:src>

<ns1:director>vpsd</ns1:director>

<ns1:target>servicem</ns1:target>

</ns1:src>

<ns1:target>vzclient2</ns1:target>

</ns1:packet>

Linux Example 2:

Retrieving the crond service details, including states and levels from a server.

Input

<packet version="4.0.0">

<target>servicem</target>

<data>

<servicem>

<get>

<name>crond</name>

<state/>

<level/>

</get>

</servicem>

</data>

</packet>

Output

<?xml version="1.0" encoding="UTF-8"?><ns1:packet xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/servicem" xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="2c45ffff73t18ber98c" time="2007-03-16T01:19:18+0000" priority="0" version="4.0.0">

<ns1:origin>servicem</ns1:origin>

<ns1:target>vzclient3</ns1:target>

<ns1:dst>

<director>gend</director>

</ns1:dst>

<ns1:data>

<ns2:servicem>

<ns2:service>

<ns2:name>crond</ns2:name>

<ns2:readonly/> <ns2:description>Y3JvbiBpcyBhIHN0YW5kYXJkIFVOSVggcHJvZ3JhbSB0aGF0IHJ1bnMgdXNlci1zcGVjaWZpZWQgIHByb2dyYW1zIGF0IHBlcmlvZGljIHNjaGVkdWxlZCB0aW1lcy4gdml4aWUgY3JvbiBhZGRzIGEgIG51bWJlciBvZiBmZWF0dXJlcyB0byB0aGUgYmFzaWMgVU5JWCBjcm9uLCBpbmNsdWRpbmcgYmV0dGVyICBzZWN1cml0eSBhbmQgbW9yZSBwb3dlcmZ1bCBjb25maWd1cmF0aW9uIG9wdGlvbnMu</ns2:description>

<ns2:state>1</ns2:state>

<ns2:level>2</ns2:level>

<ns2:level>3</ns2:level>

<ns2:level>4</ns2:level>

<ns2:level>5</ns2:level>

</ns2:service>

</ns2:servicem>

</ns1:data>

<ns1:src>

<ns1:director>gend</ns1:director>

</ns1:src>

</ns1:packet>

Please send us your feedback on this help page