SlideShare a Scribd company logo

Be The API - VMware UserCon 2016

A brief introduction to the concept of application program interfaces, how they differ from the CLI and how that theory applies to our day jobs. Communication is hard. In an exploration of what software engineering can teach us about our daily lives, let's explore the interfaces we have between each other. We might just find the metaphor that makes communication a little easier. Takeaway: determine what your API is – what inputs you take from others and what they can expect in return.

1 of 60
Download to read offline
Be The API
an exploration of careers, supported by code and memes
by @mjbrender
Be The API - VMware UserCon 2016
Business Logic
The Happy Place
Be The API - VMware UserCon 2016
The Happy Place
Be The API - VMware UserCon 2016
My Less Happy Place
Be The API - VMware UserCon 2016
No, Not Again
Be The API - VMware UserCon 2016
“Hey, Sisyphus, when you’ve got a minute I’d like
to discuss this progress report with you.”
> cd $HOME
>
>
> bash ./admin_script
fixing foo
Be The API - VMware UserCon 2016
Be The API - VMware UserCon 2016
> vim ./admin_script
cmd | xarg –n 1 sed –i
“s/server/foo/g” | grep -i
up >err.log 2>&1
“An Application Programming Interface
is a set of routines, protocols, and tools
for building software applications.”
History of APIs
2000
Be The API - VMware UserCon 2016
Structured
input and output
vSphere API
source
Many Other APIs
JSON
JSON
is
the API the new CLI
?
Be The API - VMware UserCon 2016
> cmd
| grep | sed | awk
the API the new CLI
(if and only if you use the CLI like this example)
> cmd
| grep | sed | awk
JSON
JSON
JSON
JSON
API is a machine interface
CLI is a user interface
GUI is a user interface
An API says:
Request this.
Get that.
{you}
Be The API - VMware UserCon 2016
{myapi}
serverAPI
myctl
{myapi} service
GET job/
Return a description of my job.
There are no options available for this endpoint.
> myctl job list
Matt is a Developer Advocate.
Developer Advocates are technical
community contributors key to
accelerating project adoption through
internal coordination & targeted
external contribution.
GET contact/
Returns a list of available forms of contact.
type
required
Return whether the contact is personal or professional
Values: personal, professional, all
include_preference
optional
Boolean preference as defined by the service
Example Value: true
include_reply_time
optional
Return average response time for request
Example Value: false
Response formats JSON
Requires authentication? No
Rate limited? Yes
curl
http://localhost/v1/contact
?type=all
{ ”contact":
{
”email": [
{
“type": “professional",
“to": “REDACTED",
},
{
“type": “personal",
“to": “REDACTED",
},
],
”tweet": [
{
"type": “personal”,
“to": “@mjbrender",
}
],
”call": [
{
"type": “personal”,
“to": “+REDACTED",
}
] } }
> myctl contact list --all
TYPE PREFERENCE REPLY TIME
email 2 3d
text 3 1m
tweet 1 30s
call 4 5d
PUT contact/[:to]
Request that gets in contact with the API owner. Returns string response to the request.
from
required
Return location appropriate for the endpoint
Example Value: @mjbrender, mjbrender@gmail.com
message
required
Reason for the contact
Example Value: “Thought you’d like this post”
urgency
optional
Definition of how quickly a reply is required.
Values: Low, Medium, High
include_lead_time
optional
Boolean to include approximate time to respond.
Example Value: true
curl
-H “Content-Type:
application/json”
-X POST –d
‘{
“from”: “@vBrianGraf”,
“description”: “Hey!”
}
http://localhost/v1/contact/@
mjbrender
{ ”confirmation":
“Thanks for getting in
touch. I’ll response back
as soon as time allows.”
}
{ ”confirmation":
“Thanks for getting in
touch. Since this
involves something
urgent, I’ll get back to
you as soon as I can.”
}
curl
-H “Content-Type:
application/json”
-X POST –d
‘{
“from”: “josie@google.com”,
“description”: “House on Fire”,
“urgency”: “high”
}
http://localhost/v1/contact/
mjbrender@gmail.com
GET job/skill
Returns a list of advertised job skills.
type
optional
Return the category of work this falls under
Values: ENG, MKT, SALES, FINANCE, MGMT
include_preference
optional
Boolean preference as defined by the service provider.
Defined on a scale from 1-7 with 7 as most preferred
Example Value: 3
include_level
optional
Boolean level of expertise of the service provider.
Expertise is defined on a scale from 1-7 with 7 as best
Example Value: 7
Response formats JSON
Requires authentication? No
Rate limited? No
> myctl skill list --type=ENG
-p
SKILL TYPE PREFERENCE
Build Automation ENG 5
Product Mgmt ENG 5
Dev Mgmt ENG 4
Traditional IT ENG 3
Cloud Native ENG 7
Ruby Developer ENG 3
Go Developer ENG 3
> myctl skill list --type=ENG
-p
SKILL TYPE PREFERENCE
Build Automation ENG 5
Product Mgmt ENG 5
Dev Mgmt ENG 4
Traditional IT ENG 3
Cloud Native ENG 7
Ruby Developer ENG 3
Go Developer ENG 3
> myctl skill list --type=ENG
-l
SKILL TYPE SKILL LEVEL
Build Automation ENG 2
Product Mgmt ENG 5
Dev Mgmt ENG 4
Traditional IT ENG 5
Cloud Native ENG 3
Ruby Developer ENG 2
Go Developer ENG 2
> myctl skill list --type=ENG
-l
SKILL TYPE SKILL LEVEL
Build Automation ENG 2
Product Mgmt ENG 5
Dev Mgmt ENG 4
Traditional IT ENG 5
Cloud Native ENG 3
Ruby Developer ENG 2
Go Developer ENG 2
> myctl skill list --type=MKT
-l
SKILL TYPE SKILL LEVEL
PowerPointing MKT 6
Podcasting MKT 6
Blogging MKT 4
Public Speaking MKT 4
Product Messaging MKT 5
Logo Design MKT 5
Social Media MKT 5
GET job/request/
Review active work requests with expected completion dates.
type
optional
Return the category of work this falls under
Values: ENG, MKT, SALES, FINANCE, MGMT
include_preference
optional
Boolean preference as defined by the service provider
Example Value: true
include_lead_time
optional
Boolean to include default lead time per request
Example Value: true
Response formats JSON
Requires authentication? No
Rate limited? No
> myctl work list -t -lt
REQUEST TYPE LEAD TIME
Create PPT MKT 7d
Define OSS Release ENG 5d
Test Automation ENG 3d
Write Blog Post MKT 2d
Re to Sales MGMT .5d
Schedule Meeting MGMT .25d
Create other PPT MKT 7d
PUT job/request/
Request that gets in contact with the API owner. Returns expected response time.
title
required
Boolean preference as defined by the service
Example Value: true
description
required
Return average response time for request
Example Value: false
urgency
required
Return average response time for request
Example Value: false
authorized
optional
Return average response time for request
Example Value: true
Valid Responses
• “Here you go.”
• “I can’t do that.”
• “I’m on it. I’m estimating a delivery time of” + GET
job/requests/[:type]?lead_time
• “I can’t help you with this right now, I’m at capacity.
Please contact my manager.”
• “I can’t help you right now due to other urgent
priorities. Please contact my manager.”
• “I will get on it right away. Here is the other work that
will be delayed by at least 2 business days by this
request:” + GET job/requests/
GET
contact/
job/
job/skill/
job/request/
PUT
contact/
job/request/
{myapi}
What’s undocumented?
Endpoint
GET hobby/
Options
tone := Reflect.type(tone)
An API says:
Request this.
Get that.
API is a machine interface
CLI is a user interface
GUI is a user interface
defining our API can
help us be better humans
> myctl contact list --best
TO PREFERENCE
@mjbrender 1
slack.snap-telemetry.io 2
Be The API - VMware UserCon 2016

