API Experience is Developer Experience Lorna Mitchell, Redocly
@redocly ~ @lornajane
Slide 2
Postman State of the API report 2023 Top decision factor: how well an API integrates with internal apps and systems. https://www.postman.com/state-of-api/
@redocly ~ @lornajane
Slide 3
API project pre-requisites •API styles and governance •Versioning and deprecation policy •Change review process •Tools to support the lifecycle
@redocly ~ @lornajane
Slide 4
Slide 5
Start with standards
@redocly ~ @lornajane
Slide 6
OpenAPI descriptions A standard way to describe an API •JSON/YAML format •Endpoints and verbs •Parameters and schemas •Reuse elements with $ref •Responses, including error responses https://openapis.org @redocly ~ @lornajane
Slide 7
OpenAPI example openapi: 3.0.1 servers: - url: http://datasette.local - url: https://datasette.io info: description: Execute SQL queries against a Datasette database and return the results as JSON title: Datasette API version: v1 paths: /content.json: get: description: Accepts SQLite SQL query, returns JSON. Does not allow PRAGMA statements.
Credit: https://github.com/APIs-guru/openapi-directory @redocly ~ @lornajane
Slide 8
Design API governance Start with an existing ruleset
@redocly ~ @lornajane
Slide 9
Designing rulesets •Level 0: Is the document valid? •Level 1: Does it meet basic (compliance) standards? •Level 2: Is it consistent with the rest of the API? •Level 3: Is it a joy to work with?
@redocly ~ @lornajane
Slide 10
Process matters
@redocly ~ @lornajane
Slide 11
Proposing API changes Use a source control workflow •Useful and timely feedback mechanisms •Consider user needs, and existing conventions •Think (very hard) about how things are named
@redocly ~ @lornajane
Slide 12
Automate for success •Use linting to check API fits guidelines •Create documentation previews •Spin up mock servers
@redocly ~ @lornajane
Slide 13
API Council Bring key API contributors together for every review: •Would you want to use this API? •Is the naming sensible and intuitive? •Is the change consistent with the existing API?
@redocly ~ @lornajane
Slide 14
API experience at scale
@redocly ~ @lornajane
Slide 15
API catalog Central registry/marketplace/inventory •All APIs are registered here •OpenAPI descriptions •Establish documentation conventions •Team contact information •Standards/readiness
@redocly ~ @lornajane
Slide 16
API catalog
@redocly ~ @lornajane
Slide 17
API lifecycle tools tl;dr https://openapi.tools/
@redocly ~ @lornajane
Slide 18
API lifecycle tools •Linting, standard rulesets or make your own •Documentation, build a preview of proposed changes •Mock servers, try before you build •Extensions, improve an existing description •SDKs, improve developer onboarding
@redocly ~ @lornajane