PUT /jobs/submit
Executable (*.bin
, *.hex
or *.elf
file) is the request body.
Name | Type | Description |
---|---|---|
duration_limit_seconds | int | Time limit for the job execution |
board | string | Board to run the test on |
comment | string | The comment can be used to assign a title or description to the job. (optional) |
curl -T example.elf -X PUT "https://hwut.de/apiv1/jobs/submit?board=nucleo-f303re&duration_limit_seconds=5"
201 Created
Header Location: /jobs/42
Status and more information about the created job can be retrieved from the url in the Location header field.
Get number of tracks
GET /job/{id}
curl -X GET "https://hwut.de/apiv1/jobs/42"
200 OK
{
"id": 42,
"created": "2020-01-01 00:00:00.000000",
"status": "RUNNING",
"owner": "user"
}
or if the user is the owner of the job:
{
"id": 42,
"created": "2020-01-01 00:00:00.000000",
"status": "RUNNING",
"owner": "user",
"comment": "Bla blubb comment",
"duration_limit_seconds": 120,
"filename_executable": "xs4IsRBCGs_RWCRUXgOZfs0e20aWFJLWecndiFBJG34",
"filename_log": null,
"filename_other": null,
"board": "nucleo-f303re"
}
Cancel a job
DELETE /job/{id}
curl -X DELETE "https://hwut.de/apiv1/jobs/42"
204 No Content
or
400 Bad request - 'Unable to cancel job. Current job status: FINISHED'
if the job cannot be cancel.
Check if a job has finished
GET /job/{id}/is_finished
curl -X GET "https://hwut.de/apiv1/jobs/42/is_finished"
204 No Content
if the job has finished
or
404 Not found
if the job has not yet finished.
Get list of jobs
GET /jobs
Name | Type | Description |
---|---|---|
limit | int | Number of jobs to include in the response (optional, default 50) |
offset | int | Offset from the first job to include in the response (optional, default 0) |
Note: Parameters are not implemented yet.
curl -X GET "https://hwut.de/apiv1/jobs"
200 OK
[
{
"id": 42,
"created": "2020-01-01 00:00:00.000000",
"status": "RUNNING",
"owner": "user"
},
{...}
]
GET /job/{id}/log
curl -X GET "https://hwut.de/apiv1/jobs/42/log"
200 OK
and the log file (MIME type 'text/plain') as response body.
404 Not found
if the log is not available, e.g. is the job is not finished.
Get number of tracks
GET /track/num
Name | Type | Description |
---|---|---|
user_track | array of ints | Description (optional) |
curl -X GET "https://hwut.de/apiv1/jobs/42"
Status 200 OK