Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/dictionary/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ accessionid
accessionids
accesskey
accesstoken
acecc
ack'ed
acked
adminPassword
Expand Down Expand Up @@ -79,6 +80,7 @@ bmi
bugfix
buildvcs
cacert
cbb
ccacd
cega
cegamq
Expand Down
18 changes: 18 additions & 0 deletions docs/services/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,24 @@ Admin endpoints are only available to a set of whitelisted users specified in th
- `401` Token user is not in the list of admins.
- `500` Internal error due to DB failure.

- `/users/:username/file/:fileid`
- accepts `GET` requests.
- downloads a file from the inbox, re-encrypted with the client’s public key provided in the request header.
- the public key provided in the header should be `base64` encoded.

- Error codes
- `200` Query execute ok.
- `400` Client public key not provided or not valid.
- `401` Token user is not in the list of admins.
- `404` File not found
- `500` Internal error due to Inbox, Reencrypt, DB, MQ or streaming failures.

Example:

```bash
curl -H "Authorization: Bearer $token" -H "C4GH-Public-Key: $base64_encoded_public_key" -X GET https://HOSTNAME/users/submitter@example.org/file/c2acecc6-f208-441c-877a-2670e4cbb040
```

- `/c4gh-keys/add`
- accepts `POST` requests with the hex hash of the key and its description
- registers the key hash in the database.
Expand Down