Tasks

List tasks

List tasks on all your servers.

GET /api/tasks

Example request :

curl "https://cloud.boxydev.com/api/tasks" \
    -H "Authorization: Bearer {token}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json"

Example response :

{
    "data": [
        {
            "id": 1,
            "name": "A Task",
            "as_user": "root",
            "output": "output",
            "success": true,
            "status": "finished",
            "server_id": 1,
            "user_id": 1,
            "created_at": "2022-08-17T18:10:37.000000Z"
        }
    ],
    "links": {
        "first": "https://cloud.boxydev.com/api/tasks?page=1",
        "last": "https://cloud.boxydev.com/api/tasks?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://cloud.boxydev.com/api/tasks",
        "per_page": 20,
        "to": 1,
        "total": 1
    }
}

Get server tasks

Show tasks on a server.

GET /api/server/{id}/tasks

Example request :

curl "https://cloud.boxydev.com/api/server/1/tasks" \
    -H "Authorization: Bearer {token}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json"

Example response :

{
    "data": [
        {
            "id": 1,
            "name": "A Task",
            "as_user": "root",
            "output": "output",
            "success": true,
            "status": "finished",
            "server_id": 1,
            "user_id": 1,
            "created_at": "2022-08-17T18:10:37.000000Z"
        }
    ],
    "links": {
        "first": "https://cloud.boxydev.com/api/server/1/tasks?page=1",
        "last": "https://cloud.boxydev.com/api/server/1/tasks?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://cloud.boxydev.com/api/server/1/tasks",
        "per_page": 20,
        "to": 1,
        "total": 1
    }
}