5.5 KiB
Manager API
Tasks
Create new task
Send task definition to the manager. This will trigger the task compiler. Returns 202
POST /tasks HTTP/1.1
Request
Property |
Type |
Description |
|---|---|---|
priority |
integer |
The priority |
settings |
string |
Settings for the task, which will be interpreted by the compiler |
task_id |
integer |
|
type |
string |
The compiler to use |
parser |
string |
The parser to use against such task |
Response
Property |
Type |
Description |
|---|---|---|
id |
integer |
The id of a project |
worker_id |
integer |
|
priority |
integer |
|
frame_start |
integer |
|
frame_end |
integer |
|
frame_current |
integer |
|
status |
string |
|
format |
string |
HTTP/1.1 202 OK Vary: Accept Content-Type: text/javascript { "id" : 12, "worker_id" : 1, "priority" : 10, "frame_start" : 5, "frame_end" : 10, "frame_current" : 5, "status" : "rendering", "format" : "" }
Update task
Partially update a task. Returns 204.
PATCH /tasks/1 HTTP/1.1
Delete task
Delete a task. Returns 202.
DELETE /tasks/1 HTTP/1.1
Workers
Get list of workers
Get the list of available workers. In case of virtual workers (or in general a private manager).
GET /workers HTTP/1.1
Response
Property |
Type |
Description |
|---|---|---|
host_name |
object |
Properties of a worker |
HTTP/1.1 200 OK Vary: Accept Content-Type: text/javascript { "fsiddi-macpro.local": { "activity": null, "connection": "online", "current_task": null, "hostname": "fsiddi-macpro.local", "id": 1, "ip_address": "127.0.0.1", "log": null, "port": 5000, "status": "enabled", "system": "Darwin 14.1.0", "time_cost": null } }
Register worker
This happens when a worker registers itself with the manager. Should be automatic.
POST /workers HTTP/1.1
Request
Property |
Type |
Description |
|---|---|---|
hostname |
string |
The hostname of the worker |
system |
string |
The OS of the worker |
Response
Property |
Type |
Description |
|---|---|---|
host_name |
object |
Properties of a worker |
HTTP/1.1 204 OK Vary: Accept Content-Type: text/javascript { "fsiddi-macpro.local": { "activity": null, "connection": "online", "current_task": null, "hostname": "fsiddi-macpro.local", "id": 1, "ip_address": "127.0.0.1", "log": null, "port": 5000, "status": "enabled", "system": "Darwin 14.1.0", "time_cost": null } }
Get worker info
Display worker info - assuming the worker is running.
GET /workers/1 HTTP/1.1
Request
Property |
Type |
Description |
|---|---|---|
id |
integer |
The worker id |
Response
Property |
Type |
Description |
|---|---|---|
hostname |
string |
Hostname of the worker |
mac_address |
string |
|
system |
string |
|
update_frequent |
object |
|
update_less_frequent |
object |
HTTP/1.1 204 OK Vary: Accept Content-Type: text/javascript { "hostname": "fsiddi-macpro.local", "mac_address": 158929712651, "system": "Darwin 14.1.0", "update_frequent": { "load_average": { "15min": 2.18, "1min": 2.18, "5min": 2.11 }, "worker_cpu_percent": 7.0 }, "update_less_frequent": { "worker_architecture": "x86_64", "worker_disk_percent": 90.7, "worker_mem_percent": 56.7, "worker_num_cpus": 16 } }
Edit worker status
Edit worker status and returns it. This request comes from ther worker.
PATCH /workers/1 HTTP/1.1
Request
Property |
Type |
Description |
|---|---|---|
status |
integer |
The status. Currently supports rendering, available. |
Response
Property |
Type |
Description |
|---|---|---|
task_id |
integer |
Id of the task currently assigned to the worker |
HTTP/1.1 200 OK Vary: Accept Content-Type: text/javascript { "task_id": 1 }