Recommended

Winning the Application Server Arms Race
Winning the Application Server Arms RaceWinning the Application Server Arms Race
Winning the Application Server Arms RaceESUG
 
How serverless changes the cost paradigm
How serverless changes the cost paradigmHow serverless changes the cost paradigm
How serverless changes the cost paradigmYan Cui
 
What can you do with lambda in 2020
What can you do with lambda in 2020What can you do with lambda in 2020
What can you do with lambda in 2020Yan Cui
 
Domain Driven Rails
Domain Driven RailsDomain Driven Rails
Domain Driven RailsYan Pritzker
 
Integrate Your Amazon Lex Chatbot with Any Messaging Service - AWS Online Tec...
Integrate Your Amazon Lex Chatbot with Any Messaging Service - AWS Online Tec...Integrate Your Amazon Lex Chatbot with Any Messaging Service - AWS Online Tec...
Integrate Your Amazon Lex Chatbot with Any Messaging Service - AWS Online Tec...Amazon Web Services
 
Snap Telemetry Framework & Plugin Architecture at GrafanaCon 2016
Snap Telemetry Framework & Plugin Architecture at GrafanaCon 2016Snap Telemetry Framework & Plugin Architecture at GrafanaCon 2016
Snap Telemetry Framework & Plugin Architecture at GrafanaCon 2016Matthew Broberg
 

More Related Content

Similar to Be The API - VMware UserCon 2016

Into The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sInto The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sOrtus Solutions, Corp
 
O365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side RenderingO365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side RenderingRiwut Libinuko
 
Patterns and practices for real-world event-driven microservices by Rachel Re...
Patterns and practices for real-world event-driven microservices by Rachel Re...Patterns and practices for real-world event-driven microservices by Rachel Re...
Patterns and practices for real-world event-driven microservices by Rachel Re...Codemotion Dubai
 
Patterns and practices for real-world event-driven microservices
Patterns and practices for real-world event-driven microservicesPatterns and practices for real-world event-driven microservices
Patterns and practices for real-world event-driven microservicesRachel Reese
 
Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)Nordic APIs
 
apidays LIVE Australia - Contract-first API development with Spot by Francois...
apidays LIVE Australia - Contract-first API development with Spot by Francois...apidays LIVE Australia - Contract-first API development with Spot by Francois...
apidays LIVE Australia - Contract-first API development with Spot by Francois...apidays
 
How to implement email functionalities with Mailjet api
How to implement email functionalities with Mailjet apiHow to implement email functionalities with Mailjet api
How to implement email functionalities with Mailjet apiE Boisgontier
 
Building Services With gRPC, Docker and Go
Building Services With gRPC, Docker and GoBuilding Services With gRPC, Docker and Go
Building Services With gRPC, Docker and GoMartin Kess
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsTom Johnson
 
REST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterREST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterSachin G Kulkarni
 
Running gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on KubernetesRunning gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on KubernetesSungwon Lee
 
