Quick start

Rod Simpson edited this page May 19, 2015 · 19 revisions
Clone this wiki locally

The purpose of this Quick Start is to show you how easily and quickly you can get a simple API up and running using Apigee-127.

Get an API up and running

First, we create a new Apigee-127 project and test the default "hello world" API.

  1. Follow the steps here: Installation
  2. Create a root folder for your Apigee-127 projects and cd to that folder.
  3. Execute: a127 project create hello-world. This will clone a project skeleton from GitHub into a directory from the working directory named hello-world. It will then run npm install to download dependencies for the project. Windows Users please see the note below regarding npm
  4. Change to the hello-world directory by typing $ cd hello-world
  5. Type $ a127 project start to start your API. You now have an API running with Apigee-127!
  6. If you see a message like "Do you want the application “node” to accept incoming network connections?", allow it.
  7. In another terminal, run: $ curl http://localhost:10010/hello?name=Me. You should see the response Hello, Me.

That's it - You have now created, started and tested your first API project with Apigee-127!

Open the Swagger editor

Before moving on to another topic, start the Swagger editor. It loads in the Swagger specification file for the quick start API and lets you design and test your API interactively.

From the root folder of the Apigee-127 project, execute:

a127 project edit

alt text The Swagger editor for Apigee-127

You'll start working with the editor in the next Quick Start topic: Add a Quota.

Next steps

Next, we'll show how to build out the API with important features like caching, quota management, OAuth 2.0, and more.

Windows Users

For some versions of npm on Windows will have problems on the npm install step of a127 project create. They are related to a debug module on npm not being managed properly. The following steps should resolve this issue:

  1. In the project directory, execute the following commands:
  2. npm install yamljs
  3. npm install debug
  4. npm install swagger-tools

Now, when you run a127 project start your project should start successfully.