Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • satnogs-network satnogs-network
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 192
    • Issues 192
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • librespacefoundationlibrespacefoundation
  • SatNOGSSatNOGS
  • satnogs-networksatnogs-network
  • Issues
  • #860
Closed
Open
Issue created Aug 04, 2022 by Fabian P. Schmidt@kerel-fsDeveloper

API: Support querying multiple observations by ID at once

🐞 Problem

Some users need to fetch a large number of observations, e.g. as training data for their ML learning or for SSA. Currently this will result in >1000 subsequent queries, fetching one observation at-a-time. This is slow and seems optimizable.

💡 Possible solution

Add a new parameter id__in to the API endpoint /observations. Example usage:

https://network-dev.satnogs.org/api/observations/?id__in=32224,32241

The following patch to the ObservationViewFilter in network/api/filters.py might achieve that:

+    id__in = django_filters.NumberFilter(field_name='id', lookup_expr='in')

🤔 Considerations

The abuse potential of the proposed solution should be evaluated. I.e. paging should still apply, naturally limiting the number of observations per request. But the cost to scrape might still be reduced. Potentially this might need a re-evaluation of the rate limiting parameters.

Edited Aug 04, 2022 by Fabian P. Schmidt
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking