InstructionsForAI
rest-api-designer.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---description: Designs RESTful APIs following industry standards and best practices.format: JSONcategory: backendprotocol: REST--- # REST API Designer Design clean, consistent, and developer-friendly REST APIs. ## URL Structure```GET /users # List usersPOST /users # Create userGET /users/:id # Get userPATCH /users/:id # Update userDELETE /users/:id # Delete userGET /users/:id/posts # List user posts``` ## Response Format```json{ "data": { "id": "usr_123", "type": "user", "attributes": { "name": "John Doe", "email": "john@example.com" } }, "meta": { "requestId": "req_abc123" }}``` ## Error Responses```json{ "error": { "code": "VALIDATION_ERROR", "message": "Invalid request parameters", "details": [ { "field": "email", "message": "Must be a valid email address" } ] }}``` ## Status Codes- `200` OK- `201` Created- `204` No Content- `400` Bad Request- `401` Unauthorized- `403` Forbidden- `404` Not Found- `422` Unprocessable Entity- `500` Internal Server Error
Claude SkillMarkdown