diff --git a/docs/dictionary/wordlist.txt b/docs/dictionary/wordlist.txt index 037470a..36f9104 100644 --- a/docs/dictionary/wordlist.txt +++ b/docs/dictionary/wordlist.txt @@ -47,6 +47,7 @@ accessionid accessionids accesskey accesstoken +acecc ack'ed acked adminPassword @@ -79,6 +80,7 @@ bmi bugfix buildvcs cacert +cbb ccacd cega cegamq diff --git a/docs/services/api.md b/docs/services/api.md index 0501f3c..59a410d 100644 --- a/docs/services/api.md +++ b/docs/services/api.md @@ -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.