Gallery

Lists live public publications (pages, files, sites; public namespace, no password, not hidden by the owner) with optional case-insensitive search by title (filename for files, id when untitled) and an optional type filter by the card's type; q and type together list only rows matching both, and total counts only those. When mine=true and X-Owner-Token is supplied, returns all of the caller's live pages, files and sites in any namespace, including password-protected ones (a token active in a profile lists the profile's rows; scope says which); each item carries its real namespace, a visibility of my_public, my_public_password or my_private, and listed. Key-value and JSON stores, JSON pages and files, and HTML files kept as source are never listed.

get/api/gallery

Request

  • Base URL
    https://brewpage.app
  • Auth
    • none
    • or API key in header X-Owner-Token

Query parameters

q, string

Case-insensitive substring search by title (filename for files, id when untitled)

type, 'html' | 'markdown' | 'image' | 'pdf' | 'office' | 'video' | 'audio' | 'archive' | 'font' | 'table' | 'log' | '3d' | 'site' | 'file' | 'txt' | 'rst' | 'css' | 'sql' | 'js' | 'jsx' | 'mjs' | 'ts' | 'tsx' | 'json' | 'xml' | 'sh' | 'bat' | 'yaml' | 'yml' | 'toml' | 'ini' | 'properties' | 'conf' | 'cfg' | 'dockerfile' | 'env' | 'csv' | 'tsv'

Card type filter, case-insensitive; blank = no filter, any other value -> 400. html (HTML pages), markdown (Markdown pages), site (sites), file (every file); file families by filename extension: image, pdf, office, video, audio, archive, font, table (csv, tsv), log, 3d; extension keywords match code pages of that extension and files with it: txt, rst, css, sql, js, jsx, mjs, ts, tsx, json, xml, sh, bat, yaml, yml, toml, ini, properties, conf, cfg, dockerfile, env, csv, tsv.

page, integer

Page number (1-based)

size, integer

Items per page (max 100)

sort, string

Sort order: 'date' (newest first, default) or 'views' (most viewed first)

mine, boolean

When true, list the caller's own publications in any namespace instead of the public gallery (requires X-Owner-Token)

Headers

X-Owner-Token, unknown

Owner token; required when mine=true, which without it returns an empty page

Response

Paginated gallery items

GalleryResponse required
items, GalleryItem[]
total, integer

Total number of matching items across all pages

page, integer

Current page number (1-based)

size, integer

Items per page

scope, 'token' | 'profile' nullable

mine=true only: profile when the token is active in a profile (its rows are listed), else token

Changes