api-patterns

Solid

REST/GraphQL API design: naming, versioning, pagination, idempotency, OpenAPI. Triggers: API design, REST, GraphQL, OpenAPI, Swagger, idempotency, rate limit.

AI & Automation 155 stars 19 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
73
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
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 | Invalid input | | 401 | Unauthorized | Missing/invalid auth | | 403 | Forbidden | No permission | | 404 | Not Found | Resource doesn't exist | | 409 | Conflict | Duplicate resource | | 422 | Unprocessable | Validation error | | 429 | Too Many Requests | Rate limited | | 500 | Internal Error | Server error | ### Response Format ```json { "data": { "id": "123", "type": "document", "attributes": { "title": "Example", "content": "..." } }, "meta": { "total": 100, "page": 1, "per_page": 10 } } ``` ### Error Response ```json { "error": { "code": "VALIDATION_ERROR", "message": "Invalid input", "details": [ {"field": "title", "message": "Title is required"}, {"field": "limit", "message": "Must be between 1 and 100"}...

Details

Author
softspark
Repository
softspark/ai-toolkit
Created
2 months ago
Last Updated
2 days ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category