Login/Register
Installatron Server
API Documentation

View Tasks

GET /tasks

List currently executing and recently completed tasks.

Parameters


API

/tasks
API endpoint.
GET
Method.

Optional parameters

user
string
Change scope to this Installatron Server admin, reseller, or user.

default is the current user

Optional pagination parameters

offset
integer
The offset, from the beginning of the full list of results, to begin showing from.

See total_count in the response to find the total number of results: total_count / limit = page count

default is
0
limit
integer
The maximum number of entries to return.

default is
50

Special parameters

restart
boolean
true
to reset and restart all currently queued tasks. Running tasks are not affected. All other parameters will be ignored when this parameter is set
true
.

default is no restart

Response


Response

status
int
HTTP status code describing the result of the request.

200
for Success.
All other numbers represent errors which are described in the errcode output below.
result
boolean
true
= Success.
false
= Failure.
errcode
string
status code 403
invalid_api_key
The server's Installatron Server Key is invalid.
invalid_argument_user
User specified is not authorized to access this data.
status code 404
user_not_found
The specified user could not be found in the Installatron Server database.
message
string
Message describing the result of the request. Do not rely on this to determine the success or failure of the request.
data[]


id
string
Internal ID of this task.
(eg.
1234567890123456789
)
cmd
enum
The Installatron task performed.
  • browser/install
  • browser/import
  • browser/migrate
  • installs/status
  • installs/secure
  • installs/insecure
  • installs/view
  • installs/edit
  • installs/backup
  • installs/template
  • installs/clone
  • installs/sync
  • installs/update
  • installs/update/available
  • installs/detach
  • installs/uninstall
  • backups/view
  • backups/restore
  • backups/restoreto
  • templates/view
  • templates/edit
  • templates/delete
cpu
string
Path to the task cpu file.
(eg.
/var/installatron/tasks/task_cpu0
)
internal use only
install
string
Internal ID of the application this task was performed on or for.
(eg.
1234567890abcdefghij12345
)
message
string
Message describing the result of the request.
node
string
(Installatron Server only) Internal ID of the server executing the task.
pid
integer
PID of the task process.
(eg.
1234
)
percent
integer
Percentage of task complete.
(eg.
80
)
rate
(internal use only)
status
enum
Status of the task.
(eg.
processing
,
complete
,
abort
,
error
,
queued
)
time_created
integer
Date and time the task was created (as a Unix timestamp).
(eg.
1234567890
)
time_updated
integer
Date and time the running task was last updated (as a Unix timestamp). This field is omitted if the task has yet to start.
(eg.
1234567890
)
time_completed
integer
Date and time the task was completed (as a Unix timestamp). This field is omitted if the task is running.
(eg.
1234567890
)
title
string
Internal title of the website the task was performed on/for.
(eg.
My blog
)
url
string
URL of the website the task was performed on/for.
(eg.
http://website.com
)
user
string
Name of user the task is running for (or ran for).
(eg.
useraccountname
)

Full Examples

Example: View currently executing, queued, and recently-completed tasks

Method: curl
Installatron Product: Installatron Server (switch to Installatron Plugin)
curl -X POST https://{SERVER_IP}/tasks \
    -H 'X-API-KEY: {the key= or key2= value from /usr/local/installatron/etc/settings.ini}' \
    -H 'X-HTTP-Method-Override: GET' \
    -H 'Accept: application/json'
Response: json
{
    "result": true,
    "status": 200,
    "errcode": null,
    "errfield": null,
    "message": "The task is complete.\n"
    "total_count": 3,
    "has_more": false,
    "data":[
        {
            "id": "1234567890123456789",
            "cmd": "uninstall",
            "cpu": "/var/installatron/tasks/task_cpu0",
            "install": "1234567890abcdefghij12345",
            "message": "_tasks_uninstall_complete",
            "node": "",
            "pid": 1234,
            "percent": "100",
            "rate": 9999,
            "status": "complete",
            "time_created": 1234567890,
            "time_updated": 1234567890,
            "title": "My blog",
            "url": "https://www.website.com",
            "user": "useraccountname",
        },
        {
            "id": "1234567890123456789",
            "cmd": "uninstall",
            "cpu": "/var/installatron/tasks/task_cpu0",
            "install": "1234567890abcdefghij12345",
            "message": "_tasks_uninstall_complete",
            "node": "",
            "pid": 1234,
            "percent": "100",
            "rate": 9999,
            "status": "complete",
            "time_created": 1234567890,
            "time_updated": 1234567890,
            "title": "My blog",
            "url": "https://www.website.com",
            "user": "useraccountname",
        },
        {
            "id": "1234567890123456789",
            "cmd": "uninstall",
            "cpu": "/var/installatron/tasks/task_cpu0",
            "install": "1234567890abcdefghij12345",
            "message": "_tasks_uninstall_complete",
            "node": "",
            "pid": 1234,
            "percent": "100",
            "rate": 9999,
            "status": "complete",
            "time_created": 1234567890,
            "time_updated": 1234567890,
            "title": "My blog",
            "url": "https://www.website.com",
            "user": "useraccountname",
        },
    ]
},

Example: Reset and restart all currently executing tasks

Method: curl
Installatron Product: Installatron Server (switch to Installatron Plugin)
curl -X POST https://{SERVER_IP}/tasks \
    -H 'X-API-KEY: {the key= or key2= value from /usr/local/installatron/etc/settings.ini}' \
    -H 'X-HTTP-Method-Override: GET' \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json' \
    -d '
        {
            "restart": true
        }
       '
 
Response: json
{
    "result": true,
    "status": 200,
    "errcode": null,
    "errfield": null,
    "message": "The task is complete.\n"
    "total_count": 3,
    "has_more": false,
    "data":[
        {
            "id": "1234567890123456789",
            "cmd": "uninstall",
            "cpu": "/var/installatron/tasks/task_cpu0",
            "install": "1234567890abcdefghij12345",
            "message": "_tasks_uninstall_complete",
            "node": "",
            "pid": 1234,
            "percent": "100",
            "rate": 9999,
            "status": "complete",
            "time_created": 1234567890,
            "time_updated": 1234567890,
            "title": "My blog",
            "url": "https://www.website.com",
            "user": "useraccountname",
        },
        {
            "id": "1234567890123456789",
            "cmd": "uninstall",
            "cpu": "/var/installatron/tasks/task_cpu0",
            "install": "1234567890abcdefghij12345",
            "message": "_tasks_uninstall_complete",
            "node": "",
            "pid": 1234,
            "percent": "100",
            "rate": 9999,
            "status": "complete",
            "time_created": 1234567890,
            "time_updated": 1234567890,
            "title": "My blog",
            "url": "https://www.website.com",
            "user": "useraccountname",
        },
        {
            "id": "1234567890123456789",
            "cmd": "uninstall",
            "cpu": "/var/installatron/tasks/task_cpu0",
            "install": "1234567890abcdefghij12345",
            "message": "_tasks_uninstall_complete",
            "node": "",
            "pid": 1234,
            "percent": "100",
            "rate": 9999,
            "status": "complete",
            "time_created": 1234567890,
            "time_updated": 1234567890,
            "title": "My blog",
            "url": "https://www.website.com",
            "user": "useraccountname",
        },
    ]
},


© 2004 - 2025 Installatron LLC. All rights reserved. Privacy Policy.