Skip to content

Add filter parameters to FeaturesClient.list_items (closes #1221)#1222

Open
steps-re wants to merge 1 commit into
planetlabs:mainfrom
steps-re:features-list-items-filters
Open

Add filter parameters to FeaturesClient.list_items (closes #1221)#1222
steps-re wants to merge 1 commit into
planetlabs:mainfrom
steps-re:features-list-items-filters

Conversation

@steps-re

@steps-re steps-re commented Jul 7, 2026

Copy link
Copy Markdown

Closes #1221.

The Features API GET /collections/{collectionId}/items endpoint supports filtering and sorting, but list_items didn't expose any of it. This adds the documented query parameters to both the async FeaturesClient.list_items and the sync FeaturesAPI.list_items:

  • bbox — bounding box [xmin, ymin, xmax, ymax], serialized to the comma-separated form the API expects
  • datetime — a single RFC 3339 datetime or an interval
  • id — id match, with a ~ prefix for substring (fuzzy) matching
  • hashid
  • sort — e.g. "id" / "-id"

Only non-None filters are sent, so existing calls are unaffected. Pagination is unchanged: the filters go out on the first request and the API carries them through the next links.

Added test_list_items_with_filters, which asserts every filter is forwarded as a query parameter for both the async and sync clients. flake8 and yapf are clean on the touched files.

The Features API list-items endpoint supports filtering and sorting, but
list_items exposed none of it. Add the documented query parameters to both
the async FeaturesClient.list_items and the sync FeaturesAPI.list_items:
bbox, datetime, id (with ~ fuzzy matching), hashid, and sort.

Only non-None filters are sent, so existing calls are unaffected; pagination
is unchanged since the API carries the filters through the next links.

Closes planetlabs#1221.

Signed-off-by: Mike German <mike@stepsventures.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FeaturesClient list_items does not support filtering

1 participant