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?

More than 3 years have passed since last update.

APIサーバが返却する主なHTTPステータスをメモ

0
Last updated at Posted at 2021-08-16

概要

APIサーバを構築するときに返却する主なHTTPステータス

注意点

  • あくまで個人的にメモしてるだけなので世の中のスタンダードではない
  • 実装方法は載せてない(APIサーバの実装は色々あるから)

HTTPステータス

成功

ステータス 説明
200 OK リクエストの成功
201 Created リクエストは成功し、その結果新たなリソースが作成された
204 No Content リクエストの成功(レスポンスボディなし)

失敗

クライアントエラー

ステータス 説明 メッセージ
400 Bad Request 不正なリクエストでサーバがリクエストを理解できない Missing a required parameter.
401 Unauthorized 認証失敗 No valid API key(Access Token) provided.
403 Forbidden 認可失敗 You do not have access permission.
404 Not Found 指定したリソースが存在しない The requested resource doesn't exist.

異常

サーバエラー

ステータス 説明
500 Internal Server Error 不明なエラーが発生
503 Service Unavailable APIサーバが利用できない状態
504 Gateway Timeout リクエストタイムアウトが発生
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?