REST API Design
Skill files10 files

references/

scripts/

templates/

SKILL.md91 lines
1
---
2
name: rest-api-design
3
description: >
4
Design RESTful APIs following best practices for resource modeling, HTTP
5
methods, status codes, versioning, and documentation. Use when creating new
6
APIs, designing endpoints, or improving existing API architecture.
7
---
8
9
# REST API Design
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
Design REST APIs that are intuitive, consistent, and follow industry best practices for resource-oriented architecture.
22
23
## When to Use
24
25
- Designing new RESTful APIs
26
- Creating endpoint structures
27
- Defining request/response formats
28
- Implementing API versioning
29
- Documenting API specifications
30
- Refactoring existing APIs
31
32
## Quick Start
33
34
Minimal working example:
35
36
```
37
✅ Good Resource Names (Nouns, Plural)
38
GET /api/users
39
GET /api/users/123
40
GET /api/users/123/orders
41
POST /api/products
42
DELETE /api/products/456
43
44
❌ Bad Resource Names (Verbs, Inconsistent)
45
GET /api/getUsers
46
POST /api/createProduct
47
GET /api/user/123 (inconsistent singular/plural)
48
```
49
50
## Reference Guides
51
52
Detailed implementations in the `references/` directory:
53
54
| Guide | Contents |
55
|---|---|
56
| [Resource Naming](references/resource-naming.md) | Resource Naming, HTTP Methods & Operations |
57
| [Request Examples](references/request-examples.md) | Request Examples |
58
| [Query Parameters](references/query-parameters.md) | Query Parameters |
59
| [Response Formats](references/response-formats.md) | Response Formats |
60
| [HTTP Status Codes](references/http-status-codes.md) | HTTP Status Codes, API Versioning, Authentication & Security, Rate Limiting Headers |
61
| [OpenAPI Documentation](references/openapi-documentation.md) | OpenAPI Documentation |
62
| [Complete Example: Express.js](references/complete-example-expressjs.md) | const express = require("express"); |
63
64
## Best Practices
65
66
### ✅ DO
67
68
- Use nouns for resources, not verbs
69
- Use plural names for collections
70
- Be consistent with naming conventions
71
- Return appropriate HTTP status codes
72
- Include pagination for collections
73
- Provide filtering and sorting options
74
- Version your API
75
- Document thoroughly with OpenAPI
76
- Use HTTPS
77
- Implement rate limiting
78
- Provide clear error messages
79
- Use ISO 8601 for dates
80
81
### ❌ DON'T
82
83
- Use verbs in endpoint names
84
- Return 200 for errors
85
- Expose internal IDs unnecessarily
86
- Over-nest resources (max 2 levels)
87
- Use inconsistent naming
88
- Forget authentication
89
- Return sensitive data
90
- Break backward compatibility without versioning
91

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,412 prompts

More by @OpenSourceBuffGuy

See all
Chibi character 16 frame dance reference sheet prompt image

Chibi character 16 frame dance reference sheet

Creates a square 4x4 sheet of sixteen consecutive dance keyframes of an uploaded character, following numbered choreography steps with identity locked and secondary motion on hair and cloth.

image-prompt, character-sheet, multi-panel, dance, chibi, reference-image, character-consistency, character-design, full-body, white-background, illustration, structured-output, square-format, negative-prompt, gpt-image, for-artists, for-designers, game-assets, long-form, advanced

Running Man Pulled Back by Semi Chibi Double prompt image

Running Man Pulled Back by Semi Chibi Double

Makes a bright studio editorial photo of a running person from a reference photo, with a 3D semi-chibi double tugging their clothes back and realistic fabric tension.

image-prompt, gpt-image, reference-image, face-reference, negative-prompt, photorealistic, editorial, chibi, 3d-render, studio-lighting, white-background, fashion, portrait, full-body, motion-blur, whimsical, vertical-format, character-consistency, action-figure, fashion-shoot, pixar-style, soft-lighting, for-photographers, for-artists, humorous

Cornflower meadow path to a misty sailboat prompt image

Cornflower meadow path to a misty sailboat

Draws a portrait-format colored-pencil scene of a cornflower meadow with a winding path leading to a misty sea, a distant sailboat and a sunset sky.

image-prompt, illustration, landscape, flowers, ocean, dreamy, pastel, golden-hour, vertical-format, nano-banana, sketch, summer, for-artists, wallpaper, soft-lighting, wide-shot, high-angle

Reviews

Loading reviews…

Discussion

Loading comments…