Amazon API Gateway and AWS Lambda: Better Together
Amazon API Gateway and AWS Lambda: Better TogetherAmazon API Gateway and AWS Lambda: Better Together
Amazon API Gateway and AWS Lambda: Better TogetherDanilo Poccia
 
Driving containerd operations with gRPC
Driving containerd operations with gRPCDriving containerd operations with gRPC
Driving containerd operations with gRPCDocker, Inc.
 
PHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHP
PHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHPPHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHP
PHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHPiMasters
 

Similar to Be The API - VMware UserCon 2016 (20)

Into The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api'sInto The Box | Alexa and ColdBox Api's
Into The Box | Alexa and ColdBox Api's
 
O365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side RenderingO365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side Rendering
 
Patterns and practices for real-world event-driven microservices by Rachel Re...
Patterns and practices for real-world event-driven microservices by Rachel Re...Patterns and practices for real-world event-driven microservices by Rachel Re...
Patterns and practices for real-world event-driven microservices by Rachel Re...
 
Patterns and practices for real-world event-driven microservices
Patterns and practices for real-world event-driven microservicesPatterns and practices for real-world event-driven microservices
Patterns and practices for real-world event-driven microservices
 
Ams adapters
Ams adaptersAms adapters
Ams adapters
 
Cqrs api v2
Cqrs api v2Cqrs api v2
Cqrs api v2
 
Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)Operational API design anti-patterns (Jason Harmon)
Operational API design anti-patterns (Jason Harmon)
 
apidays LIVE Australia - Contract-first API development with Spot by Francois...
apidays LIVE Australia - Contract-first API development with Spot by Francois...apidays LIVE Australia - Contract-first API development with Spot by Francois...
apidays LIVE Australia - Contract-first API development with Spot by Francois...
 
How to implement email functionalities with Mailjet api
How to implement email functionalities with Mailjet apiHow to implement email functionalities with Mailjet api
How to implement email functionalities with Mailjet api
 
Building Services With gRPC, Docker and Go
Building Services With gRPC, Docker and GoBuilding Services With gRPC, Docker and Go
Building Services With gRPC, Docker and Go
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIs
 
REST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterREST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in Codeigniter
 
Running gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on KubernetesRunning gRPC Services for Serving Legacy API on Kubernetes
Running gRPC Services for Serving Legacy API on Kubernetes
 
Amazon API Gateway and AWS Lambda: Better Together
Amazon API Gateway and AWS Lambda: Better TogetherAmazon API Gateway and AWS Lambda: Better Together
Amazon API Gateway and AWS Lambda: Better Together
 
OpenAI API crash course
OpenAI API crash courseOpenAI API crash course
OpenAI API crash course
 
Intro to GraphQL
 Intro to GraphQL Intro to GraphQL
Intro to GraphQL
 
Driving containerd operations with gRPC
Driving containerd operations with gRPCDriving containerd operations with gRPC
Driving containerd operations with gRPC
 
Cqrs api
Cqrs apiCqrs api
Cqrs api
 
Compose Camp - Session1.pdf
Compose Camp - Session1.pdfCompose Camp - Session1.pdf
Compose Camp - Session1.pdf
 
PHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHP
PHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHPPHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHP
PHP Experience 2016 - [Workshop] Elastic Search: Turbinando sua aplicação PHP
 

More from Matthew Broberg

Where Do We Go From Here?
Where Do We Go From Here?Where Do We Go From Here?
Where Do We Go From Here?Matthew Broberg
 
A Geek Whisperer's Guide to Career Options
A Geek Whisperer's Guide to Career OptionsA Geek Whisperer's Guide to Career Options
A Geek Whisperer's Guide to Career OptionsMatthew Broberg
 
Framingham Go Meetup - October 2016
Framingham Go Meetup - October 2016Framingham Go Meetup - October 2016
Framingham Go Meetup - October 2016Matthew Broberg
 
Intro to open source telemetry linux con 2016
Intro to open source telemetry   linux con 2016Intro to open source telemetry   linux con 2016
Intro to open source telemetry linux con 2016Matthew Broberg
 
GoSF Jan 2016 - Go Write a Plugin for Snap!
GoSF Jan 2016 - Go Write a Plugin for Snap!GoSF Jan 2016 - Go Write a Plugin for Snap!
GoSF Jan 2016 - Go Write a Plugin for Snap!Matthew Broberg
 
Social Media Communities Explained - They're Like Puppies
Social Media Communities Explained - They're Like PuppiesSocial Media Communities Explained - They're Like Puppies
Social Media Communities Explained - They're Like PuppiesMatthew Broberg
 
Social Benchmarking Training
Social Benchmarking TrainingSocial Benchmarking Training
Social Benchmarking TrainingMatthew Broberg
 
How to Pitch an Idea - Lessons from EMC TV & Toastmasters
How to Pitch an Idea - Lessons from EMC TV & ToastmastersHow to Pitch an Idea - Lessons from EMC TV & Toastmasters
How to Pitch an Idea - Lessons from EMC TV & ToastmastersMatthew Broberg
 

More from Matthew Broberg (10)

Where Do We Go From Here?
Where Do We Go From Here?Where Do We Go From Here?
Where Do We Go From Here?
 
A Geek Whisperer's Guide to Career Options
A Geek Whisperer's Guide to Career OptionsA Geek Whisperer's Guide to Career Options
A Geek Whisperer's Guide to Career Options
 
Commitmas 2015
Commitmas 2015Commitmas 2015
Commitmas 2015
 
