We strongly recommend that before you start using the Cato API, please review the Support Policy for the Cato API.
Cato APIs provide the ability to easily retrieve detailed information regarding your account from the Cato Cloud. This allows you to integrate with any other data stack that may operate within your business environment. The APIs provide a wide variety of functions, data fields, and types for better monitoring capabilities and visualization using the GraphQL API language.
This article contains example Python scripts for running various Cato API calls. Each script has multiple flags and parameters available. It is recommended to read the comments in each script to understand full functionality.
Please note that all scripts provided in this article are for reference only, as an example of what can be achieved with the Cato API.
The accountMetrics query helps you analyze the state (and quality) of the connections of sites/users to the Cato Cloud. This data is for the traffic inside the DTLS tunnel between the site and the Cato Cloud.
accountMetrics shows real-time and historical metrics, statics, and analytics for the account. Returns data that is similar to the Network Analytics screen for a site in the Cato Management Application.
An example accountMetrics python script can be found here:
accountSnapshot provides snapshot-based metrics that show near real‑time data for the account. This call provides analytics that are similar to the Topology page for the account.
An example accountSnapshot python script can be found here:
The auditFeed query helps you analyze actions taken by admins in the Cato Management Application. The data that this query returns is similar to the Administration > Audit Trail window in the Cato Management Application.
An example auditFeed python script can be found here:
The entityLookup query works with Cato Management Application entities such as sites and users. The query can help you look up an entity name to return the specific ID, and automatically extract a list of entities in the account. Each entity is returned with additional relevant information, such as the creation date and the description.
An example entityLookup python script can be found here:
The eventsFeed query helps you analyze events generated by activities related to networking, security, Sockets, Cato Clients, and more. The event data that this query returns is similar to the Monitoring > Events window in the Cato Management Application.
An example eventsFeed python script can be found here: