Admin API

Records

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

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

List records

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 "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.

List collections

GET /admin/records/collections

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

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

Response: 200 OK

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

Delete a record

DELETE /admin/records

Delete a single record by AT URI.

ParamTypeRequiredDescription
uristringyesAT URI of the record to delete
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 all records in a collection

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 -X DELETE "http://127.0.0.1:3000/admin/records/collection?collection=xyz.statusphere.status" -H "$AUTH"

Response: 200 OK

{
  "deleted": 42
}