Skip to content

hotfix: support all subscriptions api results endpoint query parameters#1209

Merged
asonnenschein merged 5 commits intomainfrom
hotfix/subs-results-query-params
Apr 1, 2026
Merged

hotfix: support all subscriptions api results endpoint query parameters#1209
asonnenschein merged 5 commits intomainfrom
hotfix/subs-results-query-params

Conversation

@asonnenschein
Copy link
Copy Markdown
Contributor

@asonnenschein asonnenschein commented Mar 24, 2026

Summary

Adds missing query parameters (created, updated, completed, item-datetime) to Subscriptions API results endpoints, aligning with the OpenAPI specification.

Changes

  • Async Client (planet/clients/subscriptions.py): Added 4 query parameters to get_results() and get_results_csv() with comprehensive docstrings
  • Sync Client (planet/sync/subscriptions.py): Updated to accept and forward new parameters
  • CLI (planet/cli/subscriptions.py): Added --created, --updated, --completed, --item-datetime options to results command
  • Documentation (docs/cli/cli-subscriptions.md): Added "Filtering Results" section with examples

All datetime parameters support RFC 3339 format with date-times, closed intervals, and open intervals.

Example Usage

Python:

pl.subscriptions.get_results(                                                                                                                                        
    subscription_id="...",                                                                                                                                           
    completed="2024-01-01T00:00:00Z/.."                                                                                                                             
)                                                                                                                                                                    
                                                                                                                                                                     
CLI:                                                                                                                                                                 
planet subscriptions results SUBSCRIPTION_ID \
    --completed 2024-01-01T00:00:00Z/..

Copy link
Copy Markdown
Contributor

@tbarsballe tbarsballe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue noted inline, aside from that it appears to work well.
I did get some unhelpful error messages when I messed up the time interval syntax, but that's more an issue with the Subscriptions API itself, so out-of-scope here.

% planet subscriptions results 3ad50be0-05ea-4a1c-82cc-1e288211e627 --created 2026-03-07/..
Error: {"error":{"reason":"Unexpected error","details":[]}}

@asonnenschein asonnenschein merged commit 38d1145 into main Apr 1, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants