Reference: Assistance with Backend Lab7 Queries Primer
This document is intended to serve as a short overview of how lab7.sample.sample_api.query_samples()` works.
There are a few things required by almost every backend module:
sessionandagentFrom
l7 consoleagentis known asadminFor the
querystyle endpoints, there are two main options:filters- where users would search for a value (resource_vals), like the value ofnameoruuidparams- where users would start to select specific variables (resource_vars), like the variable ofnameoruuid
The front-end api (at
/main/static/util.html) has a good list of filters and params for each endpoint that should be the same on the backend (see example below)

return_dict=Falseis a recommended option as it returns the result as an object rather than a dictionaryThis has some efficiency considerations on the SQL Alchemy side of things, so it's almost always better to use an object
Users could return specific params (it will return the minimum amount of things that it can), see example below:


