Skip to main content
POST
Search Packages Route

Body

application/json

Filter for GET /api/inventory/packages.

At least one of name or minion_id MUST be supplied — we don't want to accidentally let the UI fetch the entire fleet's package list in one request. (A future "browse all" endpoint can lift this rule.)

name
NameFilter · object | null

A name-side filter. op="eq" becomes name = ?; op="prefix" becomes name LIKE ? || '%' (cheap, hits the index); op="contains" becomes name LIKE '%' || ? || '%' (slower, full scan of the (name)-indexed range but acceptable at our fleet size).

version
VersionFilter · object | null

A version comparison applied per-row in Python after SQL narrowing.

source
enum<string> | null
Available options:
apt,
rpm,
pacman
minion_id
string | null
Maximum string length: 255
limit
integer
default:500
Required range: 1 <= x <= 5000
offset
integer
default:0
Required range: x >= 0

Response

Successful Response

Wrapper that lets us tack pagination metadata on later without breaking the wire format.

total
integer
required
hits
PackageQueryHit · object[]
required
truncated
boolean
default:false