0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【学習】URI、URL、エンドポイント

Posted at

はじめに

エンジニアを目指す前はURLしか知りませんでした。
現在、転職先での研修項目の中に「API設計」というものがあり、少しわからない部分がありました。
今回はエンドポイント、URL、URIについて簡単にまとめたいと思います。

URI(Uniform Resource Identifier)

インターネット上やネットワーク内の資源(リソース)を識別する文字列
URLやURN(名前のみを示す識別子)はすべて URI の一種

URL(Uniform Resource Locator)

URI の一種で、リソースの場所(アクセス先)を示すアドレス
例:https://api.example.com/v1/users のように、プロトコル・ホスト名・パスなどが含まれる

エンドポイント

API を提供する「窓口」や「呼び出し先」を指す用語。
「どの HTTP メソッドを使って、どの URI(パス)にアクセスするか」で定義されている。
例:POST /v1/coupons/byItem は「クーポンを商品から取得する」というエンドポイント

まとめると…

URI は「リソース識別子」。例:/v1/coupons/byItem
URL は「アクセス可能なアドレス」。例:https://host/v1/...
エンドポイント は「HTTPメソッド+URI」、例:POST /v1/coupons/byItem

参考記事・サイト

 

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?