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

Get a Record

Fetch a single record by its AT URI.

Lexicon type: query

function handle()
if not params.uri then
return { error = "uri parameter is required" }
end
local record = db.get(params.uri)
if not record then
return { error = "not found" }
end
return { record = record }
end
  1. Check that the uri query parameter is present. Return a structured error if missing.
  2. Look up the record with db.get, which returns the record table or nil.
  3. Return the record wrapped in an object.
GET /xrpc/xyz.statusphere.getRecord?uri=at://did:plc:abc/xyz.statusphere.record/abc123

A focused read endpoint for detail views or record verification. Returns structured error responses instead of calling error(), so the client gets a 200 with an error field it can handle gracefully rather than a 500.