Skip to content

Commit

Permalink
Update api readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kostas-kou committed Oct 15, 2024
1 parent 98ba76a commit f6ab0a7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions sda/cmd/api/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,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.

- `/key/hashed`
- accepts `POST` requests with the hex hash of the key and its description
- registers the key hash in the database.

- Error codes
- `200` Query execute ok.
- `400` Error due to bad payload.
- `401` Token user is not in the list of admins.
- `409` Key hash already exists in the database.
- `500` Internal error due to DB failures.

Example:

```bash
curl -H "Authorization: Bearer $token" -H "Content-Type: application/json" -X POST -d '{"hash": "key-hex-hash", "description": "this is the key description"}' https://HOSTNAME/kes/hashed
```


#### Configure Admin users

The users that should have administrative access can be set in two ways:
Expand Down

0 comments on commit f6ab0a7

Please sign in to comment.