Pull network rules via API
- 2 months ago
Hi,
It looks like your query is looking to filter results for a specific site, where the siteId is 0. This would not be a valid site ID which is why the results would not return any records. You actually don't need to submit the parent, and you will get back all of the site records this way.
Query:
query entityLookup ( $accountID:ID! $type:EntityType! $sortInput:[SortInput] $lookupFilterInput:[LookupFilterInput] ) {
entityLookup ( accountID:$accountID type:$type sort:$sortInput filters:$lookupFilterInput ) {
items {
entity {
id
name
type
}
description
helperFields
}total
}
}
Variables:
{
"accountID": "12345",
"type": "site"
}
Have you considered using the api explorer where you can have this application help craft these payloads for you and generate code for you as well?
https://github.com/catonetworks/cato-api-explorerWe also have examples up on the terraform registry for how to manage networks and network rules for various route types, as well as TLSi rules for bypassing tls. Is this what you are looking for?
https://registry.terraform.io/providers/catonetworks/cato/latest/docs/resources/tls_rule
https://registry.terraform.io/providers/catonetworks/cato/latest/docs/resources/wnw_rule
https://registry.terraform.io/modules/catonetworks/bulk-tls-rules/cato/latest
https://registry.terraform.io/modules/catonetworks/bulk-wnw-rules/cato/latestPlease let us know if we can be of any further assistance. :D