Skip to content

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

ParameterTypeRequiredDescription
idnumberYesProject ID

Response Fields

Field NameTypeDescription
idnumberProject ID
titlestringProject title
descriptionstringProject description
contentstringProject detailed content (Markdown)
coverImagestringCover image URL
demoUrlstringDemo link
repoUrlstringCode repository link
techStackarrayTechnology stack tags
screenshotsarrayProject screenshot list
likeCountnumberLike count
viewCountnumberView count
statusstringStatus: published/draft
createdAtstringCreation time
updatedAtstringUpdate time

Request Example

bash
curl http://localhost:3000/api/projects/1

Response 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 CodeDescription
404Project does not exist
500Server error