Mercurial > sci
comparison doc/api.md @ 0:f1de39079243
misc: initial import
author | David Demelier <markand@malikania.fr> |
---|---|
date | Mon, 07 Jun 2021 09:41:37 +0200 |
parents | |
children | 5fa3d2f479b2 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f1de39079243 |
---|---|
1 # Network REST API | |
2 | |
3 This document describes the network API for access through the `scid` program | |
4 from `sciworker`. | |
5 | |
6 # Base definitions | |
7 | |
8 The API is versioned and starts with the `/api/v?` where the question mark is | |
9 replaced with the current version. | |
10 | |
11 # API v1 | |
12 | |
13 ## (GET) /jobs/<w> | |
14 | |
15 Get the jobs pending that the worker `w` is supposed to run. | |
16 | |
17 Request: | |
18 | |
19 No data. | |
20 | |
21 Response: | |
22 | |
23 ``` | |
24 [ | |
25 { | |
26 "project": "foobar", | |
27 "tag": "1234" | |
28 } | |
29 ] | |
30 ``` | |
31 | |
32 ## (POST) /jobs/<w> | |
33 | |
34 Post the result of the a job from the worker `w`. | |
35 | |
36 Request: | |
37 | |
38 ``` | |
39 { | |
40 "project": "foobar", | |
41 "tag": 1234", | |
42 "output": "stdout/stderr combined" | |
43 } | |
44 ``` |