Framingham Go Meetup - October 2016
Framingham Go Meetup - October 2016Framingham Go Meetup - October 2016
Framingham Go Meetup - October 2016
 
Intro to open source telemetry linux con 2016
Intro to open source telemetry   linux con 2016Intro to open source telemetry   linux con 2016
Intro to open source telemetry linux con 2016
 
GoSF Jan 2016 - Go Write a Plugin for Snap!
GoSF Jan 2016 - Go Write a Plugin for Snap!GoSF Jan 2016 - Go Write a Plugin for Snap!
GoSF Jan 2016 - Go Write a Plugin for Snap!
 
Social Media Communities Explained - They're Like Puppies
Social Media Communities Explained - They're Like PuppiesSocial Media Communities Explained - They're Like Puppies
Social Media Communities Explained - They're Like Puppies
 
Social Benchmarking Training
Social Benchmarking TrainingSocial Benchmarking Training
Social Benchmarking Training
 
How to Pitch an Idea - Lessons from EMC TV & Toastmasters
How to Pitch an Idea - Lessons from EMC TV & ToastmastersHow to Pitch an Idea - Lessons from EMC TV & Toastmasters
How to Pitch an Idea - Lessons from EMC TV & Toastmasters
 
Social influence
Social influenceSocial influence
Social influence
 

Recently uploaded

CCW332-DIGITAL MARKETING QUESTION BANK WITH ANSWERS
CCW332-DIGITAL MARKETING QUESTION BANK WITH ANSWERSCCW332-DIGITAL MARKETING QUESTION BANK WITH ANSWERS
CCW332-DIGITAL MARKETING QUESTION BANK WITH ANSWERSTamil949112
 
fat and edible oil processsing.ppt, refining
fat and edible oil processsing.ppt, refiningfat and edible oil processsing.ppt, refining
fat and edible oil processsing.ppt, refiningteddymebratie
 
Checklist to troubleshoot CD moisture profiles.docx
Checklist to troubleshoot CD moisture profiles.docxChecklist to troubleshoot CD moisture profiles.docx
Checklist to troubleshoot CD moisture profiles.docxNoman khan
 
Handling Incidents collaboratively is like solving a Rubik's cube.pptx
Handling Incidents collaboratively is like solving a Rubik's cube.pptxHandling Incidents collaboratively is like solving a Rubik's cube.pptx
Handling Incidents collaboratively is like solving a Rubik's cube.pptxNeleUhlemann
 
IT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notesIT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notesAsst.prof M.Gokilavani
 
Environmental studies questions &Answers.doc
Environmental studies questions &Answers.docEnvironmental studies questions &Answers.doc
Environmental studies questions &Answers.docbalbheem909
 
Model Approved Food/ sanitary Grade Flow Meter
Model Approved Food/ sanitary Grade Flow MeterModel Approved Food/ sanitary Grade Flow Meter
Model Approved Food/ sanitary Grade Flow MeterManasMicrosystems
 
Basic Instrumentation Symbols | P&ID | PFD | Gaurav Singh Rajput
Basic Instrumentation Symbols | P&ID | PFD | Gaurav Singh RajputBasic Instrumentation Symbols | P&ID | PFD | Gaurav Singh Rajput
Basic Instrumentation Symbols | P&ID | PFD | Gaurav Singh RajputGaurav Singh Rajput
 
Drone design for agricultural applications
Drone design for agricultural applicationsDrone design for agricultural applications
Drone design for agricultural applicationsturbomachinesproject
 
VEHICLE POSITION AND ACCIDENT PREVENTION USING MULTISENSOR, GSM, GPS
VEHICLE POSITION AND ACCIDENT PREVENTION USING MULTISENSOR, GSM, GPSVEHICLE POSITION AND ACCIDENT PREVENTION USING MULTISENSOR, GSM, GPS
VEHICLE POSITION AND ACCIDENT PREVENTION USING MULTISENSOR, GSM, GPSDeepakK547422
 
Super Duplex Steel 32750 Fasteners, UNS S32750 Fasteners
Super Duplex Steel 32750 Fasteners, UNS S32750 FastenersSuper Duplex Steel 32750 Fasteners, UNS S32750 Fasteners
Super Duplex Steel 32750 Fasteners, UNS S32750 Fastenersfastenersboltss
 
Architectural Preservation - Heritge Focused in Saudi Arabia WM.pdf
Architectural Preservation - Heritge Focused in Saudi Arabia WM.pdfArchitectural Preservation - Heritge Focused in Saudi Arabia WM.pdf
Architectural Preservation - Heritge Focused in Saudi Arabia WM.pdfIgnacio J. Palma, Arch PhD.
 
HB Self-Body characteristics UHV understanding
HB Self-Body characteristics UHV understandingHB Self-Body characteristics UHV understanding
HB Self-Body characteristics UHV understandingLeoRaju4
 
21 Scheme_21EC53_MODULE-5_CCN_Dr. ShivaS
21 Scheme_21EC53_MODULE-5_CCN_Dr. ShivaS21 Scheme_21EC53_MODULE-5_CCN_Dr. ShivaS
21 Scheme_21EC53_MODULE-5_CCN_Dr. ShivaSDr. Shivashankar
 
Series of training sessions by our experts for you to provide necessary insig...
Series of training sessions by our experts for you to provide necessary insig...Series of training sessions by our experts for you to provide necessary insig...
Series of training sessions by our experts for you to provide necessary insig...AshishChanchal1
 
