CoolFace
Apppublic

Anshviradiya/Software-Documentation-RAG

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes
api_documentation.html93 linesDownload Raw Back to sample_docs
1<!DOCTYPE html>
2<html lang="en">
3<head>
4    <meta charset="UTF-8">
5    <title>API Documentation - User Management</title>
6</head>
7<body>
8    <h1>User Management API</h1>
9    
10    <h2>Overview</h2>
11    <p>The User Management API provides endpoints for managing user accounts, authentication, and profiles.</p>
12    
13    <h2>Base URL</h2>
14    <code>https://api.example.com/v1</code>
15    
16    <h2>Authentication</h2>
17    <p>All API requests require authentication using an API key in the header:</p>
18    <pre>Authorization: Bearer YOUR_API_KEY</pre>
19    
20    <h2>Endpoints</h2>
21    
22    <h3>GET /users</h3>
23    <p>Retrieve a list of all users.</p>
24    <ul>
25        <li><strong>Method:</strong> GET</li>
26        <li><strong>Auth required:</strong> Yes</li>
27        <li><strong>Permissions:</strong> Admin</li>
28    </ul>
29    
30    <h4>Query Parameters</h4>
31    <ul>
32        <li><code>page</code> (integer): Page number (default: 1)</li>
33        <li><code>limit</code> (integer): Items per page (default: 20)</li>
34        <li><code>search</code> (string): Search by name or email</li>
35    </ul>
36    
37    <h4>Response</h4>
38    <pre>
39{
40    "users": [
41        {
42            "id": 1,
43            "name": "John Doe",
44            "email": "john@example.com",
45            "role": "admin"
46        }
47    ],
48    "total": 150,
49    "page": 1
50}
51    </pre>
52    
53    <h3>POST /users</h3>
54    <p>Create a new user account.</p>
55    <ul>
56        <li><strong>Method:</strong> POST</li>
57        <li><strong>Auth required:</strong> Yes</li>
58        <li><strong>Permissions:</strong> Admin</li>
59    </ul>
60    
61    <h4>Request Body</h4>
62    <pre>
63{
64    "name": "Jane Smith",
65    "email": "jane@example.com",
66    "password": "secure_password",
67    "role": "user"
68}
69    </pre>
70    
71    <h3>PUT /users/{id}</h3>
72    <p>Update user information.</p>
73    
74    <h3>DELETE /users/{id}</h3>
75    <p>Delete a user account.</p>
76    
77    <h2>Error Codes</h2>
78    <ul>
79        <li><code>400</code> - Bad Request</li>
80        <li><code>401</code> - Unauthorized</li>
81        <li><code>403</code> - Forbidden</li>
82        <li><code>404</code> - Not Found</li>
83        <li><code>500</code> - Internal Server Error</li>
84    </ul>
85    
86    <h2>Rate Limiting</h2>
87    <p>API requests are limited to 1000 requests per hour per API key.</p>
88    
89    <h2>Support</h2>
90    <p>For API support, contact <a href="mailto:api@example.com">api@example.com</a></p>
91</body>
92</html>
93