dn-scribe commited on
Commit
1ca57c5
·
1 Parent(s): de184ae

docs: update readme with api

Browse files
Files changed (1) hide show
  1. README.md +30 -0
README.md CHANGED
@@ -1,5 +1,35 @@
 
1
  # Attestation Store
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  Run:
4
  ```bash
5
  python main.py
 
1
+
2
  # Attestation Store
3
 
4
+ ## API Endpoints
5
+
6
+ | Endpoint | Method | Auth | Description |
7
+ |----------|--------|------|-------------|
8
+ | `/v1/login` | POST | None | Authenticate with API key, username/password, or client credentials. Returns JWT. |
9
+ | `/v1/logout` | POST | JWT | Logout current user. |
10
+ | `/v1/profile` | GET | JWT | Get current user profile. |
11
+ | `/v1/users` | GET | JWT | List users (admin only). |
12
+ | `/v1/users` | POST | JWT | Create new user (admin only). |
13
+ | `/v1/users/bulk` | GET | JWT | Get all users for bulk creation (admin only). |
14
+ | `/v1/users/bulk` | POST | JWT | Create users in batch (admin only). |
15
+ | `/v1/generate-api-key` | POST | JWT | Generate API key for a user (admin only). |
16
+ | `/v1/api-key` | POST | JWT | Create API key for current user. |
17
+ | `/v1/api-keys` | GET | JWT | List API keys (admin sees all, user sees own). |
18
+ | `/products/download-json` | GET | JWT | Download products as JSON, supports filtering. |
19
+ | `/products/download-csv` | GET | JWT | Download products as CSV, supports filtering. |
20
+ | `/products` | GET | JWT | Products page (HTML, for web UI). |
21
+ | `/attestations` | GET | JWT | List attestations. |
22
+ | `/attestations/<id>/file` | GET | JWT | Download attestation file. |
23
+ | `/ux/policy-results` | GET | JWT | List policy results (web UI, supports filtering). |
24
+ | `/ux/policy-results/<id>` | GET | JWT | View a single policy result (web UI). |
25
+ | `/ux/policy-results/download-csv` | GET | JWT | Download policy results as CSV, supports filtering. |
26
+ | `/evidence/policy-results/csv` | GET | JWT | Download policy results as CSV (API, supports filtering). |
27
+ | `/status` | GET | None | Health/status check. |
28
+ | `/api/webhooks/test-receiver` | POST | X-Webhook-Secret | Webhook test endpoint (external, no JWT). |
29
+ | `/api/webhooks/test/<id>` | POST | JWT | Internal webhook test endpoint. |
30
+
31
+ > **Note:** Most endpoints require JWT authentication, which can be obtained via `/v1/login` using an API key or credentials.
32
+
33
  Run:
34
  ```bash
35
  python main.py