Getting anyconnect graphs via API

Hello,

I’m trying to get graphs via the API but could use a hand,

When doing the below command I’m getting the names of the graphs accordingly

curl -H 'X-Auth-Token: KEY' https://localhost/api/v0/devices/330/graphs/

{
    "status": "ok",
    "graphs": [
        {
            "desc": "Poller Time",
            "name": "device_poller_perf"
        },
        {
            "desc": "Ping Response",
            "name": "device_ping_perf"
        },
        {
            "desc": "Current connections",
            "name": "device_asa_conns"
        },
        {
            "desc": "Remote Access Sessions",
            "name": "device_cras_sessions"
        },
        {
            "desc": "SNMP Statistics",
            "name": "device_netstat_snmp"
        },
        {
            "desc": "SNMP Packet Type Statistics",
            "name": "device_netstat_snmp_pkt"
        },
        {
            "desc": "System Uptime",
            "name": "device_uptime"
        }
    ],
    "count": 7

But when trying to find a route to any of the above graphs it’s failing, am I doing it wrong or are they simply missing?

curl -H 'X-Auth-Token: KEY' https://localhost/api/v0/devices/330/graphs/device_cras_sessions

    "status": "error",
    "message": "This API route doesn't exist."

In case someone else comes across this:

This will fail

curl -H 'X-Auth-Token: KEY' https://localhost/api/v0/devices/330/graphs/device_cras_sessions

Instead use this format (remove /graphs)

curl -H 'X-Auth-Token: KEY' https://localhost/api/v0/devices/330/device_cras_sessions

Thank you, this is indeed the solution to this issue.