How to get the result of mutation
- 5 days ago
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