Forum Discussion

ddaniel's avatar
ddaniel
Icon for Making Connections rankMaking Connections
5 months ago

API call to return number of current SDP sessions?

I was wondering if there is an API call to return the number of current SDP sessions?   I am able to return the list of connected sessions and count them, but I was wondering if there is a more direct way to just return the number directly.  Thanks.

4 Replies

  • ddaniel's avatar
    ddaniel
    Icon for Making Connections rankMaking Connections

    yes - the list of concurrent SDP/ZTNA users connected.  If I am asking for "everything" here, I would also like to know the number of truly "remote" users vs in office users.  I would like to produce a dashboard (outside of Cato) for management that showed In Office user count, remote SDP user count, and our VDI session count with a 5 minute gather interval.  I will likely pull all Cato session information and parse it to split out the information.  I was producing this with our previous VPN solution (via snmp ) and via API for the VDI session count.

  • GianlucaUlivi's avatar
    GianlucaUlivi
    Icon for Making Connections rankMaking Connections

    Hi,

    I do believe that the AccountSnapshot query should report the info you need under the "users" section.
    I was looking into this a few weeks ago but have scrapped the idea in the meantime (as the result I was looking for was not needed anymore) so it may not be 100% accurate or correct.

    The query I was using was this:

    query AccountSnapshot($accountID: ID!) {
        accountSnapshot(accountID: $accountID) {
            users {
                name
                connectivityStatus
                connectedInOffice
                lastConnected
                info {
                    email
                    authMethod
                    status
                }
                id
            }
        }
    }

    And this is and example of the result I got:

    {
        "data": {
            "accountSnapshot": {
                "users": [
                    {
                        "name": "Name Surname",
                        "connectivityStatus": "connected",
                        "connectedInOffice": false,
                        "lastConnected": "2025-09-23T09:01:08Z",
                        "info": {
                            "email": "name.surname@example.com",
                            "authMethod": "SSO",
                            "status": "active"
                        },
                        "id": "1000001"
                    },
                    {
                        "name": "Name Surname",
                        "connectivityStatus": "connected",
                        "connectedInOffice": false,
                        "lastConnected": "2025-09-23T09:04:42Z",
                        "info": {
                            "email": "name.surname@example.com",
                            "authMethod": "SSO",
                            "status": "active"
                        },
                        "id": "1000002"
                    }
                ]
            }
        }
    }

    I think it have the information you need, plus you can add more details in the query if needed.

    Hope this helps :)
    Best regards,
    Gianluca

  • michaelsaw's avatar
    michaelsaw
    Icon for Cato Professional Services rankCato Professional Services

    Hi ddaniel, 

    Are you referring to list of concurrent SDP/ZTNA users connected on Cato?
    Alternatively, would you consider exporting the list of concurrent users in CMA > Access > Access Overview? 

    Cheers