Does anyone know of a system function or db query that will return a list of gateways that are pending approval in the incoming gateway page of the Gateway Network?
There is no built in system function that returns a list of gateway network connections pending approval. Here’s a list of all the current 8.1 system functions - System Functions - Ignition User Manual 8.1 - Ignition Documentation
But you can submit a feature request to see if that can be implemented in the future. Submission can be filed here - Ignition Features and Ideas | Inductive Automation