SEED-platform / seed

Standard Energy Efficiency Data (SEED) Platform™ is a web-based application that helps organizations easily manage data on the energy performance of large groups of buildings.
Other
111 stars 54 forks source link

Filter elements endpoint #4808

Closed axelstudios closed 2 months ago

axelstudios commented 2 months ago

Any background context you want to provide?

We had endpoints to list all elements for an org (or a single element by id), but no method for filtering them

What's this PR do?

Adds a new GET /v3/elements/filter/ endpoint that filters for all organization elements under a specific Uniformat code. This is useful for finding which properties have specific types of elements

How should this be manually tested?

Given a database with elements, test URL like: GET /api/v3/elements/filter/?page=1&per_page=10&organization_id=2&code=D2010