Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Web API 反省録
Search
Hayochan-man
January 10, 2026
59
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Web API 反省録
Hayochan-man
January 10, 2026
More Decks by Hayochan-man
See All by Hayochan-man
リファクタリングで抽象力をつけ、 結果的にコード力がついた話
hayochanman
0
77
初めてのAI Agentで苦戦したこと
hayochanman
0
51
ハッカソンを通じた学び ~チーム開発の面から~
hayochanman
0
39
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
740
Optimising Largest Contentful Paint
csswizardry
37
4k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
500
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
410
Into the Great Unknown - MozCon
thekraken
41
2.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
WENDY [Excerpt]
tessaabrams
14
40k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
500
Transcript
Web API 反省録 Reflections on Web API Design @はよちゃん
本日のテーマ 「Web API Good Parts」から ハッカソンのAPI設計を振り返る 再現してしまったアンチパターンと その要因を共有します
X: @hayochan_man 自己紹介 新卒2年目 / 製造系企業勤務 ローコードパッケージの社内展開を推進中 ハッカソンでWeb API設計を担当 設計軸がわからず迷走...
@hayochan_man
CONCLUSION usecaseの定義不足が Web APIのアンチパターン を 再現させてしまった
usecase とは ユーザの目的達成までの体験全体を 各機能単位に分解したもの 体験全体 プロテイン等の消耗品を オンライン上で手軽に購入する ユースケース(分解後) 商品を検索する 商品をかごに入れる
usecaseで明確化すべき 3つのポイント 01 誰(アクター)が 02 何を目的(ゴール)として 03 システムがデータをどこまで処理し、どこから役割外とするか ①と②を元に、③を明確化することで Web
APIの設計ができる
定義が不明瞭だと... これから紹介する 3つの問題が生じる
問題① 冗長なURIの作成 原因 アクターとデータの 分類が曖昧 前提条件とドメインデータが混在 してしまっている状態。 具体例 user 操作の主体(アクター)
APIを呼び出す前提条件 profile ユーザに紐づく ドメインデータ 結果 profileをアクターとして 扱ってしまった その結果、その他のAPIは profileに従属するような設計に なってしまった。
問題② ChattyなAPIの作成 原因 何が目的(ゴール)か 不明瞭 APIを正規化単位で切ってしまう思 考停止が原因。 具体例 「このAPIで何を完了させたいか」を 考えず...
エンティティ単位 リレーション単位 でAPIを分解してしまった。 • • 結果 ChattyなAPIになった 必要な情報を得るために、 何度もAPIを呼び出す必要があ る非効率な状態。
問題③ 冪等性が担保されないAPIの作成 原因 システムが何をどこまで 処理するか不明 処理の性質を定義できていない状 態。 具体例:AI生成API AIの生成用APIを実装したが... ?
生成のみを責務とし、再生成を前提とす るのか? ? 同じインプットは生成させずに、DBから 再取得させるのか? 結果 中途半端なAPIが完成 AIの生成の質も担保され ず、保存もされないAPIが作成 されてしまった。
総括 usecaseを明確にすることで 何のための データ か を定義した Web API を設計できます