Skip to content

Search articles API #26

@jing8956

Description

@jing8956

Request

URI: api/v1/articles
HttpMethod: GET
URI Parameters:
Request Body:

{
  “pageIndex":           int,           //页码
  "pageSize":            int,           //每页包含的文章个数
  "title":               "string",      //主标题(模糊查询)
  "author":              "string",      //作者 (模糊查询)
  "isPublished":          bool?,        //是否发布
  "startPublishDate":     DateTime?,    //起始发布时间(包含)
  "endPublishDate":       DateTime?,    //终止发布时间(包含)
  "categoryIds":         [ "string(ObjectId)[]" ], //分类ID
}

Response:

Success
Http Code: 200 OK
Response Body:

{
  "count": int, // 匹配的文章总条数
  "data":
  [
    {
      "id":               ObjectId,   //文章ID
      "title":            "string",   //主标题
      "subTitle":         "string",   //副标题
      "shortDescription": "string",   //摘要
      "content":          "string",   //文章内容
      "coverImage":       "string(ObjectId)", //封面图片
      "author":           "string",   //作者
      "isPublished":      bool,       //是否发布
      "publishDate":      DateTime,   //发布时间
      "referenceUrl":     "string",   //文章引用来源
      "visitCount":       int,        //访问次数
      "categoryIds":    [ "string(ObjectId)" ], //分类ID
      "attachmentIds":  [ "string(ObjectId)" ]  //附件
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureproposeused for propose a new feature or restful api

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions