Skip to content
You are reading the HappyView v2 docs, which are no longer updated. Read the v3 docs.

Records

Browse and manage indexed records. All endpoints require the appropriate records:* permission.

Bearer
# All examples assume $TOKEN is an API key (hv_...)AUTH="Authorization: Bearer $TOKEN"
GET /admin/records

Paginated list of records in a collection, ordered by indexed_at descending.

ParamTypeRequiredDescription
collectionstringyesCollection NSID to list records from
limitnumbernoMax results per page (default 20, max 100)
cursorstringnoPagination cursor from a previous response
curl
curl "http://127.0.0.1:3000/admin/records?collection=xyz.statusphere.status&limit=10" -H "$AUTH"

Response: 200 OK

{
"records": [
{
"uri": "at://did:plc:abc/xyz.statusphere.status/3k...",
"did": "did:plc:abc",
"collection": "xyz.statusphere.status",
"rkey": "3k...",
"cid": "bafyrei...",
"indexed_at": "2025-01-01T00:00:00Z",
"record": { "...": "..." },
"labels": []
}
],
"cursor": "20"
}

cursor is omitted when there are no more results.

GET /admin/records/collections

Returns the list of collection NSIDs from registered record-type lexicons. This is a fast lookup (no record counting).

curl
curl http://127.0.0.1:3000/admin/records/collections -H "$AUTH"

Response: 200 OK

{
"collections": [
"xyz.statusphere.status",
"app.bsky.feed.post"
]
}
DELETE /admin/records

Delete a single record by AT URI.

ParamTypeRequiredDescription
uristringyesAT URI of the record to delete
curl
curl -X DELETE "http://127.0.0.1:3000/admin/records?uri=at://did:plc:abc/xyz.statusphere.status/3k..." -H "$AUTH"

Response: 204 No Content

Returns 404 if the record is not found.

DELETE /admin/records/collection

Delete all indexed records for a given collection. Requires both records:delete and records:delete-collection permissions.

ParamTypeRequiredDescription
collectionstringyesCollection NSID to delete from
curl
curl -X DELETE "http://127.0.0.1:3000/admin/records/collection?collection=xyz.statusphere.status" -H "$AUTH"

Response: 200 OK

{
"deleted": 42
}