rest-api-design
Skill2 starsChanged 11 months agoMITView on GitHub
REST API design patterns and MicroProfile OpenAPI documentation. Use when designing endpoints, choosing HTTP methods, status codes, or documenting APIs with OpenAPI annotations.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- 27Aaron/skillstheir own version, first seen Nov 1, 2026
- bsene/skillstheir own version, first seen Oct 25, 2026
- Meet-08/skillstheir own version, first seen Sep 27, 2026
- bm629/agent-skillstheir own version, first seen Aug 21, 2026
- anurag-azure/skillstheir own version, first seen Jun 27, 2026
- kimtth/agent-skill-100-lines-or-lesstheir own version, first seen Jun 26, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- bsene/skills★ 7same name
- 27Aaron/skills★ 2same name
- bm629/agent-skills★ 2same name
- kimtth/agent-skill-100-lines-or-less★ 2same name
- anurag-azure/skills★ 0same name
- dhriyatinandu-bot/claude-skills★ 0same name
- dkprog/claude-skills★ 0same name
- Meet-08/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- cdd-design-pillarsSkill
- clean-code-principlesSkill
- ddd-da-massaSkill
- gof-design-patternsSkill
- lombok-patternsSkill
- mapstruct-patternsSkill
- quarkus-panache-smellsSkill
- refactoring-catalogSkill
- testing-patternsSkill
The file
Files
REST API Design Best Practices
Design consistent, intuitive REST APIs with proper documentation.
Endpoint Design Rules
Use Nouns, Not Verbs
// ❌ Bad
@GET @Path("/getUsers")
@POST @Path("/createUser")
// ✓ Good
@GET @Path("/users")
@POST @Path("/users")Use Plural Nouns for Collections
@Path("/users") // Collection
@Path("/users/{id}") // Single resource
@Path("/orders") // Collection
@Path("/orders/{id}") // Single resourceNest Related Resources (Max 3 Levels)
@Path("/users/{userId}/orders") // User's orders
@Path("/users/{userId}/orders/{orderId}") // Specific order
@Path("/posts/{postId}/comments") // Post's commentsCookbook: endpoint-design.md
HTTP Methods
| Method | Purpose | Idempotent | Request Body |
GET | Retrieve | Yes | No |
POST | Create | No | Yes |
PUT | Replace entirely | Yes | Yes |
PATCH | Partial update | Yes | Yes |
DELETE | Remove | Yes | No |
Cookbook: http-methods.md
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 | Validation errors |
| 401 | Unauthorized | Missing/invalid auth |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource doesn't exist |
| 422 | Unprocessable Entity | Business rule violation |
| 500 | Internal Error | Unexpected server error |
Cookbook: status-codes.md
Filtering & Pagination
@GET
@Path("/products")
public List<Product> list(
@QueryParam("category") String category,
@QueryParam("minPrice") BigDecimal minPrice,
@QueryParam("sort") @DefaultValue("name") String sort,
@QueryParam("page") @DefaultValue("0") int page,
@QueryParam("size") @DefaultValue("20") int size
) { }Cookbook: filtering-pagination.md
API Versioning
// URL path versioning (recommended)
@Path("/v1/users")
public class UserResourceV1 { }
@Path("/v2/users")
public class UserResourceV2 { }Cookbook: versioning.md
MicroProfile OpenAPI Documentation
@Path("/users")
@Tag(name = "Users", description = "User management")
public class UserResource {
@GET
@Path("/{id}")
@Operation(summary = "Get user by ID")
@APIResponse(responseCode = "200", description = "User found")
@APIResponse(responseCode = "404", description = "User not found")
public User getById(@PathParam("id") Long id) { }
}Cookbook: openapi-documentation.md
Cookbook Index
Design: Endpoint Design · HTTP Methods
Responses: Status Codes
Querying: Filtering & Pagination
Evolving: Versioning
Documentation: OpenAPI Documentation
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

