Alex Band

Using API Keys To Access LIR Portal Data Locally

Alex Band

4 min read

0 You have liked this article 0 times.

To offer our members better local access to our tools and data sets, it is now possible to create API access keys in the LIR Portal. The keys can be used to grant applications and scripts access to your (private) LIR data. The Information will be fetched securely over HTTPS and can be used in your IP address management tools, for example.

Update 28 August 2012: This Labs article will no longer be kept up to date. Please refer to the developer documentation page about this topic and others at:

There have been many requests from the membership to provide a way to access private LIR data that is not locked into the LIR Portal web interface. This is why we have built the option to create API access keys. Using a unique URL that contains the key, you can fetch data from the LIR Portal over HTTPS and use it in your local applications.

When you're logged into the LIR Portal with administrator credentials, you will see a link in the Tools section called " API Access Keys ". If you click it, you will see the following page to manage your keys:

APR Access Keys Management Screen

Figure 1: Page on the LIR Portal that allows you to manage your keys

You can create as many different keys as you like. We suggest that you create a separate key for each application that you would like to provide with access. This way, if you believe the key has been compromised, you can revoke access to that application without affecting others. Please keep in mind that at all times, you are responsible for maintaining the keys.

To create an API key, simply enter a descriptive name and select the application you would like to grant access. At this time, it is possible to fetch data from the " My Resources " and " IP Analyser " tools. In this example, we'll create a key for the IP Analyser:

Create New API Access Key

Figure 2: How to create a key for the IP Analyser

After clicking "Create Key", the system will create a universally unique identifier (UUID). The UUID we use in this implementation is version 4, which uses a scheme relying only on random numbers:

Your Active API Keys

Figure 3: Universally unique identifier (UUID)

You can now click the "API call sample" link to get the unique URL for the data you desire:

LIR Portal API Call Sample Figure 4: API call sample: getting a unique URL

For the IP Analyser, we currently provide data through the API for assigned and free space in the allocations you hold, as well as your invalid assignments. The URLs are:

We will expand this functionality with other data sets, including IPv6 support.

The IP Analyser data stream is formatted in exactly the same plain text output as the asused application that many people use and are familiar with. This way, existing scripts should still work, or only have to be modified slightly. We also intend to offer JSON output format for the IP Analyser. This is already is available in the "My Resources" application.

We hope you appreciate this functionality and look forward to your feedback.

0 You have liked this article 0 times.

You may also like

View more

About the author

Alex Band Based in Amsterdam

Director of Product Development at NLnet Labs

Comments 0