Skip to content

A visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.

1.9 KB
Raw Blame

[METHOD] /api/v1/[endpoint]

説明

このエンドポイントの動作の簡単な説明。

認証

必要な認証方式(例:Bearer トークン)。

パラメータ

Path Parameters

Name Type Required 説明
id string Yes リソース ID

Query Parameters

Name Type Required 説明
page integer No ページ番号(デフォルト: 1)
limit integer No 1 ページあたりの件数(デフォルト: 20)

Request Body

{
  "field": "value"
}

レスポンス

200 OK

{
  "success": true,
  "data": {
    "id": "123",
    "name": "Example"
  }
}

400 Bad Request

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid input"
  }
}

404 Not Found

{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found"
  }
}

サンプル

cURL

curl -X GET "https://api.example.com/api/v1/endpoint" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"

JavaScript

const response = await fetch('/api/v1/endpoint', {
  headers: {
    'Authorization': 'Bearer token',
    'Content-Type': 'application/json'
  }
});
const data = await response.json();

Python

import requests

response = requests.get(
    'https://api.example.com/api/v1/endpoint',
    headers={'Authorization': 'Bearer token'}
)
data = response.json()

レート制限

  • 認証済みユーザーは 1 時間あたり 1000 リクエスト
  • 公開エンドポイントは 1 時間あたり 100 リクエスト

関連エンドポイント