Guest User!

You are not Sophos Staff.

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

XG Firewall API Creating/Searching for IP Hosts

Hello,

I've just started testing the XML API and this really looks Awful. 

This is stated in the documentation: docs.sophos.com/.../index.html

 Status Message Information :

Operation   Status   Message
Add IP Host 200 Host "<DynamicValue>" has been added successfully
Add IP Host 500 Host "<DynamicValue>" could not be added
Add IP Host 502 Host with same name already exists
Add IP Host 503 Host with the same detail already exists
Edit IP Host 200 Host "<DynamicValue>" has been updated successfully
Edit IP Host 202 Host "<DynamicValue>" has been renamed to "<DynamicValue>" and updated successfully
Edit IP Host 500 Host "<DynamicValue>" could not be updated
Edit IP Host 502 Host with same name already exists
Edit IP Host 503 Host with the same detail already exists
Edit IP Host 541 Host with the same virtual host IP address already exists, choose a different IP address

But then I create twice in a row the same object and the return status Code is the same:

curl -k "">172.16.0.38:4444/.../APIController

<?xml version="1.0" encoding="UTF-8"?>
<Response APIVersion="1800.2" IPS_CAT_VER="1">
<Login>
<status>Authentication Successful</status>
</Login>
<IPHost transactionid="">
<Status code="200">Configuration applied successfully.</Status>
</IPHost>
</Response>

curl -k "">172.16.0.38:4444/.../APIController
<?xml version="1.0" encoding="UTF-8"?>
<Response APIVersion="1800.2" IPS_CAT_VER="1">
<Login>
<status>Authentication Successful</status>
</Login>
<IPHost transactionid="">
<Status code="200">Configuration applied successfully.</Status>
</IPHost>
</Response>

The status code of the second Request should be 502 RIght??

By the way, I cannot filter the IP Host by any means, who Do I suppose to know if a Host is already created?

And please move form XML it's 2021

Thank you very much,

Regards



This thread was automatically locked due to age.
Parents Reply Children
No Data