Apigility – fast APIs

A very easy way to create API’s with documentation through a web interfaceapigility
https://apigility.org

Apigility is an API Builder, designed to simplify creating and maintaining useful, easy to consume, and well structured APIs. Regardless of your experience in API building, with Apigility you can build APIs that enable mobile apps, developer communities, and any other consumer controlled access to your applications.

They developed Apigility using Zend Framework 2, but this doesn’t mean you have to use this framework to develop your API. You can use Apigility in any PHP application, using all the libraries and frameworks that you want.

It comes with its own vagrant setup so no need to install on another virtual machine

Install

curl -sS https://apigility.org/install | php

In a browser you can now see the site working http://localhost:8888
Ctrl C to exit out

Setup the vagrant box

cd apigility
vagrant up

You can now access the site in your browser with http://localhost:8080

Hook up a database:

Lets install a database on the vagrant box so we can use that

vagrant ssh
sudo su
mysql
CREATE DATABASE example;
GRANT ALL on example.* to example_user;
SET password for example_user = PASSWORD(‘password’);
flush privileges;
use example;

CREATE TABLE `users` (
 `id` int NOT NULL AUTO_INCREMENT,
 `first_name` varchar(100) NOT NULL,
 `last_name` varchar(100) NOT NULL,
 `job_title` varchar(100) DEFAULT NULL,
 `salary` double DEFAULT NULL,
 `notes` text,
 PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `users` (`first_name`, `last_name`, `job_title`, `salary`) VALUES
 ('Robin', 'Jackman', 'Software Engineer', 5500),
 ('Taylor', 'Edward', 'Software Architect', 7200),
 ('Vivian', 'Dickens', 'Database Administrator', 6000),
 ('Harry', 'Clifford', 'Database Administrator', 6800),
 ('Eliza', 'Clifford', 'Software Engineer', 4750),
 ('Nancy', 'Newman', 'Software Engineer', 5100),
 ('Melinda', 'Clifford', 'Project Manager', 8500),
 ('Harley', 'Gilbert', 'Software Architect', 8000);

Back in the UI click on “Database” in the top navigation and “New DB Adapter”
Add the database credentials

dbadapter

Now you have everything you need to use the UI to create your own APIs
Create a few examples to see how it all works.

Once you are ready there is a Package option which will zip up selected APIs for deploying into production.

Leave a Reply

Your email address will not be published. Required fields are marked *