Skip to content

Latest commit

 

History

History
212 lines (138 loc) · 2.25 KB

rest-api.adoc

File metadata and controls

212 lines (138 loc) · 2.25 KB

REST API

Sequence diagram

Data Read Success

Endpoints

Add task

Create new task given a serialized specification. If same specification is already running, it will be rejected.

PUT /tasks

Parameters

None.

Headers

content-type

application/json

Request body

Specification payload.

Response codes

201

Created new task

409

Reject task. It is already running.

400

Bad request. Probably not a PUT operation.

Get tasks

Get task list of running workers.

GET /tasks

Parameters

None.

Headers

content-type

application/json

Request body

None.

Response codes

200

Resource found

Cancel task

DELETE /tasks/{workerId}

Cancel a running task.

Parameters

workerId

WorkerID to terminate.

Headers

None.

Request body

None.

Response codes

200

Task terminated

400

Unable to cancel task

Get health

GET /health

Get health information.

Parameters

all

Render all health resources

config

Render configuration

contexts

Render web server controller info

runtime

Render vm runtime info

threads

Render threads and stack-traces

Request body

JSON payload.

Response codes

200

Resource found

Get health alive

GET /health/alive

Check if server is responding.

Parameters

None.

Headers

None.

Request body

None.

Response codes

200

Resource found

Get health ready

GET /health/ready

Check if server is healthy.

Parameters

None.

Headers

None

Request body

None.

Response codes

200

Everything seems good.

503

Restart service is required.