Sunlight API Development Kit


When working on a prototype, it is often necessary to get a REST web service up and running quickly. It’s easy enough to do, but the amount of code that is duplicated for each service can really increase the time to completion. To make the development of REST web services quicker and easier, we have developed the Sunlight API Development Kit or, as we affectionately call it, the Sunlight ADK. The ADK is a PHP framework that assists in the rapid development of REST web services. We’ve released the code under the LGPL license.

REST Framework

The core of the ADK is a framework for rapid web service development. You don’t have to worry about receiving requests, building XML or JSON, or any other tedious code. All you need to do is write code to populate a RESTResponse object. We take it from there and generate XML or JSON from the object depending on the type of response the user requested.

Administration Application

So how do you manage all of the services you’ve written? We were nice enough to include a web based management application that can be used to manage users and service methods. To create a new method just fill in the method name and the name of the PHP class that implements the service. As long as your service class was dropped in the right folder, you’ll be up and running with the method.

Key Management and Access Controls

The administration application can also be used to issue keys to users of the web service. You can place usage limits on each service method to limit the number of calls or amount of data that is transferred over a variable time period. You can also create methods that are accessible to a limited number of users. Of course if you prefer to have your service open to everyone then a simple configuration change will allow access to the services without a key.

Get it and contribute!

We hope you’ll find the Sunlight ADK useful. Get a copy now and let us know what you think. If you would like to contribute to the project, which we hope you do, please contact us at