Skip to content

Get Project List

Get list of all published projects, with pagination and filtering support.

Interface Information

  • Endpoint: GET /api/projects
  • Authentication: Not required (public interface)
  • Content-Type: application/json

Query Parameters

ParameterTypeRequiredDescription
pagenumberNoPage number, default 1
limitnumberNoItems per page, default 10
categorynumberNoCategory ID filter
statusstringNoStatus filter: published/draft

Response Fields

Field NameTypeDescription
dataarrayProject list
totalnumberTotal records
pagenumberCurrent page number
limitnumberItems per page
totalPagesnumberTotal pages

Project Fields

Field NameTypeDescription
idnumberProject ID
titlestringProject title
descriptionstringProject description
coverImagestringCover image URL
demoUrlstringDemo link
repoUrlstringCode repository link
techStackarrayTechnology stack tags
likeCountnumberLike count
viewCountnumberView count
statusstringStatus: published/draft
createdAtstringCreation time

Request Examples

bash
# Get first page
curl http://localhost:3000/api/projects

# Get page 2, 20 per page
curl http://localhost:3000/api/projects?page=2&limit=20

# Filter by category
curl http://localhost:3000/api/projects?category=1

Response Example

json
{
  "success": true,
  "data": [
    {
      "id": 1,
      "title": "Personal Blog System",
      "description": "Modern blog system based on Nuxt.js 3",
      "coverImage": "https://example.com/project1.jpg",
      "demoUrl": "https://demo.example.com",
      "repoUrl": "https://github.com/user/blog",
      "techStack": ["Nuxt.js", "TypeScript", "Tailwind CSS"],
      "likeCount": 45,
      "viewCount": 230,
      "status": "published",
      "createdAt": "2024-01-15T10:00:00.000Z"
    }
  ],
  "total": 100,
  "page": 1,
  "limit": 10,
  "totalPages": 10
}

Error Responses

HTTP Status CodeDescription
400Parameter error
500Server error