- Create the task. (Note the
partial:truewhich tells WebODM not to start the task).
await fetch("http://localhost:8000/api/projects/1/tasks/", {
"body": "{\"name\":\"Sheffield Court - 4/29/2018\",\"options\":[{\"name\":\"dsm\",\"value\":true}],\"processing_node\":1,\"auto_processing_node\":false,\"partial\":true}",
"method": "POST"
});
The response will give you a task ID.
id: 8ebf58c8-689e-4ce4-bb60-d9da654ab0f7
- Upload files (repeat this for every file)
await fetch("http://localhost:8000/api/projects/1/tasks/8ebf58c8-689e-4ce4-bb60-d9da654ab0f7/upload/", {
"headers": {
"Content-Type": "multipart/form-data; boundary........"
},
"body": "formdata binary"
"method": "POST",
});
- Commit
await fetch("http://localhost:8000/api/projects/1/tasks/8ebf58c8-689e-4ce4-bb60-d9da654ab0f7/commit/", {
"method": "POST",
});
That’s it!
This is not documented in https://docs.webodm.org (we should probably add it at some point).