You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-18Lines changed: 4 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,9 @@ API gateway, usage metering, and billing services for the Callora API marketplac
4
4
5
5
## API Catalog Pagination (`GET /api/apis`)
6
6
7
-
The public API catalog endpoint supports two pagination modes. Cursor pagination is preferred for stable, gap-free traversal over large catalogs; offset pagination is available for backward compatibility.
7
+
The public API catalog endpoint uses **keyset cursor pagination** over `(created_at DESC, id DESC)` for stable, gap-free traversal under concurrent writes. Offset-based pagination has been removed; all requests now return cursor-based responses.
8
8
9
-
### Cursor pagination (recommended)
10
-
11
-
Results are ordered **newest-first** by `(created_at DESC, id DESC)`. Pass the opaque `nextCursor` value returned in one response as the `cursor` query parameter on the next request.
9
+
Results are ordered **newest-first** by `(created_at DESC, id DESC)`. Pass the opaque `nextCursor` value returned in one response as the `cursor` query parameter on the next request. Omit `cursor` for the first page.
12
10
13
11
| Parameter | Type | Description |
14
12
|-----------|------|-------------|
@@ -51,19 +49,7 @@ When `hasMore` is `false` and `nextCursor` is absent, you have reached the last
51
49
52
50
A malformed or tampered cursor returns `HTTP 400` with `code: "VALIDATION_ERROR"`.
53
51
54
-
### Offset pagination (legacy)
55
-
56
-
Omit `cursor` and use `limit` + `offset` (or `page`). Results may shift if new APIs are inserted during traversal.
57
-
58
-
```
59
-
GET /api/apis?limit=20&offset=40
60
-
```
61
-
```json
62
-
{
63
-
"data": [ ... ],
64
-
"meta": { "limit": 20, "offset": 40 }
65
-
}
66
-
```
52
+
The `offset` and `page` query parameters are ignored (cursor pagination does not support random-access jumping).
67
53
68
54
## Fee Abstraction
69
55
@@ -136,7 +122,7 @@ The migration is in `migrations/0019_disputes.sql` (rollback: `migrations/0019_d
136
122
137
123
- Health check: `GET /api/health`
138
124
- Marketplace routes:
139
-
-`GET /api/apis` — list public (active, non-deleted) APIs with cursor **or** offset pagination
125
+
-`GET /api/apis` — list public (active, non-deleted) APIs with cursor pagination over `(created_at, id)`
140
126
-`GET /api/apis/:id`
141
127
-`POST /api/apis` for authenticated developers to register an API with priced endpoints
0 commit comments