<div dir="ltr">I'm keen to get an answer on this - is there a different place I should ask these questions?<div><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 18, 2015 at 10:46 AM, Andy Linton <span dir="ltr"><<a href="mailto:asjl@nsrc.org" target="_blank">asjl@nsrc.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I've been using the current peeringdb data to build maps of IXPs for NSRC. I'm doing this by downloading a copy of the mysql database and extracting data from that.<div><br></div><div>I'm in the process of reworking my code to be ready for the changes to 2.0 and I'm using the API to extra data. I can happily extract the list of IXPs and get the details I want from the 'ix' API data.</div><div><br></div><div>I also want to be able to calculate how many people participate at each IXP and currently I do that with an SQL query to the peerParticipantsPublics table e.g.</div><div><br></div><div><div>sqlQuery="""SELECT COUNT(DISTINCT(participant_id))</div><div>                    FROM peerParticipantsPublics</div><div>                    WHERE public_id = '{0}'</div><div>                    """.format(ixpID)</div></div><div><br></div><div>So I'm trying to do this using the API and I can see that I can look at the 'netix' API data and work out who peers at each unique "ix_lan" instance. For example, I can deduce that ix_lan == 114 means the WIX-NZ. My network has:</div><div><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">    {
      "network": 7662, 
      "ix_lan": 114, 
      "notes": "", 
      "speed": 4, 
      "asn": 132003, 
      "ipaddr4": "202.7.0.190", 
      "ipaddr6": "2001:7fa:3:ca07::be"
    }, </pre></div><div><br></div><div><br></div><div>But if I look for this ID in the 'ixlan' API data there's no entry for 114 and there appears to be no way to map this back to the 'ix' entry for WIX-NZ which has id == 132</div><div><br></div><div>I'm guessing that the 'ixlan' data is not populated in any meaningful way as all entries seem to be of this form:</div><div><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">   {
      "ix": 11017, 
      "name": "", 
      "descr": "", 
      "mtu": null, 
      "dot1q_support": false, 
      "rs_asn": 0
    }, </pre><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">Am I missing something here?</pre></div></div>
</blockquote></div><br></div></div></div>