Sophos UTM: Decommissioning of obsolete URL categorization services CFFS. Click here for important info.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sophos XG API

As per this article:

is seems i can get the ip host objects if i can do something like: admin</Username><Password>abcd</Password></Login><Get><IPHost><Name></Name><IPFamily></IPFamily><HostType></HostType><IPAddress></IPAddress></IPHost></Get></Request>

Those articles are note very helpful:

This provides a very useful way of doing some things in an programable/automated way. 

But i need to start with the basics:

How do i get the objects and how do i know where they are located?

for example the following should retrive the firmware version:

<Request> <Get> <System> <FirmwareVersion/> </System> </Get> </Request> </Request>

however i get: 

<Status code">529">Input request file is Invalid</Status>
I would very much like the documentation for this. I Need to know how to get all the objects form the firewall: firmware version, firewall rules, a single firewall rule(eg: rule 79), web exceptions, a single web exception, live users, pretty much anything that i can click on GUI.
Can anyone help?

This thread was automatically locked due to age.
Parents Reply
  • hi  

    i got the postman collection for sophs and for the start looks promising.

    My main issue is how do i get the firmware version from n firewalls?

    If i can get it from one i can go a python script that loops through all of them and retrieve it.

    Also exporting the config as xml, i am trying to corelate various objects, as an example:

    <AuthCTA transactionid="">

    tryomng to get the same with a postman call 

        <Set operation="get">
            <AuthCTA transactionid="">

    it does not seem to work. mainly i am after documentation of those objects and where i can find them.

    it seems to work only with whats in this documentation:

    It will be really handy if i could retrieve firmware, licences, serial numbers etc.

    This postman collection allows me to build a library of things(firewall rules, web exceptions, set the same ntp server, etc) 

    and deploy to more firewalls. So its a good start. 

  • Hello  ,

    To retrieve the device info:

    XML Request

    <Request APIVersion="X.X">

    Request Parameter Description
    > APIVersion – Specify API version. Only valid API versions will get an appropriate response.
    > UserName – Specify SFM administrator user name. Default administrator user name is
    > Password – Specify SFM admin user password. Default administrator password is ‘admin’

    XML Response
    <OSVersion>XX.XX.X build XXX</OSVersion>
    <UpTime>XX day(s), XX hour(s), XX minutes</UpTime>

    Response Parameter Description
    > ApplianceKey – Unique serial number
    > Model – SFM device model name
    > OSVersion – SFM firmware version
    > UpTime – Time since the SFM device is up
    > ManagedApplianceCount – Number of devices managed by SFM
    > Gateway – Gateway details
    o IP address of gateway
    o Status – Status of gateway
    > Connected
    > Disconnected

    Thanks & Regards,

    Vivek Jagad | Team Lead, Global Support & Services 

    Log a Support Case | Sophos Service Guide
    Best Practices – Support Case

    Sophos Community | Product Documentation | Sophos Techvids | SMS
    If a post solves your question please use the 'Verify Answer' button.

  • Hi, 

    Thank you very much  

    I am very grateful for this.