view 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
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"
}
```