2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

API設計に関するまとめ

Last updated at Posted at 2020-05-27

概要

API設計初心者ですので、いろいろ調べて見る。自分用まとめ。

用語

LSUDs = Large Set of Unknown Developers(不特定多数のユーザーに提供するAPI)
SSKDs = Small Set of Unknown Developers(特定のシステムのみで利用する専用のAPI)
HATEOS = Hypermedia As The Engine Of Application State(リソース同士に関連性のあるAPIのこと)

APIリクエスト(POST/PUT)のcontent-type

application/x-www-form-urlencoded

body部分にkey-value形式で送信したいデータを格納する。

application/json(より主流)

body部分にJSON形式で送信したいデータを格納する。

APIレスポンスのcontent-typeとフォーマット

application/json(JSON-RPC)

参考

application/hal+json(HAL)

参考

application/vnd.api+json(JSON API)

参考

application/vnd.collection+json(Collection JSON)

参考

参考

REST API のコツ
Web APIにはJSONベースのフォーマットを使おう

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?