Mercurial > sci
view doc/api.md @ 9:3ef8128e244f
sci: add project-update command
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 23 Jun 2021 14:05:36 +0200 |
parents | 5fa3d2f479b2 |
children |
line wrap: on
line source
# Network REST API This document describes the network API for access through the `scid` program from `sciworker`. # Base definitions The API is versioned and starts with the `/api/v?` where the question mark is replaced with the current version. # API v1 ## (GET) /jobs/<w> Get the jobs pending that the worker `w` is supposed to run. Request: No data. Response: ``` [ { "project": "foobar", "tag": "1234" } ] ``` ## (POST) /jobs/<w> Post the result of the a job from the worker `w`. Request: ``` { "project": "foobar", "tag": 1234", "output": "stdout/stderr combined" } ``` ### (GET) /script/<p> Get script code for project `p`. Request: No data. Reponse: ``` { "code": "#!/bin/sh exit 0" } ```