list_qr_codes
Browse and search existing QR codes with paginated results including short IDs, target URLs, labels, and timestamps.
Instructions
List all managed QR codes with pagination. Returns short IDs, target URLs, labels, and timestamps. Use this to browse or search for existing QR codes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results to return. | |
| offset | No | Number of results to skip. |
Implementation Reference
- src/modules/qr/qr.service.ts:246-268 (handler)The core handler function `listQrCodes` that queries the database for QR codes owned by the API key, with pagination (limit/offset). Returns data, total count, offset, and limit.
export function listQrCodes(limit: number = 20, offset: number = 0, apiKeyId: number) { const rows = db .select() .from(qrCodes) .where(eq(qrCodes.apiKeyId, apiKeyId)) .limit(limit) .offset(offset) .all(); const [{ total }] = db .select({ total: count() }) .from(qrCodes) .where(eq(qrCodes.apiKeyId, apiKeyId)) .all(); const customDomain = getCustomDomain(apiKeyId); return { data: rows.map((row) => formatQrResponse(row, customDomain)), total, offset, limit, }; } - src/modules/qr/qr.schemas.ts:473-492 (schema)JSON Schema (qrListSchema) defining the query parameters limit (integer, 1-100, default 20) and offset (integer, min 0, default 0) for the list endpoint.
export const qrListSchema = { querystring: { type: "object" as const, properties: { limit: { type: "integer", default: 20, minimum: 1, maximum: 100, description: "Maximum number of QR codes to return. Defaults to 20, max 100.", }, offset: { type: "integer", default: 0, minimum: 0, description: "Number of records to skip for pagination.", }, }, }, };