api-patterns

Featured

API design: naming, versioning, pagination, idempotency, OpenAPI, error contracts and safe retries. Triggers: API design, REST, GraphQL, OpenAPI, Swagger, error response, HTTP status, rate limit.

AI & Automation 174 stars 21 forks Updated yesterday Apache-2.0

Install

View on GitHub

Quality Score: 94/100

Stars 20%
75
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# API Patterns Skill ## REST API Design ### Resource Naming ``` # Collection GET /api/v1/documents # List documents POST /api/v1/documents # Create document # Single resource GET /api/v1/documents/{id} # Get document PUT /api/v1/documents/{id} # Replace document PATCH /api/v1/documents/{id} # Update document DELETE /api/v1/documents/{id} # Delete document # Nested resources GET /api/v1/users/{id}/documents # User's documents ``` ### HTTP Status Codes | Code | Meaning | When to Use | |------|---------|-------------| | 200 | OK | Successful GET/PUT/PATCH | | 201 | Created | Successful POST | | 204 | No Content | Successful DELETE | | 400 | Bad Request | Malformed request or an established domain refusal | | 401 | Unauthorized | Missing/invalid auth | | 403 | Forbidden | No permission | | 404 | Not Found | Resource doesn't exist | | 405 | Method Not Allowed | Unsupported method; preserve Allow | | 409 | Conflict | Duplicate resource or current-state conflict | | 412 | Precondition Failed | Supplied concurrency version is stale | | 422 | Unprocessable | Validation error | | 428 | Precondition Required | Required concurrency precondition is missing | | 429 | Too Many Requests | Rate limited | | 500 | Internal Error | Server error | | 503 | Service Unavailable | Dependency temporarily unavailable | ### Response Format Follow the host's existing resource and collection contract. This envelope is illustrative; do not impose it on a frame...

Details

Author
softspark
Repository
softspark/ai-toolkit
Created
5 months ago
Last Updated
yesterday
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category