How to get a list of all Licenses of your Software Project

The new VersionEye API enables you to fetch a list of all licenses of your software project.  VersionEye now supports 7 different package managers. In my example, I use a Ruby Gemfile to show how easy it is to get the license list.

First of all, you need to sign up at VersionEye to get your API_KEY.  The key is free and the whole process takes less than 30 seconds.  As soon as you have your API_KEY, you can take full advantage of the VersionEye API.

The “/api/v1/projects.json” resource supports file uploads via the API.

Screen Shot 2013-02-16 at 3.39.11 PM

Send your Gemfile via POST to this resource and you will receive a JSON object with all the dependencies in the file.

Screen Shot 2013-02-16 at 3.39.35 PM

The JSON response contains a “project_key”.  This project key is unique for each user.  You can use it to fetch all licenses of the project.  All you need to do is send a GET request to “/api/v1/projects/PROJECT_KEY/licenses.json?api_key=API_KEY” and you will receive the license list as JSON.

Screen Shot 2013-02-16 at 3.40.14 PM

That’s it.  You only need two requests to get the license list.

Please let me know what you think of this feature.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s