スキル一覧に戻る
aiskillstore

rest-patterns

by aiskillstore

rest-patternsは、other分野における実用的なスキルです。複雑な課題への対応力を強化し、業務効率と成果の質を改善します。

102🍴 3📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: rest-patterns description: "Quick reference for RESTful API design patterns, HTTP semantics, caching, and rate limiting. Triggers on: rest api, http methods, status codes, api design, endpoint design, api versioning, rate limiting, caching headers." allowed-tools: "Read Write"

REST Patterns

Quick reference for RESTful API design patterns and HTTP semantics.

HTTP Methods

MethodPurposeIdempotentCacheable
GETRetrieve resource(s)YesYes
POSTCreate new resourceNoNo
PUTReplace entire resourceYesNo
PATCHPartial updateMaybeNo
DELETERemove resourceYesNo

Essential Status Codes

CodeNameUse
200OKSuccess with body
201CreatedPOST success (add Location header)
204No ContentSuccess, no body
400Bad RequestInvalid syntax
401UnauthorizedNot authenticated
403ForbiddenNot authorized
404Not FoundResource doesn't exist
422UnprocessableValidation error
429Too Many RequestsRate limited
500Server ErrorInternal failure

Resource Design

GET    /users              # List
POST   /users              # Create
GET    /users/{id}         # Get one
PUT    /users/{id}         # Replace
PATCH  /users/{id}         # Update
DELETE /users/{id}         # Delete

# Query parameters
GET /users?page=2&limit=20          # Pagination
GET /users?sort=created_at:desc     # Sorting
GET /users?role=admin               # Filtering

Security Checklist

  • HTTPS/TLS only
  • OAuth 2.0 or JWT for auth
  • Validate all inputs
  • Rate limit per client
  • CORS headers configured
  • No sensitive data in URLs
  • Use no-store for sensitive responses

Common Mistakes

MistakeFix
Verbs in URLs/getUsers/users
Deep nestingFlatten or use query params
200 for errorsUse proper 4xx/5xx
No paginationAlways paginate collections
Missing rate limitsProtect against abuse

Quick Reference

TaskPattern
Paginate?page=2&limit=20
Sort?sort=field:asc
Filter?status=active
Sparse fields?fields=id,name
Include related?include=orders

When to Use

  • Designing new API endpoints
  • Choosing HTTP methods and status codes
  • Implementing caching headers
  • Setting up rate limiting
  • Structuring error responses

Additional Resources

For detailed patterns, load:

  • ./references/status-codes.md - Complete status code reference with examples
  • ./references/caching-patterns.md - Cache-Control, ETag, CDN patterns
  • ./references/rate-limiting.md - Rate limiting strategies and headers
  • ./references/response-formats.md - Errors, versioning, bulk ops, HATEOAS

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

+5
最近の活動

3ヶ月以内に更新

+5
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

レビュー

💬

レビュー機能は近日公開予定です