API リファレンス

プロジェクトのAPI仕様について記載します。

エンドポイント一覧

GET /api/example

機能の説明

リクエスト

GET /api/example HTTP/1.1
Host: example.com
Authorization: Bearer {token}

レスポンス

{
  "status": "success",
  "data": {
    "id": 1,
    "name": "Example"
  }
}

POST /api/example

機能の説明

リクエスト

POST /api/example HTTP/1.1
Host: example.com
Content-Type: application/json

{
  "name": "New Example"
}

レスポンス

{
  "status": "success",
  "data": {
    "id": 2,
    "name": "New Example"
  }
}

認証

API認証の方法について記載します。

エラーレスポンス

エラー時のレスポンス形式について記載します。

{
  "status": "error",
  "message": "Error description",
  "code": "ERROR_CODE"
}

レート制限

APIのレート制限について記載します。