How to get the result of mutation
Hello team,
We are currently considering using the Cato API to automate configuration for our customers.
We would like to create sites, administrators, policies, etc. with the mutation commands, and then retrieve and display the applied settings with the query command.
Based on the schema and actual behavior, we have confirmed that this is possible with firewall policies and administrators.
However, I am not able to get more information than ID and name in the site settings.
Is there any way to get these detailed configuration information?
If not, is there any plan to implement this in the near future?
thankyou,
Hello,
Yes, when creating a site, the only payload returned is that if the ID of the newly created site.
However, you can then use that ID to pull down all the site details of your new site with an account snapshot query with a filter on that ID, so you only get the details of the site you created back and not all of them.For example, if you were to create a site and the returned ID was 12345, you could then run the following query to return all the sites data, note this query returns all possible payload items, so prune down as required:
query accountSnapshot($accountID:ID!) {
accountSnapshot(accountID:$accountID) {
id
sites(siteIDs: ["12345"]) {
id
altWanStatus
connectedSince
connectivityStatus
devices {
connected
connectedSince
deviceUptime
haRole
id
identifier
interfaces {
cellularInterfaceInfo {
apn
apnSelectionMethod
disconnectionReason
iccid
imei
isModemConnected
isModemSuspended
isRoamingAllowed
isSimSlot1Detected
isSimSlot2Detected
modemStatus
networkType
operatorName
signalStrength
simNumber
simSlotId
}
connected
id
info {
destType
downstreamBandwidth
id
name
upstreamBandwidth
}
name
naturalOrder
physicalPort
popName
previousPopID
previousPopName
tunnelConnectionReason
tunnelRemoteIP
tunnelRemoteIPInfo {
city
countryCode
countryName
ip
latitude
longitude
provider
state
}
tunnelUptime
type
}
interfacesLinkState {
duplex
hasAddress
hasInternet
hasTunnel
id
linkSpeed
mediaIn
up
}
internalIP
lastConnected
lastDuration
lastPopID
lastPopName
mfaCreationTime
mfaExpirationTime
name
osType
osVersion
recentConnections {
deviceName
duration
interfaceName
lastConnected
popName
remoteIP
remoteIPInfo {
city
countryCode
countryName
ip
latitude
longitude
provider
state
}
}
releaseGroup
socketInfo {
id
isPrimary
platform
serial
version
versionUpdateTime
}
type
version
versionNumber
}
haStatus {
keepalive
readiness
socketVersion
wanConnectivity
}
hostCount
id
info {
cityName
connType
countryCode
countryName
countryStateName
creationTime
description
interfaces {
destType
downstreamBandwidth
id
name
upstreamBandwidth
}
ipsec {
catoIP
ikeVersion
isPrimary
remoteIP
}
isHA
name
region
sockets {
id
isPrimary
platform
serial
version
versionUpdateTime
}
type
}
lastConnected
operationalStatus
popName
protoId
}
}
}Regards,
Finn