<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic API returning 404 in Network Platform API</title>
    <link>https://community.cisco.com/t5/network-platform-api/api-returning-404/m-p/5413455#M2365</link>
    <description>&lt;P&gt;I'm new to using the API and Python. I'm trying to learn how to just print the output of devices in a network. I keep getting a 404 and I feel like I need to pass an orgId. I've tried doing that in the headers but it didn't work. The reason why I thought I had to pass an orgId is because I have access to other organizations from my dashboard.&lt;/P&gt;&lt;PRE&gt;import requests

api_key = 'xxxx'
org_id = 'xxxx'
network_id = 'xxxx'
base_url = 'https://dashboard.meraki.com/api/v0'
headers = "X-Cisco-Meraki-API-key: api_key"


def devicelist(api_key, network_id):
	geturl = "{0}/networks/{1}/devices".format(str(base_url), str(network_id))
	headers = {
		'X-Cixco-Meraki-API-key': format(str(api_key)),
		'Content-Type': 'application/json'
	}
	
	devices = requests.get(geturl, headers=headers)
	print(devices)

devicelist(api_key, network_id)&lt;/PRE&gt;</description>
    <pubDate>Mon, 13 Aug 2018 17:24:40 GMT</pubDate>
    <dc:creator>rowell@packet6.com</dc:creator>
    <dc:date>2018-08-13T17:24:40Z</dc:date>
    <item>
      <title>API returning 404</title>
      <link>https://community.cisco.com/t5/network-platform-api/api-returning-404/m-p/5413455#M2365</link>
      <description>&lt;P&gt;I'm new to using the API and Python. I'm trying to learn how to just print the output of devices in a network. I keep getting a 404 and I feel like I need to pass an orgId. I've tried doing that in the headers but it didn't work. The reason why I thought I had to pass an orgId is because I have access to other organizations from my dashboard.&lt;/P&gt;&lt;PRE&gt;import requests

api_key = 'xxxx'
org_id = 'xxxx'
network_id = 'xxxx'
base_url = 'https://dashboard.meraki.com/api/v0'
headers = "X-Cisco-Meraki-API-key: api_key"


def devicelist(api_key, network_id):
	geturl = "{0}/networks/{1}/devices".format(str(base_url), str(network_id))
	headers = {
		'X-Cixco-Meraki-API-key': format(str(api_key)),
		'Content-Type': 'application/json'
	}
	
	devices = requests.get(geturl, headers=headers)
	print(devices)

devicelist(api_key, network_id)&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Aug 2018 17:24:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/api-returning-404/m-p/5413455#M2365</guid>
      <dc:creator>rowell@packet6.com</dc:creator>
      <dc:date>2018-08-13T17:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: API returning 404</title>
      <link>https://community.cisco.com/t5/network-platform-api/api-returning-404/m-p/5413456#M2366</link>
      <description>Hah. Figured out my own problem. Type in X-Cisco-Meraki-API-key.&lt;BR /&gt;&lt;BR /&gt;Doh!</description>
      <pubDate>Mon, 13 Aug 2018 17:32:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/api-returning-404/m-p/5413456#M2366</guid>
      <dc:creator>rowell@packet6.com</dc:creator>
      <dc:date>2018-08-13T17:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: API returning 404</title>
      <link>https://community.cisco.com/t5/network-platform-api/api-returning-404/m-p/5413457#M2367</link>
      <description>&lt;P&gt;As you typed that I was thinking the same thing.  api_key should have been xxxxx indicating your API key &lt;SPAN class="lia-unicode-emoji" title=":winking_face:"&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 18:58:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/api-returning-404/m-p/5413457#M2367</guid>
      <dc:creator>simple818</dc:creator>
      <dc:date>2018-08-13T18:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: API returning 404</title>
      <link>https://community.cisco.com/t5/network-platform-api/api-returning-404/m-p/5413458#M2368</link>
      <description>&lt;P&gt;My typo was in the header. Instead of X-Cisco-Meraki-API-key I had Cisco typed out as Cixco.&lt;/P&gt;&lt;P&gt;Took me long enough to see it!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 19:03:16 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-platform-api/api-returning-404/m-p/5413458#M2368</guid>
      <dc:creator>rowell@packet6.com</dc:creator>
      <dc:date>2018-08-13T19:03:16Z</dc:date>
    </item>
  </channel>
</rss>

