Community Record
483
Posts
721
Kudos
25
Solutions
Badges
Feb 9 2025
2:21 AM
Hi Ryan, once you have gathered the port schedule IDs for a device, use getOrganizationConfigurationChanges afterward to see if it ever changed. This is much more efficient than gathering per-device configs over and over.
... View more
Feb 9 2025
2:19 AM
Hi @Quokka, these operations are all part of the latest Python libraries. Please ensure you're using 1.53 or later. If you are seeing timestamps from 1970, I'd work with Meraki Support to nail down the cause.
... View more
Feb 4 2025
9:26 AM
If we take getNetworkClients as an example. There's only one documented path for this operation, which is {baseUri}/networks/{networkId}/clients. Using undocumented base URIs is a separate issue, and covered in this notice.
... View more
Jan 30 2025
10:59 AM
4 Kudos
Hello folks, In our OpenAPI spec we name the operation paths to use when making API requests. These are the only paths that should be used for dashboard API requests. Making API requests to undocumented paths can mean your application suddenly stops working, the fix for which would be to change your path to one that's documented for your region. Call to action: developers If you have developed and/or maintain an integration that uses dashboard API, please ensure you're using only the documented paths for your region. If you already only use the documented paths, then no action is required. Call to action: non-developer users or consumers of integrations If you leverage integrations but are not involved in the development, please check with your integration's developer that they are only using the documented paths for your region. They should be able to affirm which paths they are using and affirm whether or not they are documented in OAS, as well as advise on a remediation plan.
... View more
Labels:
- Labels:
-
Dashboard API
-
Updates from Meraki
Jan 21 2025
4:41 PM
Hi @seb90 I also tested this out and I found that I got that None response, too, so I'm with you! Coincidentally, I was involved in the original development of this operation, and I know it did work, once upon a time 🦄🌈👸🏼. Meraki Support is your best bet for a solution. But I know that traffic analytics are calculated according to one of two frameworks: the first, TA, is legacy. The newer one, NBAR, is what I'm using today and have been using for months. It's possible that the API operation queries TA data, finds none, then response None. Probably not an ideal result. Coincidentally, my Organization > Summary Report page "Top applications by usage" does show results, so perhaps the GUI page is using a different operation in the backend. Either way, I think the network ID filter is a red herring, and I recommend reporting it to Meraki Support.
... View more
Jan 21 2025
1:56 PM
2 Kudos
API docs issues would go through Support. Python library issues would go through the GitHub repo.
... View more
Jan 8 2025
12:51 PM
3 Kudos
It's totally possible that it wasn't implemented. You can follow up on the GitHub issues tracker for the library in case the contributors have any thoughts. For example, I maintain the library and occasionally contribute to it, but I don't think I ever really looked at that variable. I might reach out to the contributor on the git blame for it. I'm pretty sure it wasn't me 😅
... View more
Dec 13 2024
10:29 AM
An org-wide switch ports usage history operation, getOrganizationSwitchPortsUsageHistoryByDeviceByInterval, has also been released. For usage information, this operation is far more efficient than using the getDeviceSwitchPortsStatuses operation, and unlike the single-device operation, offers t1 controls and a history. This one will be included in the January 2025 docs update. In the meantime, here's the schema: {
"/organizations/{organizationId}/switch/ports/usage/history/byDevice/byInterval": {
"get": {
"description": "List the historical usage and traffic data of switchports in an organization.",
"operationId": "getOrganizationSwitchPortsUsageHistoryByDeviceByInterval",
"parameters": [
{
"name": "organizationId",
"in": "path",
"description": "Organization ID",
"schema": {
"type": "string"
},
"required": true
},
{
"name": "t0",
"in": "query",
"description": "The beginning of the timespan for the data. The maximum lookback period is 31 days from today.",
"schema": {
"type": "string"
}
},
{
"name": "t1",
"in": "query",
"description": "The end of the timespan for the data. t1 can be a maximum of 31 days after t0.",
"schema": {
"type": "string"
}
},
{
"name": "timespan",
"in": "query",
"description": "The timespan for which the information will be fetched. If specifying timespan, do not specify parameters t0 and t1. The value must be in seconds and be less than or equal to 31 days. The default is 1 day. If interval is provided, the timespan will be autocalculated.",
"schema": {
"type": "number",
"format": "float",
"maximum": 2678400
}
},
{
"name": "interval",
"in": "query",
"description": "The time interval in seconds for returned data. The valid intervals are: 300, 1200, 14400, 86400. The default is 1200. Interval is calculated if time params are provided.",
"schema": {
"type": "integer"
}
},
{
"name": "perPage",
"in": "query",
"description": "The number of entries per page returned. Acceptable range is 3 - 50. Default is 10.",
"schema": {
"type": "integer"
}
},
{
"name": "startingAfter",
"in": "query",
"description": "A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.",
"schema": {
"type": "string"
}
},
{
"name": "endingBefore",
"in": "query",
"description": "A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.",
"schema": {
"type": "string"
}
},
{
"name": "configurationUpdatedAfter",
"in": "query",
"description": "Optional parameter to filter items to switches where the configuration has been updated after the given timestamp.",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "mac",
"in": "query",
"description": "Optional parameter to filter items to switches with MAC addresses that contain the search term or are an exact match.",
"schema": {
"type": "string"
}
},
{
"name": "macs",
"in": "query",
"description": "Optional parameter to filter items to switches that have one of the provided MAC addresses.",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"name": "name",
"in": "query",
"description": "Optional parameter to filter items to switches with names that contain the search term or are an exact match.",
"schema": {
"type": "string"
}
},
{
"name": "networkIds",
"in": "query",
"description": "Optional parameter to filter items to switches in one of the provided networks.",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"name": "portProfileIds",
"in": "query",
"description": "Optional parameter to filter items to switches that contain switchports belonging to one of the specified port profiles.",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"name": "serial",
"in": "query",
"description": "Optional parameter to filter items to switches with serial number that contains the search term or are an exact match.",
"schema": {
"type": "string"
}
},
{
"name": "serials",
"in": "query",
"description": "Optional parameter to filter items to switches that have one of the provided serials.",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
],
"responses": {
"200": {
"description": "Successful operation",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the switch."
},
"serial": {
"type": "string",
"description": "The serial number of the switch."
},
"mac": {
"type": "string",
"description": "The MAC address of the switch."
},
"network": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the network."
},
"id": {
"type": "string",
"description": "The ID of the network."
}
},
"description": "Identifying information of the switch's network."
},
"model": {
"type": "string",
"description": "The model of the switch."
},
"ports": {
"type": "array",
"items": {
"type": "object",
"properties": {
"portId": {
"type": "string",
"description": "The string identifier of this port on the switch. This is commonly just the port number but may contain additional identifying information such as the slot and module-type if the port is located on a port module."
},
"intervals": {
"type": "array",
"items": {
"type": "object",
"properties": {
"startTs": {
"type": "string",
"format": "date-time",
"description": "The starting timestamp of the given interval."
},
"endTs": {
"type": "string",
"format": "date-time",
"description": "The end timestamp of the given interval."
},
"data": {
"type": "object",
"properties": {
"usage": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"description": "The total amount of data sent and received (in kilobytes)."
},
"upstream": {
"type": "integer",
"description": "The amount of data sent (in kilobytes)."
},
"downstream": {
"type": "integer",
"description": "The amount of data received (in kilobytes)."
}
},
"description": "Usage data for the given interval."
}
},
"description": "A breakdown of how many kilobytes have passed through this port during the interval timespan."
},
"bandwidth": {
"type": "object",
"properties": {
"usage": {
"type": "object",
"properties": {
"total": {
"type": "number",
"format": "float",
"description": "The average speed of the data sent and received (in kilobits-per-second)."
},
"upstream": {
"type": "number",
"format": "float",
"description": "The average speed of the data sent (in kilobits-per-second)."
},
"downstream": {
"type": "number",
"format": "float",
"description": "The average speed of the data received (in kilobits-per-second)."
}
},
"description": "Bandwidth usage data for the given interval."
}
},
"description": "A breakdown of the average speed of data that has passed through this port during the interval."
},
"energy": {
"type": "object",
"properties": {
"usage": {
"type": "object",
"properties": {
"total": {
"type": "number",
"format": "float",
"description": "The total energy in watt-hours delivered by this port during the interval"
}
},
"description": "Energy data for the given interval."
}
},
"description": "How much energy (in watt-hours) has been delivered by this port during the interval."
}
}
},
"description": "An array of intervals for a port with bandwidth, traffic, and power usage data."
}
}
},
"description": "The number of ports on the switch with usage data."
}
}
},
"description": "Switches"
},
"meta": {
"type": "object",
"properties": {
"counts": {
"type": "object",
"properties": {
"items": {
"type": "object",
"properties": {
"total": {
"type": "integer",
"description": "The total number of items in the dataset"
},
"remaining": {
"type": "integer",
"description": "The number of items in the dataset that are available on subsequent pages"
}
},
"description": "Counts relating to the paginated items"
}
},
"description": "Counts relating to the paginated dataset"
}
},
"description": "Metadata relevant to the paginated dataset"
}
}
},
"example": {
"items": [
{
"name": "Example Switch",
"serial": "Q555-5555-5555",
"mac": "01:23:45:67:ab:cd",
"network": {
"name": "Example Network",
"id": "L_12345"
},
"model": "MS120-8",
"ports": [
{
"portId": "1",
"intervals": [
{
"startTs": "2024-02-11T00:00:00.090210Z",
"endTs": "2024-02-11T00:20:00.090210Z",
"data": {
"usage": {
"total": 40867,
"upstream": 23008,
"downstream": 17859
}
},
"bandwidth": {
"usage": {
"total": 2.2,
"upstream": 1.2,
"downstream": 1.0
}
},
"energy": {
"usage": {
"total": 2.2
}
}
}
]
}
]
}
],
"meta": {
"counts": {
"items": {
"total": 1,
"remaining": 0
}
}
}
}
}
},
"headers": {
"Link": {
"schema": {
"type": "string"
},
"description": "A comma-separated list of first, last, prev, and next relative links used for subsequent paginated requests."
}
}
}
},
"summary": "List the historical usage and traffic data of switchports in an organization.",
"tags": [
"switch",
"monitor",
"ports",
"usage",
"history",
"byDevice",
"byInterval"
]
}
}
}
... View more
Dec 5 2024
8:45 AM
6 Kudos
Good morning team, With 1.53.0 we're releasing these new operations which can streamline your telemetry gathering. If you are using getDeviceSwitchPortsStatuses at any scale, iterating over the devices in your organization, then these new operations, designed for specific use cases, will help you get more done in fewer API calls. getOrganizationSwitchPortsClientsOverviewByDevice: List the number of clients for all switchports with at least one online client in an organization. If you're reporting on per-port client counts, then this operation meets that need. getOrganizationSwitchPortsOverview: Returns the counts of all active ports for the requested timespan, grouped by speed. An active port is a port that at any point during the timeframe is observed to be connected to a responsive device and isn't configured to be disabled. The number of inactive ports, and the total number of ports are also provided. If you are reporting on overall port count utilization, then this operation meets that need without iterating over devices or networks. getOrganizationSwitchPortsTopologyDiscoveryByDevice: List most recently seen LLDP/CDP discovery and topology information per switch port in an organization. If you're collecting discovery telemetry across all of your switches, this operation has you covered. getOrganizationSwitchPortsStatusesBySwitch: Retrieve all of the per-port statuses across switches in an organization. If you're wondering which ports might have errors, warnings, spanning tree information, or whether they're uplinks, allocating PoE, or using SecurePort, this operation has you covered.
... View more
Labels:
- Labels:
-
Dashboard API
-
Updates from Meraki
Dec 5 2024
8:32 AM
Unwrap the 'true' -- for booleans, send only true in either the body of the request or the query param, based on the docs. In your case, the operation probably has enabled as a body attribute and not a query param. So instead of sending as a query param, send it in the appropriate place in the body of the request.
... View more
Dec 2 2024
9:00 AM
Hi @NathanL which API operation(s) did you use that evidenced this issue? The getNetworkDevices operation mentioned above is deprecated, so I'm interested if this is happening with any operations that aren't deprecated.
... View more
Nov 12 2024
10:48 AM
1 Kudo
I would leverage port profiles instead of switch profiles. Several API operations are available in Early Access: https://developer.cisco.com/meraki/api-v1/search/?q=port%20profile
... View more
Oct 25 2024
10:32 AM
If you're using both classic Meraki and Catalyst devices, then I'd look at https://developer.cisco.com/meraki/api-v1/get-organization-firmware-upgrades-by-device/ instead. This one breaks it out by device, but might more work to consume if you're classic Meraki only.
... View more
Oct 25 2024
10:16 AM
Later in the import process the correct status is set during the transform and all the CIs get their install status to Installed. I cannot find any sensible reason for why this is done, as the robust transform map will set the Network and Organization status afterwards. What am I missing with this preprocessing and why is it needed? Yes, this is correct and intended behavior. Meraki devices might be removed from organization inventory, in which case, they would remain retired CIs in SNOW. Only the devices discovered in the most recent import are switched back to Installed status at the end of the import, since they are discovered in dashboard. Without doing this, there would be orphaned devices in "Installed" status, which would be incorrect.
... View more
Oct 25 2024
10:13 AM
Hi Alex, claiming into combined networks should work. You may still have an incorrect network ID, however, to explain the 400, or there may be some other reason why you're not allowed to make that change (e.g. permissions issue on that network). In any case, deeplinking, etc. is not necessary. I hope this helps!
... View more
Oct 25 2024
9:56 AM
7 Kudos
Hello folks, In our dashboard API authorization docs we name the base URIs (e.g. https://api.meraki.com/api/v1 for US Commercial) to use when making API requests. These are the only base URIs that should be used for dashboard API requests. Making API requests to undocumented base URIs can mean your application suddenly stops working, the fix for which would be to change your base URL to one that's documented for your region. Call to action: developers If you have developed and/or maintain an integration that uses dashboard API, please ensure you're using only the documented base URI for your region. If you already only use the documented base URI(s), then no action is required. Call to action: non-developer users or consumers of integrations If you leverage integrations but are not involved in the development, please check with your integration's developer that they are only using the documented base URI for your region. They should be able to affirm which base URI(s) they are using and affirm whether or not they are documented in our docs page, as well as advise on a remediation plan.
... View more
Labels:
- Labels:
-
Dashboard API
-
Updates from Meraki
Oct 25 2024
9:39 AM
I'm not sure how closely those numbers should align, because I'm not familiar with the methods that produce the data. But it is something that you can review with Support, if you're interested. If you're comparing API with GUI, then you'll need to make sure that you're using the same timespan controls on the API as on the GUI, and it's possible that you'll need to map timezones if you want them to line up (API uses UTC, org-wide data in GUI typically uses UTC, network-specific data in GUI often uses the network's configured timezone).
... View more
Oct 24 2024
4:10 PM
3 Kudos
We've added documentation about the API lifecycle to our DevNet docs. You can read more about how we use terms like "deprecate" and "sunset" as well as find a timeline of deprecated operations and suggested alternatives. We hope this helps you identify the best possible operations to use for your use case and as always invite your feedback.
... View more
Labels:
- Labels:
-
Dashboard API
-
Updates from Meraki
Oct 24 2024
4:00 PM
For long-term data storage, you will be well served to store data client-side. You can know when/if to update the data by following the availabilities change history operation on some regular interval (e.g. once every 2 weeks).
... View more
Oct 24 2024
3:56 PM
You could alternatively calculate the total usage by multiplying the "average" usage with the "counts" value from this operation: https://developer.cisco.com/meraki/api-v1/get-network-clients-overview/ x = counts.total = total number of clients y = usages.average = average usage per client x * y = total client usage
... View more
Oct 24 2024
3:52 PM
Hi @Jason_42 at a glance, your script looks pretty solid (haven't tested). For classic Meraki devices you can simplify however by leveraging the relationship between network and device. For example, for classic Meraki devices, all devices of a given product type in a network have the same firmware version. So you only need firmware version once per network per product type, rather than once per device. You can also leverage the fact that the FW version doesn't change unless an admin or Meraki schedules an upgrade. With that in mind, another way to build the report would be to: 1. getOrganizationFirmwareUpgrades, which you're already polling, which gives you the completedAt timestamp (that's the one you need for each device's "date firmware applied" column), the toVersion.shortName attribute, and the productTypes attribute. 2. getOrganizationDevices instead of the deprecated getNetworkDevices, which gives you all the devices serials, models, and their product type and network IDs. From there, for each device, pair it with the relevant info from getOrganizationFirmwareUpgrades.
... View more
Oct 24 2024
3:37 PM
1 Kudo
Hi folks, Just FYI that we've identified two issues with this operation and are currently remediating them. However, if your application does not consume the "meta" object of the response body then you are affected by neither the bugs nor the fixes. The "meta" portion of the response body doesn't match the intended, correct documentation. If your application is expecting the meta.items object documented in the response body, then this fix will restore functionality to the operation. The item counts in the "meta" object of the response body do not take into account query parameters. For example, filtering to a specific serial should result in the items counts reflecting accordingly.
... View more
Labels:
- Labels:
-
Dashboard API
-
Updates from Meraki
Oct 18 2024
10:42 AM
Device models do not change, and can be inferred from the four-letter prefix of the serial number. So once per model you can build the mapping and infer the model client-side, if you like.
... View more
Oct 18 2024
10:41 AM
Hi @CBurkhead , if the device is offline for 2+ weeks, then it's dormant. If it's "offline" then it can only be offline for <2 weeks, in which case it's necessarily within the timespan of change history. It would have to be offline for more than a month for it to not have status change information in the change history operation, in which case, Meraki dashboard is probably not the source of truth you need to find out why it went offline, in any case, since it's almost certainly not a Meraki-side issue that explains why it went offline. Of course, if your application polls the change history once a month, then you'd have this information as well, for posterity.
... View more
My Accepted Solutions
Subject | Views | Posted |
---|---|---|
1249 | Jan 8 2025 12:51 PM | |
483 | Dec 5 2024 8:32 AM | |
661 | Oct 25 2024 10:16 AM | |
753 | Oct 25 2024 10:13 AM | |
2217 | Sep 12 2024 11:32 AM | |
1176 | Aug 27 2024 3:02 PM | |
1159 | Aug 22 2024 1:22 PM | |
1801 | Aug 2 2024 8:58 AM | |
4331 | Jan 12 2024 9:51 AM | |
3323 | Dec 11 2023 1:33 PM |
My Top Kudoed Posts
Subject | Kudos | Views |
---|---|---|
25 | 16049 | |
13 | 10462 | |
10 | 1621 | |
10 | 7247 | |
10 | 7358 |