We use cookies on our website to ensure we provide you with the best experience on our website. By using our website, you agree to the use of cookies for analytics and personalized content.This website uses cookies. More Information
It seems like your browser didn't download the required fonts. Please revise your security settings and try again.

API example: How can I query or set a user role, such as Helpdesk, through the API?

  • Type: Knowledgebase
  • Date changed: 5 months ago
Solution #00006530

Answer:
Using config.set


[root@216.101.241.239] # ./config.set_user.pl
Enter user to be modified: www@einets.com
Enter variable to be modified: example (user_scana_sender_allow)user_role
Enter value to be set: Helpdesk
...Modifying www@einets.com user_role to: Helpdesk
$VAR1 = {
'Result' => '200: OK'
};

---XML REQUEST FORMAT EXAMPLE---
<?xml version="1.0" encoding="UTF-8" ?>
<methodCall>
<methodName>config.set</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>user_role</name>
<value>
<string><![CDATA[Helpdesk]]></string>
</value>
</member>
<member>
<name>path</name>
<value>
<string><![CDATA[www@einets.com]]></string>
</value>
</member>
<member>
<name>type</name>
<value>
<string><![CDATA[user]]></string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
---XML REQUEST END ---

---XML RESPONSE EXAMPLE---
<?xml version="1.0" encoding="UTF-8" ?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>Result</name>
<value>
<string><![CDATA[200: OK]]></string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
---XML RESPONSE END---

Additional Notes:
Please find the Barracuda Spam Firewall API Guide here.


Link to This Page:
https://campus.barracuda.com/solution/501600000013hNlAAI