Get Project Detail
Get detailed information of a single project by ID.
Interface Information
- Endpoint:
GET /api/projects/:id - Authentication: Not required (public interface)
- Content-Type:
application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | number | Yes | Project ID |
Response Fields
| Field Name | Type | Description |
|---|---|---|
| id | number | Project ID |
| title | string | Project title |
| description | string | Project description |
| content | string | Project detailed content (Markdown) |
| coverImage | string | Cover image URL |
| demoUrl | string | Demo link |
| repoUrl | string | Code repository link |
| techStack | array | Technology stack tags |
| screenshots | array | Project screenshot list |
| likeCount | number | Like count |
| viewCount | number | View count |
| status | string | Status: published/draft |
| createdAt | string | Creation time |
| updatedAt | string | Update time |
Request Example
bash
curl http://localhost:3000/api/projects/1Response Example
json
{
"success": true,
"data": {
"id": 1,
"title": "Personal Blog System",
"description": "Modern blog system based on Nuxt.js 3",
"content": "# Project Introduction\n\nDetailed project introduction content...",
"coverImage": "https://example.com/project1.jpg",
"demoUrl": "https://demo.example.com",
"repoUrl": "https://github.com/user/blog",
"techStack": ["Nuxt.js", "TypeScript", "Tailwind CSS"],
"screenshots": [
"https://example.com/screenshot1.jpg",
"https://example.com/screenshot2.jpg"
],
"likeCount": 45,
"viewCount": 230,
"status": "published",
"createdAt": "2024-01-15T10:00:00.000Z",
"updatedAt": "2024-01-20T15:30:00.000Z"
}
}Error Responses
| HTTP Status Code | Description |
|---|---|
| 404 | Project does not exist |
| 500 | Server error |