ia-chapter61water quality-provisions.pdf
ia-chapter61water quality-provisions.pdfia-chapter61water quality-provisions.pdf
ia-chapter61water quality-provisions.pdfmohamedmustafa939456
 
Wireless module 2 notes vtu 18ec81 GSM Module
Wireless module 2 notes vtu 18ec81 GSM ModuleWireless module 2 notes vtu 18ec81 GSM Module
Wireless module 2 notes vtu 18ec81 GSM ModuleChetan Naik
 
Renewable sources to produce electricity , Wind Energy
Renewable sources to produce electricity , Wind EnergyRenewable sources to produce electricity , Wind Energy
Renewable sources to produce electricity , Wind EnergyMaryam79507
 

Recently uploaded (20)

CCW332-DIGITAL MARKETING QUESTION BANK WITH ANSWERS
CCW332-DIGITAL MARKETING QUESTION BANK WITH ANSWERSCCW332-DIGITAL MARKETING QUESTION BANK WITH ANSWERS
CCW332-DIGITAL MARKETING QUESTION BANK WITH ANSWERS
 
fat and edible oil processsing.ppt, refining
fat and edible oil processsing.ppt, refiningfat and edible oil processsing.ppt, refining
fat and edible oil processsing.ppt, refining
 
Checklist to troubleshoot CD moisture profiles.docx
Checklist to troubleshoot CD moisture profiles.docxChecklist to troubleshoot CD moisture profiles.docx
Checklist to troubleshoot CD moisture profiles.docx
 
Handling Incidents collaboratively is like solving a Rubik's cube.pptx
Handling Incidents collaboratively is like solving a Rubik's cube.pptxHandling Incidents collaboratively is like solving a Rubik's cube.pptx
Handling Incidents collaboratively is like solving a Rubik's cube.pptx
 
IT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notesIT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notes
 
Environmental studies questions &Answers.doc
Environmental studies questions &Answers.docEnvironmental studies questions &Answers.doc
Environmental studies questions &Answers.doc
 
Model Approved Food/ sanitary Grade Flow Meter
Model Approved Food/ sanitary Grade Flow MeterModel Approved Food/ sanitary Grade Flow Meter
Model Approved Food/ sanitary Grade Flow Meter
 
Basic Instrumentation Symbols | P&ID | PFD | Gaurav Singh Rajput
Basic Instrumentation Symbols | P&ID | PFD | Gaurav Singh RajputBasic Instrumentation Symbols | P&ID | PFD | Gaurav Singh Rajput
Basic Instrumentation Symbols | P&ID | PFD | Gaurav Singh Rajput
 
Drone design for agricultural applications
Drone design for agricultural applicationsDrone design for agricultural applications
Drone design for agricultural applications
 
VEHICLE POSITION AND ACCIDENT PREVENTION USING MULTISENSOR, GSM, GPS
VEHICLE POSITION AND ACCIDENT PREVENTION USING MULTISENSOR, GSM, GPSVEHICLE POSITION AND ACCIDENT PREVENTION USING MULTISENSOR, GSM, GPS
VEHICLE POSITION AND ACCIDENT PREVENTION USING MULTISENSOR, GSM, GPS
 
Super Duplex Steel 32750 Fasteners, UNS S32750 Fasteners
Super Duplex Steel 32750 Fasteners, UNS S32750 FastenersSuper Duplex Steel 32750 Fasteners, UNS S32750 Fasteners
Super Duplex Steel 32750 Fasteners, UNS S32750 Fasteners
 
Architectural Preservation - Heritge Focused in Saudi Arabia WM.pdf
Architectural Preservation - Heritge Focused in Saudi Arabia WM.pdfArchitectural Preservation - Heritge Focused in Saudi Arabia WM.pdf
Architectural Preservation - Heritge Focused in Saudi Arabia WM.pdf
 
HB Self-Body characteristics UHV understanding
HB Self-Body characteristics UHV understandingHB Self-Body characteristics UHV understanding
HB Self-Body characteristics UHV understanding
 
21 Scheme_21EC53_MODULE-5_CCN_Dr. ShivaS
21 Scheme_21EC53_MODULE-5_CCN_Dr. ShivaS21 Scheme_21EC53_MODULE-5_CCN_Dr. ShivaS
21 Scheme_21EC53_MODULE-5_CCN_Dr. ShivaS
 
Series of training sessions by our experts for you to provide necessary insig...
Series of training sessions by our experts for you to provide necessary insig...Series of training sessions by our experts for you to provide necessary insig...
Series of training sessions by our experts for you to provide necessary insig...
 
ia-chapter61water quality-provisions.pdf
ia-chapter61water quality-provisions.pdfia-chapter61water quality-provisions.pdf
ia-chapter61water quality-provisions.pdf
 
Présentation de F. Joudelat Congrès IIRB février 2024
Présentation de F. Joudelat Congrès IIRB février 2024Présentation de F. Joudelat Congrès IIRB février 2024
Présentation de F. Joudelat Congrès IIRB février 2024
 
Wireless module 2 notes vtu 18ec81 GSM Module
Wireless module 2 notes vtu 18ec81 GSM ModuleWireless module 2 notes vtu 18ec81 GSM Module
Wireless module 2 notes vtu 18ec81 GSM Module
 
