SitesStatsDevices

getSiteSwitchesMetrics

GET
/api/v1/sites/{site_id}/stats/switches/metrics

Get version compliance metrics for managed or monitored switches

Authorization

Authorization<token>

Preferred authentication method for automation and integrations. Send the API token in the HTTP Authorization header.

Format: Authorization: Token {apitoken}

Notes:

  • An API token generated for a specific admin has the same privileges as that admin
  • An API token is automatically removed if it is not used for more than 90 days
  • SSO admins cannot generate admin API tokens. Use organization API tokens when scoped Org/Site privileges are needed.

In: header

Path Parameters

site_id*string
Formatuuid

Query Parameters

type?"active_ports_summary"

Filter results by type. enum: active_ports_summary

Value in

  • "active_ports_summary"
scope?string

Filter results by scope. enum: site, switch

Value in

  • "site"
  • "switch"
switch_mac?string

Switch mac, used only with metric type==active_ports_summary

Response Body

curl -X GET "https://example.com/api/v1/sites/000000ab-00ab-00ab-00ab-0000000000ab/stats/switches/metrics"

{  "active_ports_summary": {    "details": {      "active_port_count": 4,      "total_port_count": 4    },    "score": 100,    "total_switch_count": 2  },  "config_success": {    "details": {      "config_success_count": 2    },    "score": 100,    "total_switch_count": 2  },  "version_compliance": {    "details": {      "major_versions": [        {          "major_count": 1,          "major_version": "21.4R3.5",          "model": "EX2300-C-12P",          "system_names": []        },        {          "major_count": 1,          "major_version": "6.0.4-11",          "model": "SSR120",          "system_names": []        }      ]    },    "score": 100,    "total_switch_count": 2  }}