API Discussions
Discussions and questions regarding the Cato Networks APIBest Practices
Find Cato Network API best practices, tips, and tricks
Recent Content
addSocketSite Location lookup incomplete
Trying to add sites to tenant via API Using addSocketSite in Postman. Fails, reporting: {"errors":[{"message":"timezone [US/Pacific] is unknown","path":["site","addSocketSite","input","siteLocation","timezone"]}],"data":{"site":{"addSocketSite":null}}} Inspecting the results of the lookup, I can see that UA has three timezones When you lookup US there is only one timezone. If I am importing 15 sites only the sites in Mountain timezone succeed. Is this a production tool or method?15Views0likes1CommentAdd Interface Subnets to User Defined Groups
Hi, using the Cato API is it possible to add Site Interface Subnets to a user defined group? The use case here would be to create a script that creates a Site, creates routes networks, and then adds those routed networks to several groups. I checked the API documentation, but didn't see any options initially. Thanks!Solved11Views1like1CommentQuerying Source/App/Category ID for Firewall Script
Hi Team, This is Catolab from South Korea. We are working on a script to add multiple firewalls via a CSV file. However, we are encountering difficulties in defining the "ID" for the Source, App, and Category fields. I have attached the CSV file and the Python script for your reference. https://naver.me/Fnmg7zsn Could you provide insights on how we can query the "ID" for each Source, App, and Category type? So far, I have only found entity lookup options for User and Site. Thank you for your help, and have a great day!18Views0likes0CommentsAPI for LDAP Sync
Hi, Team. We have checked the KB and API documents and there are only two ways to sync LDAP users which is through Daily Sync feature and 'Sync Now' button. We have asked to Cato Support that if there is a way to automatically sync in defined minutes or hours. (ex. set 5 minutes to automatically sync LDAP users) The response was we have to RFE for that feature. Then I asked them if there is API for LDAP Sync and they lead me to here. So, currently, is there any API query for LDAP Sync we can use?55Views0likes3CommentsLooking for Socket Interface Wan Role and Precedence
Hello devs! I am trying to fetch interface data for our application. In doing so, I realized that I cannot locate the interface wan role # and the precedence # from CATO API. I did some digging and found 'naturalOrder' - is this the WAN precedence? Also, directly from the Socket Web GUI (proxy) - I could see `wan_outlet_id` which looks like it could be the wan role, however this is not exposed in InterfaceSnapshot. ps: Do varioius Socket/vSocket platforms have different values/limits for WAN Role and Precedence? I currently see 3 WAN Roles, and 3 Precedences in our deployments.Solved79Views1like6CommentsCloning Firewall rules
Ever notice how Cato defaults are not Cato best practices. I have a preferred layout for Internet Firewall and WAN Firewall rules. I have them in multiple sections for business rules and best practice rules. I am wanting to created a pristine template that I can apply to a new tenant that sets up all of my preferences. I am pretty fluent with Postman and python. Any bread crumbs or ideas on how to back up the Internet Rules from one tenant and push them in to a net new tenant? Any ideas are greatly appreciated. Thanks, Brian88Views1like5CommentsDoes the Cato API support batch submissions?
I'm looking to add over 200 DHCP reservations to one of our sites. Does the API support batch submissions in the following format or do I need to include the 'accountId" and 'siteId' lines for each host? [ { "accountId": "123456", "siteId": "78910", "input": { "name": "Host1", "ip": "192.168.1.10", "macAddress": "00:1A:2B:3C:4D:5E" } }, { "input": { "name": "Host2", "ip": "192.168.1.11", "macAddress": "00:1A:2B:3C:4D:5F" } } ]43Views1like2CommentsHow do you make an API request that lists IP address of LAN and WAN interfaces ?
I need to retrieve several pieces of information using API requests : - full list of IP ranges for LAN interfaces (type : Native, VLAN, Routed) [screenshot] - IP addresses of the WAN interfaces (socket IP) In the "entityLookUp" request, I can only find the site's native IP address (VLAN, Routed?) and in the "accountSnapshot" request, there is no internal address. Thank for your timeSolved66Views1like2CommentsHow To Get All users Regardless Of Current Connection Status
I am trying to retrieve a list of all users including their last connected datetime, which doesnt seem to be included in the results for entity lookup. I do get this field from accountSnapshot, but that only returns a list of users that are currently connected, I need all of them. I am trying to retrieve all user ids via entity lookup and then pass them to the accountSnapshot since you can get non connected users by specifying their ids. Anyonehave any suggestions on how to adjust my query? I am working in C#/DotnetSolved45Views0likes2Comments