Log site

Get the latest logs from a site.


GET/api/servers/{server}/sites/{id}/log

Get site logs

This endpoint returns the latest log entries for a specific site.

Request

GET
/api/servers/{server}/sites/{id}/log
curl -G "https://ploi.io/api/servers/{server}/sites/{id}/log" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"

Response

{
  "data": [
    {
      "id": 2,
      "description": "Revoke LetsEncrypt SSL certificate",
      "content": "SSL file exists\nDid not find SSL file to revoke...",
      "type": null,
      "created_at": "2020-09-02 12:59:27",
      "created_at_human": "1 day ago"
    },
    {
      "id": 1,
      "description": "Pull git changes",
      "content": "Wed Sep  2 11:51:53 CEST 2020\nFrom https://bitbucket.org/user/repository...",
      "type": "deploy",
      "created_at": "2020-09-02 11:51:55",
      "created_at_human": "1 day ago"
    }
  ],
  "links": {
    "first": "https://ploi.io/api/servers/1/sites/1/log?page=1",
    "last": "https://ploi.io/api/servers/1/sites/1/log?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "path": "https://ploi.io/api/servers/1/sites/1/log",
    "per_page": 15,
    "to": 9,
    "total": 9
  }
}