aptly icon indicating copy to clipboard operation
aptly copied to clipboard

snapshot filter missing in API

Open lma456 opened this issue 6 months ago • 1 comments

In the CLI, I can create a filtered snapshot like this:

aptly snapshot filter -with-deps=false snap-all-20250618-01 snap-shared-20250623 'Name (= filter)'

But there’s no equivalent API endpoint (e.g. /api/snapshots//filter) to do the same.

Tried using PUT /api/snapshots/ with "Filter" in the body – has no effect.

Would be great to have full CLI parity here.

Thanks!

lma456 avatar Jun 23 '25 08:06 lma456

Yes, would be nice convenience function. Have a look at https://www.aptly.info/doc/api/snapshots/ As an alternative you could

  1. get the packages of the source snapshot with "Show Packages/Search"
  2. Remove the packages from output of 1. to your needs
  3. create a new snapshot with "Create Snapshot from Package Refs" with output of 2.

Hope that helps while waiting

kaihuth avatar Jul 08 '25 06:07 kaihuth