File: SERVER

package info (click to toggle)
shatag 0.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 224 kB
  • sloc: python: 556; makefile: 14
file content (16 lines) | stat: -rw-r--r-- 426 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
RESTful API for the future shatag server:

$URL is the service endpoint, https://example.com/shatag

send a bunch of hashes:

POST $URL/host/<hostname>
Data: json document containing [{'clear': root},{'path':path, 'hash':hash},...]

check if a hash exists:

GET $URL/where/<hash>
Data: document containing { hash: [host, host, ...] }

GET $URL/find/<hash>
Data: document containing { hash: { host: [path], host: [path], ...}}