Présentation IIRB 2024 Prévibest T. Leborgne
Présentation IIRB 2024 Prévibest T. LeborgnePrésentation IIRB 2024 Prévibest T. Leborgne
Présentation IIRB 2024 Prévibest T. Leborgne
 
Renewable sources to produce electricity , Wind Energy
Renewable sources to produce electricity , Wind EnergyRenewable sources to produce electricity , Wind Energy
Renewable sources to produce electricity , Wind Energy
 

Be The API - VMware UserCon 2016

  • 1. Be The API an exploration of careers, supported by code and memes by @mjbrender
  • 12. “Hey, Sisyphus, when you’ve got a minute I’d like to discuss this progress report with you.”
  • 13. > cd $HOME > > > bash ./admin_script fixing foo
  • 16. > vim ./admin_script cmd | xarg –n 1 sed –i “s/server/foo/g” | grep -i up >err.log 2>&1
  • 17. “An Application Programming Interface is a set of routines, protocols, and tools for building software applications.”
  • 23. is the API the new CLI ?
  • 25. > cmd | grep | sed | awk
  • 26. the API the new CLI (if and only if you use the CLI like this example)
  • 27. > cmd | grep | sed | awk
  • 30. API is a machine interface CLI is a user interface GUI is a user interface
  • 31. An API says: Request this. Get that.
  • 32. {you}
  • 36. GET job/ Return a description of my job. There are no options available for this endpoint.
  • 37. > myctl job list Matt is a Developer Advocate. Developer Advocates are technical community contributors key to accelerating project adoption through internal coordination & targeted external contribution.
  • 38. GET contact/ Returns a list of available forms of contact. type required Return whether the contact is personal or professional Values: personal, professional, all include_preference optional Boolean preference as defined by the service Example Value: true include_reply_time optional Return average response time for request Example Value: false Response formats JSON Requires authentication? No Rate limited? Yes
  • 39. curl http://localhost/v1/contact ?type=all { ”contact": { ”email": [ { “type": “professional", “to": “REDACTED", }, { “type": “personal", “to": “REDACTED", }, ], ”tweet": [ { "type": “personal”, “to": “@mjbrender", } ], ”call": [ { "type": “personal”, “to": “+REDACTED", } ] } }
  • 40. > myctl contact list --all TYPE PREFERENCE REPLY TIME email 2 3d text 3 1m tweet 1 30s call 4 5d
  • 41. PUT contact/[:to] Request that gets in contact with the API owner. Returns string response to the request. from required Return location appropriate for the endpoint Example Value: @mjbrender, mjbrender@gmail.com message required Reason for the contact Example Value: “Thought you’d like this post” urgency optional Definition of how quickly a reply is required. Values: Low, Medium, High include_lead_time optional Boolean to include approximate time to respond. Example Value: true
  • 42. curl -H “Content-Type: application/json” -X POST –d ‘{ “from”: “@vBrianGraf”, “description”: “Hey!” } http://localhost/v1/contact/@ mjbrender { ”confirmation": “Thanks for getting in touch. I’ll response back as soon as time allows.” }
  • 43. { ”confirmation": “Thanks for getting in touch. Since this involves something urgent, I’ll get back to you as soon as I can.” } curl -H “Content-Type: application/json” -X POST –d ‘{ “from”: “josie@google.com”, “description”: “House on Fire”, “urgency”: “high” } http://localhost/v1/contact/ mjbrender@gmail.com
  • 44. GET job/skill Returns a list of advertised job skills. type optional Return the category of work this falls under Values: ENG, MKT, SALES, FINANCE, MGMT include_preference optional Boolean preference as defined by the service provider. Defined on a scale from 1-7 with 7 as most preferred Example Value: 3 include_level optional Boolean level of expertise of the service provider. Expertise is defined on a scale from 1-7 with 7 as best Example Value: 7 Response formats JSON Requires authentication? No Rate limited? No
  • 45. > myctl skill list --type=ENG -p SKILL TYPE PREFERENCE Build Automation ENG 5 Product Mgmt ENG 5 Dev Mgmt ENG 4 Traditional IT ENG 3 Cloud Native ENG 7 Ruby Developer ENG 3 Go Developer ENG 3
  • 46. > myctl skill list --type=ENG -p SKILL TYPE PREFERENCE Build Automation ENG 5 Product Mgmt ENG 5 Dev Mgmt ENG 4 Traditional IT ENG 3 Cloud Native ENG 7 Ruby Developer ENG 3 Go Developer ENG 3
  • 47. > myctl skill list --type=ENG -l SKILL TYPE SKILL LEVEL Build Automation ENG 2 Product Mgmt ENG 5 Dev Mgmt ENG 4 Traditional IT ENG 5 Cloud Native ENG 3 Ruby Developer ENG 2 Go Developer ENG 2
  • 48. > myctl skill list --type=ENG -l SKILL TYPE SKILL LEVEL Build Automation ENG 2 Product Mgmt ENG 5 Dev Mgmt ENG 4 Traditional IT ENG 5 Cloud Native ENG 3 Ruby Developer ENG 2 Go Developer ENG 2
  • 49. > myctl skill list --type=MKT -l SKILL TYPE SKILL LEVEL PowerPointing MKT 6 Podcasting MKT 6 Blogging MKT 4 Public Speaking MKT 4 Product Messaging MKT 5 Logo Design MKT 5 Social Media MKT 5
  • 50. GET job/request/ Review active work requests with expected completion dates. type optional Return the category of work this falls under Values: ENG, MKT, SALES, FINANCE, MGMT include_preference optional Boolean preference as defined by the service provider Example Value: true include_lead_time optional Boolean to include default lead time per request Example Value: true Response formats JSON Requires authentication? No Rate limited? No
  • 51. > myctl work list -t -lt REQUEST TYPE LEAD TIME Create PPT MKT 7d Define OSS Release ENG 5d Test Automation ENG 3d Write Blog Post MKT 2d Re to Sales MGMT .5d Schedule Meeting MGMT .25d Create other PPT MKT 7d
  • 52. PUT job/request/ Request that gets in contact with the API owner. Returns expected response time. title required Boolean preference as defined by the service Example Value: true description required Return average response time for request Example Value: false urgency required Return average response time for request Example Value: false authorized optional Return average response time for request Example Value: true
  • 53. Valid Responses • “Here you go.” • “I can’t do that.” • “I’m on it. I’m estimating a delivery time of” + GET job/requests/[:type]?lead_time • “I can’t help you with this right now, I’m at capacity. Please contact my manager.” • “I can’t help you right now due to other urgent priorities. Please contact my manager.” • “I will get on it right away. Here is the other work that will be delayed by at least 2 business days by this request:” + GET job/requests/
  • 56. An API says: Request this. Get that.
  • 57. API is a machine interface CLI is a user interface GUI is a user interface
  • 58. defining our API can help us be better humans
  • 59. > myctl contact list --best TO PREFERENCE @mjbrender 1 slack.snap-telemetry.io 2

Editor's Notes

  1. How do you know you've correctly configured a server? When there’s no error messages saying CRITICAL or someone saying “something is off here” how do you fix it? How do you know a server is misconfigured. Or a switch. A new storage array?
  2. You do it through business logic. You decide, based on what you know of the environment, what others have stated as the desired state. Based on your years of expertise and knowledge of every vendor under the sun. You’re not scared of mapping spindle to LUN to VM. You’ve conquered the art of subnets. You’re not scared of ANY stack because you know the fundamentals across every system are just that, the fundamentals.
  3. On those days you do need to configure something, you are just a URL away. For a while, the world felt at my finger tips once I was logged into vSphere. Everything made sense in there. Need a new Windows Server – you got it. New requirements for the Dev cluster: no problem! (it took a while after C# client went away, but we all know that feeling).
  4. And that was good, because there was always a problem to fix – business logic that needed implementation.
  5. And it was no problem – one login, a few clicks and I got the work done, no problem.
  6. And again: hop right in and fix it. No issue.
  7. At some point, the joy of hopping into vSphere to configure something fades away. Or, more likely, you have so many other GUIs to sign into you start to lose your familiarity with where to fix the problem, but I was still asked to get all that work done.
  8. It feels futile at some point – pushing the same rock up the same hill only to watch it roll back down again.
  9. And for many, the questioning of how you use for your futile tasks is being scrutinized. You’re pushed to do more with less or some other business phrase.
  10. So you evolve: The CLI is the next frontier. Keeping a set of scripts around that can automate some of those guaranteed-to-repeat-themselves tasks. Scripting has done us well.
  11. After what feel like endless requests to you, your boss wants you to start fixing this proactively instead of reactively.
  12. The old lines in the sand between one team and another are less acceptable than they previously where. Your boss needs you to DevOps harder.
  13. You look through the script you’ve relied on up to this point and see that you’re manipulating output from a command line, passing around unstructured output and parsing it over and over again in a barely legible way. (that’s assuming you didn’t write it in perl) THERE HAS TO BE A BETTER WAY
  14. Provides a structured means of communication from machine to machine
  15. Social platforms published APIs for consumption Infrastructure continued on its way of the CLI cloud computing changed that.
  16. It all changed once you could start configuring servers and the applications we run on them through public APIs. Slowly but surely. Every piece of the datacenter – the atomic pieces like CPU, Memory, Disk, Network devices and up the software stack layered on top of it – all uses APIs and they are more and more public of late. Why is it so popular??
  17. The information returned is in a known format that can be predictably parsed. A documented API Input format (XML, JSON, gRPC, ...) Output format (XML, JSON, binary) Have syntax – the format of a request The parameters that may be required or optional Have methods – functions you can make of the request Have inheritance, protocols like gRPC, formatting from SOAP to REST, client libraries in different programming languages and more, but that’s not what I care about There’s expected input and expected output
  18. Taking a look through the vSphere API will show that it uses the IETF standard called SOAP to communicate from client to server and back again. Information is encoded in XML objects.
  19. While many other APIs these days pass another formatting called JSON to HTTP endpoints following REST, which is a set of principles that map really nicely to the HTTP protocol.
  20. Should we abandon the CLI?
  21. NO. A CLI is another consumer of the API. What’s nice these days is that both the CLI and the API are opening up, allowing both to be programmatically used for business logic.
  22. So, I suppose there’s a counter argument to saying no here: If you use the CLI for machine to machine communication, then take the returned values and pipe, grep and awk your way through them, then fine. You can say it.
  23. The API is the new CLI... not because of its ability to query for the right information but for the fact it accepts and returns is in a known format that can be predictably parsed.
  24. If we put ourselves back into this equation, running a command over CLI is a perfectly valid way to explore the state of our server.
  25. If you do want to use an API for your laptop, that’s great! Power to you, it’s just gonna be a little more challenging on the eyes to read. It should not be the goal however.
  26. The goal is to have machine to machine communication over the API. That can be as simple as a script that leverages an API + cron or as cloud native as an ephemeral container or lambda function. It doesn’t matter as long as it gets the business logic done in a timely way.
  27. To be extra clear here: the API is for machines. The CLI and GUI continue to be for you and me when we need them. They’re not going away nor should they.
  28. It’s the simplest type of contract we have in this world. A structured agreement, in whatever format you want for any kind of resource you can request. I ask for something, you give me something in return.
  29. Which brings me to you. What’s your API? What can someone request from you and what can they expect in return?
  30. I’m part of a podcast called The Geek Whisperers and we had the pleasure of talking to people at the Silicon Valley VMUG about their careers. We had a line the entire day. I truly don’t think that had to do with us, it had to do with the incredible gap we have as a community when it comes to thinking about our careers. What really struck me about this experience was how everyone – absolutely everyone – can benefit from this conversation about how they communicate their job and the skills they have.
  31. Having that experience and my continued desire to be a better developer, I thought to start what I’m calling the {myapi} - it’s a thought experiment right now. I see value in each of us exploring the boundaries of our own APIs – what they include and what they’re missing. What we expect from others and what we expect to provide to them. To start by example and walk you through a few career conversations I’ve been having with myself lately, I started to map my own.
  32. The simplest command has no options – it’s just an endpoint you can make a request to.
  33. From the CLI tool that uses this API, we get this output. << Read >> This is how I explain my work to others inside the company. Having this one-liner on the top of my head has made all the difference in how I help colleagues see what I can do for them.
  34. So let’s say you want to get in touch. Here’s an endpoint that returns contact information. Again, the API definition is totally independent of the content returned – that’s the clear line between frontend and backend of the application. To simplify, I’m showing you both as if both are completed.
  35. by CURLing this URL, we talk to the endpoint and make a request to the method I just showed you. Valid JSON object is returned with all the forms of contact I have.
  36. Since we discussed how a CLI is just a more user friendly view of the same API output, here’s a prettier version of that information including the optional returns I mentioned before. When I’m honest with myself and my coworkers, my reply times and preference direct users toward Twitter. I own that – I ask people to tweet me instead of email all the time and it’s changed the way I monitor communication.
  37. Let’s say someone does need to get in touch with me. They’ll perform an HTTP PUT command with the required options included. What information do they have to have?
  38. Now it’s time to share what I’m good at. Some interesting options for such an endpoint include what type of work is it, by org chart definition. What’s nice about Org Charts as a categorization is that it leads directly to what kind of job I should pursue. That’s an API that gives me more than information, it gives me direction. I add management as it’s own type value since it is a skillset I work hard on developing even while I’m an individual contributor.
  39. The toughest fact I face when ranking my skills is that I can quickly see my marketing skills are significantly greater than my engineering skills. That’s been a constant challenge for me: do I accept that I could be a great marketer, or do I grind harder to be a better engineer? The verdict isn’t out on that one, which is why I appreciate being a Developer Advocate while I think this through.
  40. Next we turn to talking about what work I do – I want to provide an API by which anyone can see what I’m working on.
  41. When I admit, like all other people, that I am not good at multitasking, I can start honestly showing you how long it will be until I complete a given task and that’s if these priorities stay in order. What I do by showing you and others this output is I give you the context to understand what interrupting my current work will do to other work. I love that democratization of context.
  42. Let’s say you do have work to ask of me. How do you ask it? You’ll see here that if you’re going to assign me work, I expect a lot of optional information before I consider it a valid request. I need context about the work, and I now require the urgency of that request to be explicitly stated. When I assume anything said “not urgent” is lower priority, I find myself having issues. So it’s now a requirement.
  43. The optional information required, along with the other API endpoints I offer, gives people meaningful responses based purely on the content of their request. Ideas to help – The Three D’s: Deal with; Delegate; and Disappear
  44. So there you have it – that’s myapi. I have a clear definition of how to get in touch with me. I can clearly explain my job, the skills I have that relate to that job and even my preferences for types of work. I also expose what I’m working on and let others add to that queue of work explicitly.
  45. The first question I wondered after completing this exercise is: what didn’t I document? I didn’t share my hobbies, which I’ve found valuable to share with my coworkers. I’d like to think through this one next. There’s also a hidden option on each PUT request that I write here in Go pseudocode.
  46. An API is an explicit definition of expectations for two systems. The “how” is behind the API. People just care about the what – what can I expect from you based on my request.
  47. It’s normally machine to machine
  48. Help us be better employees, colleagues, friends and family.
  49. Since we discussed how a CLI is just a more user friendly view of the same API output, here’s a prettier version of that information including the optional returns I mentioned before. When I’m honest with myself and my coworkers, my reply times and preference direct users toward Twitter. I own that – I ask people to tweet me instead of email all the time and it’s changed the way I monitor communication.
  50. Comments: “But I don’t know exactly what my job entails” I hear you. I’m not sure either. But it’s time to start owning that choice and recognize it’s ours to negotiate We will still use GUIs and CLIs Human decision making is still needed See beyond the UIs we’re used to and start noticing that our favorite tools – proprietary or open source – are software. And it’s simply not true that you must have a CS degree to code You code. Be proud of it. Make your jobs better. No one cares which of these routes you use to solve the problem. The “how” is behind the API. I just want the what. Your goal, for your own career progression, should be to remove as much monotonous tasks out of your life as you can If you don’t, you’ll spend all your time on behaviors that add very little value OR you’ll hate your boring job OR both