mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 08:24:20 +01:00
The docs tree had sprawled into ~40 overlapping/singleton/empty directories. Consolidated (history preserved via git rename detection; links rewritten so no previously-working link broke): - architecture/ ← adr/, database/, + loose *_ARCHITECTURE / my-cat specs - development/ ← standards, contributing, guides, examples, templates, components, ai - operations/ ← devops (+runbooks), deployment, supabase - design-system/← design, UX, ux-improvements, branding - reference/ ← api, changelog, content, misc - forward-looking/ ← planning, improvements, implementation - archive/2026-h1/ ← point-in-time reports/plans that were loose at docs/ root - removed empty docs/analysis/; rewrote docs/README.md as a current index Verified: non-README relative-link health 81→83 OK (0 regressions, same 64 pre-existing-rot broken); all new README links resolve; external refs in .claude/ + root repointed to moved targets. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3.5 KiB
3.5 KiB
created_date, last_modified_date, last_modified_summary
| created_date | last_modified_date | last_modified_summary |
|---|---|---|
| YYYY-MM-DD | YYYY-MM-DD | Initial creation |
API Endpoint: [Endpoint Name]
Overview
Brief description of what this API endpoint does and its purpose in the system.
Endpoint
METHOD /api/path/to/endpoint
Authentication
- Required: [Yes/No]
- Authentication method: [Bearer token/API key/etc.]
- Required permissions: [List of required permissions]
Request
Headers
Content-Type: application/json
Authorization: Bearer <token>
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
string | Yes | The unique identifier |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit |
number | No | 20 | Maximum number of results to return |
offset |
number | No | 0 | Number of results to skip |
Request Body
interface RequestBody {
name: string;
description?: string;
metadata?: Record<string, any>;
}
Example:
{
"name": "Example Item",
"description": "This is an example",
"metadata": {
"tags": ["example", "demo"]
}
}
Response
Success Response (200)
interface SuccessResponse {
success: true;
data: ResponseData;
message: string;
}
Example:
{
"success": true,
"data": {
"id": "123",
"name": "Example Item",
"created_at": "2024-01-01T00:00:00Z"
},
"message": "Item created successfully"
}
Error Responses
400 Bad Request
{
"error": "Validation failed",
"details": [
{
"field": "name",
"message": "Name is required"
}
]
}
401 Unauthorized
{
"error": "Authentication required"
}
403 Forbidden
{
"error": "Insufficient permissions"
}
404 Not Found
{
"error": "Resource not found"
}
500 Internal Server Error
{
"error": "Internal server error"
}
Rate Limiting
- Limit: [X requests per time period]
- Example: 100 requests per minute
Examples
cURL
curl -X POST \
https://api.example.com/api/endpoint \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-token" \
-d '{
"name": "Example Item",
"description": "Example description"
}'
JavaScript (fetch)
const response = await fetch('/api/endpoint', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({
name: 'Example Item',
description: 'Example description',
}),
});
const result = await response.json();
Validation Rules
name: Required, string, 1-100 charactersdescription: Optional, string, max 500 charactersmetadata: Optional, valid JSON object, max 10KB
Error Handling
- All errors follow the standard error response format
- Validation errors include detailed field-level information
- Network errors should be retried with exponential backoff
Related Endpoints
GET /api/endpoint- List all itemsGET /api/endpoint/{id}- Get specific itemPUT /api/endpoint/{id}- Update itemDELETE /api/endpoint/{id}- Delete item
Changelog
- YYYY-MM-DD: Initial implementation
- YYYY-MM-DD: Added validation for metadata field