Forum Discussion
Brian-Anderson
Cato Employee
24 days agoHi,
The topic of resolving the siteLocation has been something we have been working to make more simple, as using the apis directly can be a bit cumbersome to get the specific data you are looking for all in one payload. There are a few ways we can address that in a more simple way.
- use the catocli (public pip package) to run a single command to resolve these fields.
Example in a terminal:
$ pip3 install catocli
$ export CATO_TOKEN="your-api-token-here"
$ export CATO_ACCOUNT_ID="your-account-id"
$ catocli query siteLocation -h
$ catocli query siteLocation '{"filters":[{"search": "San Diego","field":"city","operation":"exact"}]}' -p - Use a terraform data source
https://registry.terraform.io/providers/catonetworks/cato/latest/docs/data-sources/siteLocation - Ingest the json data directly in your code as a local lookup
https://github.com/catonetworks/cato-cli/blob/main/models/query.siteLocation.json