You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+95-8Lines changed: 95 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,12 @@ and some other logging and metadata.
9
9
The schema and APIs is defined [here](./task_execution.proto) in [protocol buffers](https://developers.google.com/protocol-buffers/). Clients may use JSON and REST to communicate
10
10
with a service implementing the TES API.
11
11
12
-
Here's an example task message, defining a task which calculates
13
-
an MD5 checksum on an input file and uploads output:
12
+
13
+
Create a task
14
+
---------------------------------
15
+
16
+
Here's an example of a complete task message, defining a task which calculates
17
+
an MD5 checksum on an input file and uploads the output:
14
18
```JSON
15
19
{
16
20
"name": "MD5 example",
@@ -52,12 +56,95 @@ an MD5 checksum on an input file and uploads output:
52
56
}
53
57
```
54
58
55
-
This message would be submitted via HTTP Post to `/v1/tasks`.
56
-
The return value is a task ID:
59
+
A minimal version of the same task, including only the required fields looks like:
57
60
```JSON
58
-
{ "id": "6E57CA6B-0BC7-44FB-BA2C-0CBFEC629C63" }
61
+
{
62
+
"inputs": [
63
+
{
64
+
"url": "/path/to/input_file",
65
+
"path": "/container/input",
66
+
}
67
+
],
68
+
"outputs" : [
69
+
{
70
+
"url" : "/path/to/output_file",
71
+
"path" : "/container/output",
72
+
}
73
+
],
74
+
"executors" : [
75
+
{
76
+
"image_name" : "ubuntu",
77
+
"cmd" : ["md5sum", "/container/input"],
78
+
"stdout" : "/container/output",
79
+
}
80
+
]
81
+
}
82
+
```
83
+
84
+
To create the task, send an HTTP POST request:
85
+
```HTTP
86
+
POST /v1/tasks
87
+
88
+
{ "id": "task-1234" }
59
89
```
60
90
61
-
Then, the task and logs may be retrieve with a HTTP GET.
0 commit comments