| Component | Description | Example |
|---|---|---|
| HTTP Method | The action to perform | GET, POST, PUT, DELETE |
| Path | The URL path relative to base URL | /users/{id} |
| Parameters | Path, query, header, or body parameters | id (path parameter) |
| Request Body | Data sent with the request (for POST/PUT) | JSON schema |
| Responses | Expected response formats and status codes | 200 OK, 404 Not Found |
| Method | When to Use | Steps |
|---|---|---|
| Manual Creation | Starting from scratch | 1. Right-click folder β "New Endpoint" 2. Fill in method and path 3. Define parameters and responses |
| Import from Code | Existing API code | 1. Use "Import" feature 2. Upload OpenAPI/Swagger file 3. Map to modules |
| From Request | Testing existing APIs | 1. First send a request 2. Click "Save" 3. Refine the specification |
| Clone Existing | Similar endpoints | 1. Right-click endpoint β "Duplicate" 2. Modify path and parameters |
GET /users/{userId}/posts/{postId}| Parameter | Type | Required | Description |
|---|---|---|---|
userId | integer | Yes | Unique user identifier |
postId | integer | Yes | Post identifier |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | integer | No | 10 | Number of results to return |
offset | integer | No | 0 | Number of results to skip |
status | string | No | active | Filter by status |
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "User's full name"
},
"email": {
"type": "string",
"format": "email",
"description": "User's email address"
}
},
"required": ["name", "email"]
}{
"id": 123,
"name": "John Doe",
"email": "john@example.com",
"createdAt": "2023-01-15T10:30:00Z"
}| Status Code | Description | Schema |
|---|---|---|
400 | Bad Request | Error details |
401 | Unauthorized | Authentication error |
404 | Not Found | Resource not found |
500 | Internal Server Error | Server error details |