Build APIs in Node.js and Swagger 2.0 with Apigee-127

Post on 01-Dec-2014

889 views 3 download

description

Why is Node.js a good choice for building APIs? What is Swagger 2.0 and how can you use it to create your API documentation?  Join Jeff West and Marsh Gardiner for a code and demo-filled session, in which we’ll design an API with Swagger 2.0 and then implement and deploy the API in Node.js on both Apigee and AWS.   We will 'show the code’ to: • Build production-grade APIs in Node.js with Apigee-127 • Create API documentation with Swagger 2.0 • Add enterprise capabilities like OAuth, quota, caching, and analytics using NPMs (Node Package Manager) • Deploy to any PaaS, including Apigee, Amazon AWS, and Heroku View video: http://youtu.be/Fw43z14Y1Xw View podcast: https://soundcloud.com/apigee/build-apis-in-nodejs-and-swagger-20-with-apigee-127

Transcript of Build APIs in Node.js and Swagger 2.0 with Apigee-127

Jeff West / Marsh Gardiner

16 October 2014

Build APIs in Node.js & Swagger 2.0 with Apigee-127

Today’s speakers

Jeff West@jeffreyawest

Marsh Gardiner@earth2marsh

© 2014 Apigee – For Public display

Apigee social channels

3

YouTubehttp://youtube.com/apigee

Slideshare

http://slideshare.com/apigee

© 2014 Apigee – For Public display

Agenda

• JavaScript & APIs• Apigee and Swagger 2.0• Apigee-127 Overview• Apigee-127 Demo• Q&A

© 2014 Apigee – For Public display 5

Who is this webcast for

• API Developers & Designers building new APIs

• Node.js Developers interested in APIs – from n00b to expert

• API Developers & Designers Interested in using/learning about Swagger 2.0

JavaScript & APIs

6

© 2014 Apigee – For Public display

JavaScript For APIs

• On Apigee:

– 67% of developers use JavaScript

– 30% of developers use Node.js

© 2014 Apigee – For Public display 8

Who Uses Node.js ?

Swagger & Apigee

9

© 2014 Apigee – For Public display

The Swagger Ecosystem

• 10,000+ production instances

• 2,000+ downloads/day of Java version

• 10,000+ developers using

• Thousands of devs contributing

• 500+ people in the Working Group

© 2014 Apigee – For Public display

Swagger 2.0

• JSON and YAML formats– Enable top-down and bottom-up workflows

• Code & documentation generation– Programming language agnostic

• Vendor extensions

• Cross-industry participation– Apigee, Getty Images, Intuit, Kaplan,

LivingSocial, McKesson, Microsoft, Morningstar, PayPal, and many more

12

Apigee-127 Overview

13

14

npm install -g apigee-127

http://github.com/apigee-127

© 2014 Apigee – For Public display

Dynamic Server Generation

No static files generated: Apigee-127 works directly from the Swagger spec!

Apigee Extensions

© 2014 Apigee – For Public display

We Handle These:• Swagger Tools (OSS, from Apigee):

• Message validation & routing

• Authorization (OAuth 2.0)

• Node.js Policies (OSS, from Apigee):

• Caching (Apigee Swagger 2.0 Extension)

• Quota (Apigee Swagger 2.0 Extension)

• Analytics (Apigee Swagger 2.0 Extension)

You Handle This:• Business logic

Enterprise-Class APIs, Really Fast

ControllerController.js

© 2014 Apigee – For Public display 17

Apigee-127 Development Environment

• Swagger Editor:

https://github.com/wordnik/swagger-editor

• Swagger Tools:

https://github.com/apigee-127/swagger-tools

• Volos.js:

https://github.com/apigee-127/volos/

• Apache Usergrid (downloaded

separately, using a127):

https://github.com/apache/incubator-usergrid/

Apigee-127 Demo

18

© 2014 Apigee – For Public display

Open Source, Extensible API Services

• Node.js solution for developing and deploying production-level APIs

• npm install volos-{service}-{provider}

• Services:– Caching– OAuth 2.0– Quota– Analytics– Vault

• Providers:– Memory– Redis– Apigee (on Apigee or Remote)

© 2014 Apigee – For Public display 20

Execution Environment Options

Anywhere / PaaS

127 On-Premises / PaaS

127 On Edge

127

Anywhere / PaaS

127 On-Premises / PaaS + Edge

127 127

© 2014 Apigee – For Public display 21

Execution Environment Options

• Apigee Edge provides a robust production-grade execution environment with the following services:– Highly Available Distributed Caching

– Highly Available Distributed Quota

– Highly Available Distributed OAuth

– Highly Available API BaaS

– Highly Available Configuration Management (Key-Value Store)

– Policy Execution Engine

• If you want to run a Node.js API somewhere other than Apigee Edge they will need to implement these services

© 2014 Apigee – For Public display 22

Upcoming FREE Training Sessions

The ABCs of APIs on Node.js and Swagger with Apigee’s Greg Rewis

Coming to a city near you and online on Apigee Academy!

© 2014 Apigee – For Public display 23

Apigee-127 Resources

• Wiki: https://github.com/apigee-127/a127-documentation/wiki

• Help: https://github.com/apigee-127/a127-documentation/wiki/help

• Sign up for announcements with the a127 Google Group: https://groups.google.com/forum/#!forum/a127

• Community Support: http://community.apigee.com

© 2014 Apigee – For Public display 24

Apigee Community Site

http://community.apigee.com

Questions?

Jeff West@jeffreyawest

Marsh Gardiner@earth2marsh

© 2014 Apigee – For Public display

Thank you