Skip to content

Commit c23c504

Browse files
committed
Add API documentation for GET /api/v1/beads/status endpoint
Documents the bulk bead status lookup endpoint: query parameters, response format, all status values, cross-project behavior, deduplication, empty-ids handling, and router ordering rationale. Built with Raymond (Agent Orchestrator)
1 parent 1c4567a commit c23c504

1 file changed

Lines changed: 90 additions & 0 deletions

File tree

docs/api-status-endpoint.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# API: Bulk Bead Status Endpoint
2+
3+
## Overview
4+
5+
`GET /api/v1/beads/status` returns a batch status lookup for one or more bead IDs. It requires no authentication and searches across all projects.
6+
7+
---
8+
9+
## Endpoint
10+
11+
```
12+
GET /api/v1/beads/status
13+
```
14+
15+
**Authentication:** None required (public endpoint).
16+
17+
---
18+
19+
## Query Parameters
20+
21+
| Parameter | Type | Description |
22+
|-----------|------|-------------|
23+
| `ids` | string | Comma-separated list of bead IDs to look up |
24+
25+
---
26+
27+
## Response
28+
29+
**`200 OK`** — always returned (even when `ids` is absent or empty).
30+
31+
Response body is a JSON object mapping each requested ID to its status string:
32+
33+
```json
34+
{
35+
"bd-a1b2": "open",
36+
"bd-c3d4": "in_progress",
37+
"bd-e5f6": "closed",
38+
"bd-xxxx": "unknown"
39+
}
40+
```
41+
42+
### Status Values
43+
44+
| Value | Meaning |
45+
|-------|---------|
46+
| `open` | Bead exists and is open |
47+
| `not_ready` | Bead exists and is blocked |
48+
| `in_progress` | Bead exists and is being worked on |
49+
| `closed` | Bead exists and is closed |
50+
| `deleted` | Bead exists and has been soft-deleted |
51+
| `unknown` | ID was not found in any project |
52+
53+
---
54+
55+
## Behavior
56+
57+
- **Absent or empty `ids`:** returns `{}` with no error.
58+
- **Duplicates:** deduplicated — each ID appears once in the response.
59+
- **Cross-project:** searches across all project stores; IDs are unique across projects (see [Cross-Project ID Uniqueness](#cross-project-id-uniqueness)).
60+
- **No rate limiting** and **no cap on the number of IDs** per request.
61+
62+
### Example
63+
64+
Request:
65+
```
66+
GET /api/v1/beads/status?ids=bd-a1b2,bd-c3d4,bd-missing
67+
```
68+
69+
Response:
70+
```json
71+
{
72+
"bd-a1b2": "open",
73+
"bd-c3d4": "closed",
74+
"bd-missing": "unknown"
75+
}
76+
```
77+
78+
---
79+
80+
## Cross-Project ID Uniqueness
81+
82+
Bead IDs are unique across all projects. This uniqueness is enforced at creation time: when a new bead is created, the server scans all project stores to exclude any already-existing IDs from the candidate set before assigning an ID.
83+
84+
No migration is applied to beads created before this enforcement was introduced; those beads retain their existing IDs.
85+
86+
---
87+
88+
## Router Ordering
89+
90+
The static route `/api/v1/beads/status` is registered in the unauthenticated router block, before the authenticated group that contains the dynamic route `/api/v1/beads/{id}`. This ensures the literal segment `status` is matched first and is never mistaken for a bead ID.

0 commit comments

Comments
 (0)