41
Combining OpenWhisk (serverless), Open API (swagger) and IBM API Connect to build powerful APIs Joe Sepi Lead Developer Evangelist StrongLoop/IBM @joe_sepi

Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Embed Size (px)

Citation preview

Page 1: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Combining OpenWhisk (serverless), Open API (swagger) and

IBM API Connect to build powerful APIs

Joe Sepi Lead Developer Evangelist ⚡ StrongLoop/IBM

@joe_sepi

Page 2: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Combining OpenWhisk (serverless), Open API (swagger),

IBM API Connect, Watson cognitive services and Slack integrations to

build powerful APIs

Joe Sepi Lead Developer Evangelist ⚡ StrongLoop/IBM

@joe_sepi

Page 3: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Combining OpenWhisk (serverless), Open API (swagger),

IBM API Connect, Watson cognitive services, Slack integrations, Cloudant NoSQL database and Bluemix to build

powerful APIs

Joe Sepi Lead Developer Evangelist ⚡ StrongLoop/IBM

@joe_sepi

Page 4: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Combining OpenWhisk (serverless), Open API (swagger),

IBM API Connect, Watson cognitive services, Slack integrations, Cloudant NoSQL database and Bluemix to easily

assemble useful and convenient integrations backed by powerful APIs

Joe Sepi Lead Developer Evangelist ⚡ StrongLoop/IBM

@joe_sepi

Page 5: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Agenda• What are these technologies?

• What was my inspiration?

• How easy is this stuff?

• What’s behind the scenes?

• What am I working on?

• What are you working on?

Page 6: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

That’s me.playing guitar

@joe_sepi

Page 7: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 8: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 9: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 10: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 11: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 12: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

My Inspiration

Page 13: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 14: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 15: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 16: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 17: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Steps1.Setup Cloudant for keeping track of Slack app installations

2.Deploy through the command line OpenWhisk actions that drive the Slack integrations

3.Create Slack App and configure interactions

4.Create an API Connect instance to import Open API file which exposes the OpenWhisk actions to Slack

5.Finalize Slack configuration and add to Slack org

Page 18: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Create a Cloudant Instance

Page 19: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Create DB and Design Document

Page 20: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Service CredentialsYou’ll need these in next step…

Page 21: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

The results from deploying our OpenWhisk Actions

Things look ok

Page 22: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 23: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 24: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 25: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Slack App CredentialsWe’ll need these later…

Page 26: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Create an API Connect Instance

Page 27: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Import Open APIThere are our three endpoints for Slack

Page 28: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Open Whisk and Slack Credentials

Note the save icon and the three dots for menu

Page 29: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

API Connect Base URLSave me for the next step

Page 30: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

https://api.us.apiconnect.ibmcloud.com/yourorg-yourspace/sb /api/slack/oauth

Page 31: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Verify that Request URL ✅Same Base URL but with /api/slack/event

Page 32: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Slack Slash Commands

Page 33: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Adding to SlackThis is where we are actually adding our

bot to a Team

Page 34: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Hey Fred, you said…It works!

Page 35: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 36: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Open API

Page 37: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Deploy Script

Page 38: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

OpenWhiskJS FTW!

Page 39: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 40: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs
Page 41: Combining OpenWhisk (serverless), Open API (swagger) and API Connect to build powerful APIs

Combining Open Whisk (serverless), OpenAPI (swagger) and

API Connect to build powerful APIs

Joe Sepi Lead Developer Evangelist ⚡ StrongLoop/IBM

@joe_sepi