Skip to content

Worker Management API

Worker management APIs are located at /api/workers.

Registering

Register runner to a given name. Return the runner id.

URL

/api/workers/register

Method

POST

Parameters

1
2
3
{
    "name": String
}

Return Value

1
2
3
{
    "workerId": String
}

Listing Workers

List currently registered workers.

URL

/api/workers/list

Method

GET

Parameters

None.

Return Value

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
{
    "workers": [{
        "workerId": String,
        "name": String,
        "gpuStatus": [{
            "name": String,
            "memUsage": {
                "used": Double,
                "capacity": Double
            }
        }],
        "pendingTasks": [RunnableGraph]
    }]
}

Reporting Worker GPU Usage

Report current GPU usage statistics.

URL

/api/workers/reportGpu

Method

POST

Parameters

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
    "workerId": String,
    "name": String,
    "gpuStatus": [{
        "name": String,
        "memUsage": {
            "used": Double,
            "capacity": Double
        }
    }]
}

Return Value

If the GPU status is updated successfully, the reported GPU statistics will be returned.

Fetching Worker Tasks

Fetch the pending tasks of the given worker.

URL

/api/workers/fetchTasks?workerId={worker_id}

Method

GET

Parameters

Given in the URL.

Return Value

1
2
3
{
    "tasks": [RunnableGraph]
}

Reporting Task Results

Report task results.

URL

/api/workers/reportResult?workerId={worker_id}

Method

POST

Parameters

1
2
3
4
5
6
{
    "expId": String,
    "graphId": String,
    "taskId": String,
    "results": Object
}

Return Value

None.