{"type":"api","title":"Get Organization Switch Ports Statuses By Switch","meta":{"id":"/apps/pubhub/media/Meraki-Dashboard-API-v1-Documentation/4723762d29b3380de018ae8c0d8a59499a6523e0/401c6d5b-0873-3519-be2b-c203501ad95c","info":{"title":"Meraki Dashboard API","description":"A RESTful API to programmatically manage and monitor Cisco Meraki networks at scale.\n\n> Date: 03 July, 2024\n>\n> [Recent Updates](https://meraki.io/whats-new/)\n\n---\n\n[API Documentation](https://meraki.io/api)\n\n[Community Support](https://meraki.io/community)\n\n[Meraki Homepage](https://www.meraki.com)\n","contact":{"name":"Meraki Developer Community","url":"https://meraki.io/community"},"version":"1.48.0-beta.0"},"security":[{"meraki_api_key":[]},{"bearerAuth":[]}],"tags":[{"name":"organizations"},{"name":"networks"},{"name":"devices"},{"name":"insight"},{"name":"wireless"},{"name":"camera"},{"name":"appliance"},{"name":"switch"},{"name":"cellularGateway"},{"name":"sm"},{"name":"sensor"},{"name":"administered"},{"name":"accessControlLists"},{"name":"accessPolicies"},{"name":"aclHitCount"},{"name":"acls"},{"name":"actionBatches"},{"name":"activities"},{"name":"adaptivePolicy"},{"name":"addresses"},{"name":"admins"},{"name":"airMarshal"},{"name":"alertTypes"},{"name":"alerts"},{"name":"alternateManagementInterface"},{"name":"analytics"},{"name":"apiRequests"},{"name":"apnsCert"},{"name":"apple"},{"name":"appliances"},{"name":"applicationCategories"},{"name":"applicationUsage"},{"name":"applications"},{"name":"areas"},{"name":"arpInspection"},{"name":"arpTable"},{"name":"artifacts"},{"name":"assets"},{"name":"assignments"},{"name":"auth"},{"name":"authenticationToken"},{"name":"autoRf"},{"name":"availabilities"},{"name":"bandwidthUsageHistory"},{"name":"bgp"},{"name":"billing"},{"name":"blink"},{"name":"bluetooth"},{"name":"bluetoothClients"},{"name":"bonjourForwarding"},{"name":"boundaries"},{"name":"brandingPolicies"},{"name":"bulk"},{"name":"bulkEnrollment"},{"name":"bulkUpdate"},{"name":"byBoundary"},{"name":"byClient"},{"name":"byDevice"},{"name":"byEnergyUsage"},{"name":"byInterval"},{"name":"byMetric"},{"name":"byModel"},{"name":"byNetwork"},{"name":"byStatus"},{"name":"bySwitch"},{"name":"byType"},{"name":"byUsage"},{"name":"byUtilization"},{"name":"bypassActivationLockAttempts"},{"name":"cableTest"},{"name":"callbacks"},{"name":"categories"},{"name":"cellular"},{"name":"cellularFirewallRules"},{"name":"cellularUsageHistory"},{"name":"certificates"},{"name":"certs"},{"name":"changeHistory"},{"name":"channelUtilization"},{"name":"channelUtilizationHistory"},{"name":"channels"},{"name":"claim"},{"name":"claimKey"},{"name":"clientCountHistory"},{"name":"clients"},{"name":"cloud"},{"name":"cloudEnrollment"},{"name":"cloudMonitoring"},{"name":"commands"},{"name":"compliance"},{"name":"configTemplates"},{"name":"configurationChanges"},{"name":"configure"},{"name":"configuredDevices"},{"name":"connectionStats"},{"name":"connections"},{"name":"connectivity"},{"name":"connectivityEvents"},{"name":"connectivityMonitoringDestinations"},{"name":"contentFiltering"},{"name":"contents"},{"name":"coterm"},{"name":"current"},{"name":"customAnalytics"},{"name":"customPerformanceClasses"},{"name":"cyclePort"},{"name":"dataRateHistory"},{"name":"delegated"},{"name":"deltas"},{"name":"desktopLogs"},{"name":"details"},{"name":"detections"},{"name":"deviceCertificateAuthorities"},{"name":"deviceCommandLogs"},{"name":"deviceProfiles"},{"name":"deviceTypeGroupPolicies"},{"name":"dhcp"},{"name":"dhcpServerPolicy"},{"name":"disenrollments"},{"name":"doorLocks"},{"name":"download"},{"name":"dscpTaggingOptions"},{"name":"dscpToCosMappings"},{"name":"eapOverride"},{"name":"earlyAccess"},{"name":"electronicShelfLabel"},{"name":"enrollments"},{"name":"entitlements"},{"name":"ethernet"},{"name":"eventTypes"},{"name":"events"},{"name":"exportEvents"},{"name":"extensions"},{"name":"failedConnections"},{"name":"failover"},{"name":"features"},{"name":"fields"},{"name":"firewall"},{"name":"firewalledServices"},{"name":"firmware"},{"name":"firmwareUpgrades"},{"name":"floorPlans"},{"name":"groupPolicies"},{"name":"groups"},{"name":"health"},{"name":"healthByTime"},{"name":"healthScores"},{"name":"historical"},{"name":"history"},{"name":"hotspot20"},{"name":"httpServers"},{"name":"identities"},{"name":"identityPsks"},{"name":"idps"},{"name":"import"},{"name":"imports"},{"name":"inboundCellularFirewallRules"},{"name":"inboundFirewallRules"},{"name":"interfaces"},{"name":"internetPolicies"},{"name":"intrusion"},{"name":"inventory"},{"name":"ipv6"},{"name":"l2"},{"name":"l3"},{"name":"l3FirewallRules"},{"name":"l7FirewallRules"},{"name":"lan"},{"name":"latencyHistory"},{"name":"latencyStats"},{"name":"latest"},{"name":"leds"},{"name":"licenses"},{"name":"licensing"},{"name":"lines"},{"name":"linkAggregations"},{"name":"linkLayer"},{"name":"live"},{"name":"liveTools"},{"name":"lldpCdp"},{"name":"locationScanning"},{"name":"loginSecurity"},{"name":"logs"},{"name":"lossAndLatencyHistory"},{"name":"macTable"},{"name":"malware"},{"name":"managementInterface"},{"name":"manufacturers"},{"name":"me"},{"name":"merakiAuthUsers"},{"name":"meshStatuses"},{"name":"models"},{"name":"monitor"},{"name":"monitoredMediaServers"},{"name":"mqttBrokers"},{"name":"mtu"},{"name":"multicast"},{"name":"netflow"},{"name":"networkAdapters"},{"name":"networkHealth"},{"name":"objectDetectionModels"},{"name":"onboarding"},{"name":"onboardingHistory"},{"name":"oneToManyNatRules"},{"name":"oneToOneNatRules"},{"name":"openapiSpec"},{"name":"optIns"},{"name":"order"},{"name":"ospf"},{"name":"overview"},{"name":"packetLoss"},{"name":"packets"},{"name":"payloadTemplates"},{"name":"performance"},{"name":"performanceHistory"},{"name":"permissions"},{"name":"pii"},{"name":"piiKeys"},{"name":"ping"},{"name":"pingDevice"},{"name":"planning"},{"name":"policies"},{"name":"policy"},{"name":"policyObjects"},{"name":"portForwardingRules"},{"name":"portSchedules"},{"name":"ports"},{"name":"power"},{"name":"powerModules"},{"name":"prefixes"},{"name":"prepare"},{"name":"priorities"},{"name":"privateApplicationGroups"},{"name":"privateApplications"},{"name":"profiles"},{"name":"provisioning"},{"name":"publicApplications"},{"name":"qosRules"},{"name":"qualityAndRetention"},{"name":"qualityRetentionProfiles"},{"name":"radSec"},{"name":"radio"},{"name":"radius"},{"name":"readings"},{"name":"recent"},{"name":"redundancy"},{"name":"regions"},{"name":"relationships"},{"name":"remoteAccessLog"},{"name":"remoteAccessLogsExports"},{"name":"rendezvousPoints"},{"name":"requests"},{"name":"requirements"},{"name":"responseCodes"},{"name":"restrictions"},{"name":"revocationList"},{"name":"rfProfiles"},{"name":"roles"},{"name":"rollbacks"},{"name":"routing"},{"name":"routingTable"},{"name":"rules"},{"name":"salesRepresentatives"},{"name":"saml"},{"name":"samlRoles"},{"name":"schedules"},{"name":"sdwan"},{"name":"search"},{"name":"secureConnect"},{"name":"security"},{"name":"securityCenters"},{"name":"seen"},{"name":"sense"},{"name":"sentry"},{"name":"servers"},{"name":"settings"},{"name":"signalQualityHistory"},{"name":"sims"},{"name":"singleLan"},{"name":"siteToSiteVpn"},{"name":"sites"},{"name":"smDevicesForKey"},{"name":"smOwnersForKey"},{"name":"snmp"},{"name":"softwares"},{"name":"speedTest"},{"name":"speedTestResults"},{"name":"splash"},{"name":"splashAuthorizationStatus"},{"name":"splashLoginAttempts"},{"name":"ssids"},{"name":"stacks"},{"name":"staged"},{"name":"stages"},{"name":"staticRoutes"},{"name":"statics"},{"name":"stats"},{"name":"status"},{"name":"statuses"},{"name":"stormControl"},{"name":"stp"},{"name":"subnetPool"},{"name":"subnets"},{"name":"subscription"},{"name":"subscriptions"},{"name":"summary"},{"name":"support"},{"name":"supported"},{"name":"swaps"},{"name":"switches"},{"name":"syncJobs"},{"name":"syslogServers"},{"name":"targetGroups"},{"name":"tests"},{"name":"themes"},{"name":"thirdPartyVPNPeers"},{"name":"thousandEyes"},{"name":"throughputTest"},{"name":"token"},{"name":"tokens"},{"name":"top"},{"name":"topology"},{"name":"traceRoute"},{"name":"traffic"},{"name":"trafficAnalysis"},{"name":"trafficHistory"},{"name":"trafficShaping"},{"name":"trustedAccessConfigs"},{"name":"trustedServers"},{"name":"upgrades"},{"name":"uplink"},{"name":"uplinkBandwidth"},{"name":"uplinkSelection"},{"name":"uplinks"},{"name":"uplinksLossAndLatency"},{"name":"usage"},{"name":"usageHistories"},{"name":"usageHistory"},{"name":"userAccessDevices"},{"name":"users"},{"name":"v4"},{"name":"video"},{"name":"videoLink"},{"name":"vlanAssignments"},{"name":"vlanProfiles"},{"name":"vlans"},{"name":"vmx"},{"name":"vpn"},{"name":"vpnExclusions"},{"name":"vpnFirewallRules"},{"name":"vppAccounts"},{"name":"wakeOnLan"},{"name":"warmSpare"},{"name":"warnings"},{"name":"webApps"},{"name":"webhookTests"},{"name":"webhooks"},{"name":"wirelessController"},{"name":"wirelessControllers"},{"name":"wirelessProfiles"},{"name":"wlanLists"},{"name":"zigbee"},{"name":"zones"}],"x-parser-conf":{"overview":{"markdownPath":"docs/overview-early-access.md"},"theme":"meraki","serverConfig":true,"httpBearer":{"bearerToken":"75dd5334bef4d2bc96f26138c163c0a3fa0b5ca6"},"labelConfig":{"endpoint":{"field":"operationId","format":"startCase"}},"groupBy":{"$remoteModule":"config/group_platform.js"},"filterBy":{"$remoteModule":"config/filter_only_beta.js"},"sortBy":{"$remoteModule":"config/sort_by.js"},"exampleAsDefault":true,"expand":0,"variables":{"organizationId":"1215707","networkId":"N_784752235069315754","serial":"QBSB-VQ3J-XZ54"}},"openapi":"3.0.1","servers":[{"url":"https://api.meraki.com/{basePath}","variables":{"basePath":{"default":"api/v1"}}}],"securitySchemes":{"meraki_api_key":{"type":"apiKey","name":"X-Cisco-Meraki-API-Key","in":"header"},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key"}}},"spec":{"description":"List the switchports in an organization","operationId":"getOrganizationSwitchPortsStatusesBySwitch","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":"timespan","in":"query","description":"The timespan for which the information will be fetched. If specifying timespan, do not specify parameter t0. The value must be in seconds and be less than or equal to 31 days. The default is 1 day.","schema":{"type":"number","format":"float","maximum":2678400}},{"name":"perPage","in":"query","description":"The number of entries per page returned. Acceptable range is 3 - 20. Default is 20.","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":"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."},"enabled":{"type":"boolean","description":"Whether the port is configured to be enabled."},"status":{"type":"string","enum":["Connected","Disabled","Disconnected"],"description":"The current connection status of the port."},"spanningTree":{"type":"object","properties":{"statuses":{"type":"array","items":{"type":"string"},"description":"The current Spanning Tree Protocol statuses of the port."}},"description":"The Spanning Tree Protocol (STP) information of the connected device."},"isUplink":{"type":"boolean","description":"Whether the port is the switch's uplink."},"errors":{"type":"array","items":{"type":"string"},"description":"All errors present on the port."},"warnings":{"type":"array","items":{"type":"string"},"description":"All warnings present on the port."},"speed":{"type":"string","enum":["","1 Gbps","10 Gbps","10 Mbps","100 Gbps","100 Mbps","2.5 Gbps","20 Gbps","40 Gbps","5 Gbps"],"description":"The current data transfer rate which the port is operating at."},"duplex":{"type":"string","enum":["","full","half"],"description":"The current duplex of a connected port."},"usageInKb":{"type":"object","properties":{"total":{"type":"integer","description":"The total amount of data sent and received (in kilobytes)."},"sent":{"type":"integer","description":"The amount of data sent (in kilobytes)."},"recv":{"type":"integer","description":"The amount of data received (in kilobytes)."}},"description":"A breakdown of how many kilobytes have passed through this port during the timespan."},"cdp":{"type":"object","properties":{"systemName":{"type":"string","description":"The system name."},"platform":{"type":"string","description":"Identifies the hardware platform of the device."},"deviceId":{"type":"string","description":"Identifies the device name."},"portId":{"type":"string","description":"Identifies the port from which the CDP packet was sent."},"nativeVlan":{"type":"integer","description":"Indicates, per interface, the assumed VLAN for untagged packets on the interface."},"address":{"type":"string","description":"Contains network addresses of both receiving and sending devices."},"managementAddress":{"type":"string","description":"The device's management IP."},"version":{"type":"string","description":"Contains the device software release information."},"vtpManagementDomain":{"type":"string","description":"Advertises the configured VLAN Trunking Protocl (VTP)-management-domain name of the system."},"capabilities":{"type":"string","description":"Identifies the device type, which indicates the functional capabilities of the device."}},"description":"The Cisco Discovery Protocol (CDP) information of the connected device."},"lldp":{"type":"object","properties":{"systemName":{"type":"string","description":"The device's system name."},"systemDescription":{"type":"string","description":"The device's system description."},"chassisId":{"type":"string","description":"The device's chassis ID."},"portId":{"type":"string","description":"Identifies the port from which the LLDP packet was sent"},"managementVlan":{"type":"integer","description":"The device's management VLAN."},"portVlan":{"type":"integer","description":"The port's VLAN."},"managementAddress":{"type":"string","description":"The device's management IP."},"portDescription":{"type":"string","description":"Description of the port from which the LLDP packet was sent."},"systemCapabilities":{"type":"string","description":"Identifies the device type, which indicates the functional capabilities of the device."}},"description":"The Link Layer Discovery Protocol (LLDP) information of the connected device."},"clientCount":{"type":"integer","description":"The number of clients connected through this port."},"powerUsageInWh":{"type":"number","format":"float","description":"How much power (in watt-hours) has been delivered by this port during the timespan."},"trafficInKbps":{"type":"object","properties":{"total":{"type":"number","format":"float","description":"The average speed of the data sent and received (in kilobits-per-second)."},"sent":{"type":"number","format":"float","description":"The average speed of the data sent (in kilobits-per-second)."},"recv":{"type":"number","format":"float","description":"The average speed of the data received (in kilobits-per-second)."}},"description":"A breakdown of the average speed of data that has passed through this port during the timespan."},"securePort":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether Secure Port is turned on for this port."},"active":{"type":"boolean","description":"Whether Secure Port is currently active for this port."},"authenticationStatus":{"type":"string","enum":["Authentication failure","Authentication in progress","Authentication successful","Authentication timed out","Disabled","Enabled"],"description":"The current Secure Port status."},"configOverrides":{"type":"object","properties":{"type":{"type":"string","enum":["access","stack","trunk"],"description":"The type of the ('trunk', 'access' or 'stack')."},"vlan":{"type":"integer","description":"The VLAN of the . For a trunk port, this is the native VLAN. A null value will clear the value set for trunk ports."},"voiceVlan":{"type":"integer","description":"The voice VLAN of the . Only applicable to access ports."},"allowedVlans":{"type":"string","description":"The VLANs allowed on the . Only applicable to trunk ports."}},"description":"The configuration overrides applied to this port when Secure Port is active."}},"description":"The Secure Port status of the port."},"poe":{"type":"object","properties":{"isAllocated":{"type":"boolean","description":"Whether the port is drawing power"}},"description":"PoE status of the port."}}},"description":"The statuses of the ports on the switch."}}}},"example":[{"name":"Example Switch","serial":"Q555-5555-5555","mac":"01:23:45:67","network":{"name":"Example Network","id":"N_12345"},"model":"MS120-8","ports":[{"portId":"1","enabled":true,"status":"Connected","spanningTree":{"statuses":["Learning"]},"isUplink":false,"errors":["PoE overload","Very high proportion of CRC errors"],"warnings":["SecurePort authentication in progress","PoE port was denied power","High proportion of CRC errors"],"speed":"10 Gbps","duplex":"full","usageInKb":{"total":40867,"sent":23008,"recv":17859},"cdp":{"systemName":"","platform":"MS350-24X","deviceId":"0c8ddbddee:ff","portId":"Port 20","nativeVlan":1,"address":"10.0,0.1","managementAddress":"10.0.0.100","version":"1","vtpManagementDomain":"","capabilities":"Switch"},"lldp":{"systemName":"MS350-24X - Test","systemDescription":"MS350-24X Cloud Managed PoE Switch","chassisId":"0c:8d:db:dd:ee:ff","portId":"20","managementVlan":1,"portVlan":1,"managementAddress":"10.0.0.100","portDescription":"Port 20","systemCapabilities":"switch"},"clientCount":10,"powerUsageInWh":55.9,"trafficInKbps":{"total":2.2,"sent":1.2,"recv":1},"securePort":{"enabled":true,"active":true,"authenticationStatus":"Authentication in progress","configOverrides":{"type":"trunk","vlan":12,"voiceVlan":34,"allowedVlans":"all"}},"poe":{"isAllocated":false}}]}]}},"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 switchports in an organization","tags":["switch","monitor","ports","statuses","bySwitch"],"x-release-stage":"beta","__originalOperationId":"getOrganizationSwitchPortsStatusesBySwitch","security":[{"meraki_api_key":[]},{"bearerAuth":[]}],"method":"get","path":"/organizations/{organizationId}/switch/ports/statuses/bySwitch"}}