Ploi API

Log site

Get latest logs from a site

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

Example request:

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

Example response:

{
    "data": [
        {
            "id": 2,
            "description": "Revoke LetsEncrypt SSL certificate",
            "content": "SSL file exists\nDid not find SSL file to revoke\nDid not found archive directory, all OK\nDid not foun...",
            "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\n * branch...",
            "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
    }
}