Skip to content

Get Article

  Method: GET

/api/ps/articles/{ID}

Code samples

await fetch('/api/ps/articles/{ID}', {
    method: 'GET'
}).then(async (response) => {
    console.log(response)
})
  HTTP response status codes
Status code Description
200 OK
404 Resource not found
500 Internal Error

  Status: 200

{
    "id": 1,
    "title": "Title",
    "description": "Description",
    "content": "Content",
    "titleRu": "Title",
    "descriptionRu": "Description",
    "contentRu": "Content",
    "category": "OTHER",
    "listImage": "https://keygenqt.com/images/blog/601076d399c15.jpg",
    "viewImage": "https://keygenqt.com/images/blog/601076d399c15.jpg",
    "isPublished": false,
    "isLike": false,
    "uploads": [
        {
            "id": 1,
            "fileName": "d523f3fb-a8fe-49d9-9e67-3ce8b3231037.png",
            "fileMime": "image/png",
            "originalFileName": "screenshot-17.png",
            "createAt": 1661592987307
        }
    ]
}

  Status: 404

{
    "code": 404,
    "message": "Resource not found"
}

  Status: 500

{
    "code": 500,
    "message": "Internal Error"
}