Personal tools

switchvox.accessControl.getInfo

From SwitchvoxExtendAPI

(Difference between revisions)
Jump to: navigation, search
(Created page with '{{DISPLAYTITLE:switchvox.accessControl.getInfo}} ==Description== Returns details about a particlar rule. A rule has a unique rule_id, a name, a network (with netmask) and a list ...')
Line 14: Line 14:
===Example One===
===Example One===
{{XMLAPI_EXAMPLE_REQUEST_HEADER}}
{{XMLAPI_EXAMPLE_REQUEST_HEADER}}
-
=Example Request=
 
<source lang="xml">
<source lang="xml">
<request method="switchvox.accessControl.getInfo">
<request method="switchvox.accessControl.getInfo">
Line 24: Line 23:
{{XMLAPI_EXAMPLE_REQUEST_FOOTER}}
{{XMLAPI_EXAMPLE_REQUEST_FOOTER}}
{{XMLAPI_EXAMPLE_RESPONSE_HEADER}}
{{XMLAPI_EXAMPLE_RESPONSE_HEADER}}
-
=Example Response=
 
<source lang="xml">
<source lang="xml">
<response method="switchvox.accessControl.getInfo">
<response method="switchvox.accessControl.getInfo">
<result>
<result>
<rule id="1" name="The Rule Name" network="10.10.3.113/24">
<rule id="1" name="The Rule Name" network="10.10.3.113/24">
-
    <allowed_services>
+
<allowed_services>
                <allowed_service>printing</allowed_service>
                <allowed_service>printing</allowed_service>
                <allowed_service>imap</allowed_service>
                <allowed_service>imap</allowed_service>
Line 35: Line 33:
                <allowed_service>xmpp</allowed_service>
                <allowed_service>xmpp</allowed_service>
                <allowed_service>user_api</allowed_service>
                <allowed_service>user_api</allowed_service>
-
            </allowed_services>
+
</allowed_services>
</rule>
</rule>
</result>
</result>

Revision as of 21:30, 11 May 2009

Contents

Description

Returns details about a particlar rule. A rule has a unique rule_id, a name, a network (with netmask) and a list of services that network is allowed to access. Currently, the possible services include: printing, mail, admin_web, user_web, admin_api, user_api, smpp, iax and sip.

Arguments

See the Constructing Requests page to learn how to use arguments in requests.
Name Required Type Default Description
rule_id the unique identifier for a rule

Example Requests & Responses

Please see the API Request and Response Format section for more information on various request encodings.

Example One

Request

<request method="switchvox.accessControl.getInfo">
    <parameters>
        <rule_id>1</rule_id>
    </parameters>
</request>

Response

<response method="switchvox.accessControl.getInfo">
	<result>
		<rule id="1" name="The Rule Name" network="10.10.3.113/24">
			<allowed_services>
		                <allowed_service>printing</allowed_service>
		                <allowed_service>imap</allowed_service>
		                <allowed_service>user_web</allowed_service>
		                <allowed_service>xmpp</allowed_service>
		                <allowed_service>user_api</allowed_service>
			</allowed_services>
		</rule>
	</result>
</response>

Error Codes

See the Error Code Formatting section to see the xml structure when an error is returned.
See the Generic Error Codes section to see a list of general fault codes that may be returned.
Code Description
40062 There is no rule for rule_id 1