Restful Apis

RESTful API architecture and implementation patterns

ffsshhttiikk 8efa629 861 B Updated

File contents

What I do

  • Design RESTful endpoints
  • Use proper HTTP verbs
  • Implement HATEOAS
  • Handle errors consistently
  • Add pagination
  • Version APIs

When to use me

When designing and building RESTful web services.

Resources & Endpoints

GET    /api/v1/users          - List
GET    /api/v1/users/:id       - Retrieve
POST   /api/v1/users           - Create
PATCH  /api/v1/users/:id       - Update
DELETE /api/v1/users/:id       - Delete

GET    /api/v1/users/:id/posts - User's posts
POST   /api/v1/users/:id/posts - Create post for user

Query Parameters

?page=2&limit=20     - Pagination
?sort=-created_at    - Sorting
?status=active       - Filtering
?fields=name,email   - Field selection
?include=posts       - Related resources

ffsshhttiikk/opencode-agents-skills/tree/main/restful-apis commit 8efa629fe7

Frequently asked questions

npx skillmds@latest add ffsshhttiikk/restful-apis