Meraki API to get switch ports connectivity history throws 404 error

DeshanFernando
New here

Meraki API to get switch ports connectivity history throws 404 error

Hi All,

 

I'm currently in the middle of developing a solution to extract connectivity data from Meraki switches, but the API I'm using is returning a 404 error. Does anyone know if this API is currently available?

 

API link - https://developer.cisco.com/meraki/api-v1/get-organization-switch-ports-connectivity-history-by-devi...

2 Replies 2
rhbirkelund
Kind of a big deal
Kind of a big deal

Works on my organization.

RHB@wopr ~ % curl -L --request GET \
--url https://api.meraki.com/api/v1/organizations/XXX/switch/ports/connectivity/history/byDevice \
--header 'Authorization: Bearer XXXX' \
--header 'Accept: application/json'
{"items":[{"serial":"xxxx","ports":[{"id":1,"events":[{"endTs":"2024-06-11T07:58:36.000000Z","startTs":"2024-06-10T07:58:36.000000Z","status":"Optimal speed and connectivity"}]},{"id":2,"events":[{"endTs":"2024-06-11T07:58:36.000000Z","startTs":"2024-06-10T07:58:36.000000Z","status":"Disconnected"}]},{"id":3,"events":[{"endTs":"2024-06-11T07:58:36.000000Z","startTs":"2024-06-10T07:58:36.000000Z","status":"Disconnected"}]},{"id":4,"events":[{"endTs":"2024-06-11T07:58:36.000000Z","startTs":"2024-06-10T07:58:36.000000Z","status":"Disconnected"}]},{"id":5,"events":[{"endTs":"2024-06-11T07:58:36.000000Z","startTs":"2024-06-10T07:58:36.000000Z","status":"Speed below 100 Mbps"}]},{"id":6,"events":[{"endTs":"2024-06-11T07:58:36.000000Z","startTs":"2024-06-10T07:58:36.000000Z","status":"Disconnected"}]},{"id":7,"events":[{"endTs":"2024-06-11T07:58:36.000000Z","startTs":"2024-06-10T07:58:36.000000Z","status":"Optimal speed and connectivity"}]},{"id":8,"events":[{"endTs":"2024-06-11T07:58:36.000000Z","startTs":"2024-06-10T07:58:36.000000Z","status":"Speed below 100 Mbps"}]},{"id":9,"events":[{"endTs":"2024-06-11T07:58:36.000000Z","startTs":"2024-06-10T07:58:36.000000Z","status":"Disconnected"}]},{"id":10,"events":[{"endTs":"2024-06-11T07:58:36.000000Z","startTs":"2024-06-10T07:58:36.000000Z","status":"Disconnected"}]}],"network":{"id":"xxxx","name":"Home Office"}}}%                                      RHB@wopr ~ % 
LinkedIn ::: https://blog.rhbirkelund.dk/

Like what you see? - Give a Kudo ## Did it answer your question? - Mark it as a Solution 🙂

All code examples are provided as is. Responsibility for Code execution lies solely your own.
PhilipDAth
Kind of a big deal
Kind of a big deal

 

Does it work if you use the code snippets provided (on the right hand side)?

PhilipDAth_0-1718092998257.png

 

Get notified when there are additional replies to this discussion.