INTERFACE by apidays 2023
APIs for a “Smart” economy. Embedding AI to deliver Smart APIs and turn into an exponential organization
June 28 & 29, 2023
Refining Your API: The Last Mile of API Design
James Higginbotham, Executive API Consultant at LaunchAny
------
Check out our conferences at https://www.apidays.global/
Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8
Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io
Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/
Customer Service Analytics - Make Sense of All Your Data.pptx
INTERFACE by apidays 2023 - Refining Your API: The Last Mile of API Design, James Higginbotham, LaunchAny
1. Refining Your API:
The Last Mile of API Design
James Higginbotham
@launchany
Photo by Francisco Fernandes on Unsplash
bit.ly/refining-your-api
2.
3. 2
@launchany
Introduction
•Consultant: API Strategy and Program Execution
•Speaker, Trainer, Author based in Colorado Springs, CO
•Author, “Principles of Web API Design: Delivering Value with APIs and Microservices”
9. 8
@launchany
APIs are a Conversation: Developer-to-Developer
Examples
and Guides
Reference
Docs
10. 9
@launchany
APIs are a Conversation: Human-to-Human
Homeowner:
“Can you tell me where
we stand with my home
remodeling project?”
Project Manager:
“Sure, here are the
tasks completed and
items remaining, along
with budget details”
11. 10
@launchany
APIs are a Conversation: Human-to-Human
Policy Holder:
“I’m trying to list the
recently submitted claim so
that I can track the status
as I get back to whole”
Adjuster:
“Sure, I can provide you
with that information”
14. 13
@launchany
Make Your APIs Intentional
2. Identify the
situation or
triggering event
3. Find the job to
be done that
delivers on the
desired outcome
1. Identify the
desired outcome
15. 14
@launchany
Make Your APIs Intentional
2. Identify the
situation or
triggering event
3. Find the job to
be done that
delivers on the
desired outcome
1. Identify the
desired outcome
Confirm the date that my order will arrive
I am uncertain of when my order will arrive
View the status of an order
16. 15
@launchany
Align to the Needs of the Consumer
Job Story: View Order Status
WHEN I am uncertain of when my order will arrive
I WANT TO View the status of my order
SO I CAN Confirm the date that my order will arrive
17. 16
@launchany
Job Stories Drive Acceptance Testing
Example: View Order Status Job Story
Given a user named ‘Donna’ with login ‘xyz@mycorp.com’
And an order created by user ‘Donna’ with the details ‘…’
And a login session for user ‘Donna’
When the user ‘Donna’ wants to know the status of an order
And user ‘Donna’ views the status of an order
Then ‘Donna’ should confirms the status of ‘Shipped’ with a
shipment date of ‘2023-06-27’ Desired outcome
Job to be done
Situation
18. 17
@launchany
Does my API deliver
on the desired
outcomes…
…or does it focus only
on the implementation
details?
20. 19
@launchany
Maps Business Processes, Not Raw Data
•Using the outcomes as a guide, find the business processes necessary to deliver
upon the outcome
•Diagram out the process, or capture as a text-based narrative of each step
26. 25
@launchany
Does my API
reinforce my
domain model
through a domain-
specific language
(DSL)?
Customer: listBooks() -> Books[]
Customer: addBookToCart(bookId) -> Cart
Customer: removeBookFromCart(bookId) -> Cart
Customer: searchBooks(searchQuery) -> Books[]
Customer: addBookToCart(bookId) -> Cart
Customer: viewCart() -> Cart
33. 32
@launchany
gRPC Client and Server Streaming
gRPC Client gRPC Server
service Main {
rpc GetLatestOrders(stream OrderQuery)
returns (OrderResults) {}
}
gRPC Async Option 1: Client Streams to Server
gRPC Client gRPC Server
gRPC Option 2: Server Streams to Client
service Main {
rpc GetLatestOrders(OrderQuery)
returns (stream Order) {}
}
gRPC Client gRPC Server
gRPC Async Option 3: Bi-Directional streaming
service Main {
rpc GetLatestOrders(stream OrderQuery)
returns (stream Order) {}
}
42. 41
@launchany
Design the digital capabilities as APIs, events, and streams
DESIGN
Seek stakeholder alignment on desired outcomes
ALIGN
Improve the design based on early feedback
REFINE
Agree on digital capabilities required for desired outcomes
DEFINE
The ADDR Collaborative API Design Process
Human-to-
Human
Human-to-
Human
Developer-to-
Developer
Machine-to-
Machine