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 SG REST API - efficient REF lookup for network/*

Hi,

I'm working on a Sophos SG API integration, and I'm wondering if there's an easier way to do REF lookups?

Right now, if I hit the following:
GET https://<IP>:4444/api/objects/packetfilter/nat/

Part of the response contains a field such as:

destination: REF(network/*)

 

This tells me that the reference could be any one of the potential network lookups. Right now, I have to hit the following URLs to do a lookup:

GET https://<IP>:4444/api/objects/network/aaa/{REF}
+ check for a 404, and if yes, then hit:
GET https://<IP>:4444/api/objects/network/any/{REF}
+ check for a 404, and if yes, then hit:
GET https://<IP>:4444/api/objects/network/availability_group/{REF}
+ check for a 404, etc

 

Is there any more efficient way to do this lookup for network/* from /objects/packetfilter/nat results?

 

Thanks!



This thread was automatically locked due to age.