API Discussions
Discussions and questions regarding the Cato Networks APIBest Practices
Find Cato Network API best practices, tips, and tricks
Recent Content
How can I isolate traffic between two specific sites using the Cato API?
Hello Catoers, I'm trying to get an overview of data transferred between sites via the Cato tunnel. I considered using the accountMetrics query to analyze bytesUpstream and bytesDownstream, but that only provides aggregate data without specifying the destination. Would using eventsFeed - filtering by source and destination - be a better approach? Or is there another query that directly correlates traffic between specific sites? Thanks for your guidance.25Views1like2CommentsExample: Agentic AI with Cato
Cato's XDR already meets the criteria for being Agentic AI, and the additional features in the pipeline will continue to drive automation. But our XDR also has read/write APIs, allowing customers to add on their own LLM-powered agents. This notebook walks you through an example of an XDR Triage Agent which combines the Cato API with an LLM. Customers who don't want to use an LLM can still gain insights into how to use the xdr.stories query and xdr.analystFeedback mutation to programmatically manage XDR stories. https://github.com/catonetworks/data-analytics/blob/main/notebooks/Agentic%20AI%20-%20XDR%20Stories.ipynb18Views0likes0CommentsLooking 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.Solved37Views1like5CommentsNew KB article: detailed explanation of accountMetrics timeseries
This article explains how to request a timeseries metric and more importantly, how to interpret the results so that you can create a throughput chart in Excel which matches the graphs seen in CMA. https://support.catonetworks.com/hc/en-us/articles/25296975130525-Example-Site-Bandwidth-with-accountMetrics-API10Views2likes0CommentsAccountMetrics - Cannot query field "tunnelAge" on type "Metrics"
We would like to query connectivity metrics using the accountMetrics API. This works as expected for metrics such as bytesUpstream, bytesDownstream. However, it fails for some other metrics such as tunnelAge and lastMilePacketLoss. Request URL: https://api.catonetworks.com/api/v1/graphql2 Request body: { "query": "{ accountMetrics(accountID:XXXX timeFrame: \"utc.xxxx/{15:50:00--16:00:00}\" groupInterfaces:false groupDevices:false) { sites { interfaces { metrics { tunnelAge } timeseries(buckets: 10 labels: [tunnelAge]) { data label units } } } } }" } Exception: 422 Unprocessable Entity { "errors": [ { "message": "Cannot query field \"tunnelAge\" on type \"Metrics\".", "locations": [ { "line": 1, "column": 157 } ], "extensions": { "code": "GRAPHQL_VALIDATION_FAILED" } } ], "data": null } According to the documentation, this should work: Cato API - AccountMetrics > Timeseries – Cato Learning Center Why is it that this request does not work for 'tunnelAge' but does work for 'bytesUpstream'?Solved28Views0likes2CommentsHow do I filter AccountSnapshot by site?
Hy everyone, I'm trying to filter the ‘AccountSnapshot’ results by site. I'm trying to use the ‘siteIDs’ field to target a site. I tried using the IDs in "AccountSnapshot > sites > id" but it's failed. However, all the IDs I've used don't work. Do you know what GraphicQL query I can use to find this ‘siteIDs’? Thank for your timeSolved54Views0likes4Comments