Download query result
GET/query/:queryId/result/download
Download the results of a completed query as single CSV file.
This endpoint returns a presigned URL that allows time-limited access to the CSV results which users should follow to download the file.
Results for a query (identified by :queryId
) can only be accessed by the user who originally submitted it.
Required scope(s): [data.chf:query
, data.indices:query
]
The column headers of generated CSV files will adhere to the following specification:
Query results: All headers that represent columns from the query results will have the
data__
prefix, followed by the column name. For example,data__indexValue
,data__timestamp
etc.Additional metadata:
query_statement_name
: The ID of the source query submitted via the query API.record_no
: A unique ID for each record.
An example of a generated CSV file would is as follows:
data__timestamp, data__deviceId, data__jobId, data__indexName, data__indexValue, query_statement_name, record_no
2024-05-03 21:00:00, G111001, JOB_V1_PLANT23, HEALTH, 84.2, dbcfbdf1-133a-46ef-9704-31eb17446e7c, 0
2024-05-03 21:00:00, G111001, JOB_V1_PLANT23, PRODUCTIVTY, 88.1, dbcfbdf1-133a-46ef-9704-31eb17446e7c, 1
2024-05-03 21:00:00, G111001, JOB_V1_PLANT23, PEI, 14, dbcfbdf1-133a-46ef-9704-31eb17446e7c, 2
2024-05-03 22:00:00, G111002, JOB_V1_PLANT23, HEALTH, 85.8, dbcfbdf1-133a-46ef-9704-31eb17446e7c, 3
2024-05-03 22:00:00, G111001, JOB_V1_PLANT23, PEI, 13.1, dbcfbdf1-133a-46ef-9704-31eb17446e7c, 4
2024-05-03 23:00:00, G111002, JOB_V1_PLANT23, PRODUCTIVTY, 89.2, dbcfbdf1-133a-46ef-9704-31eb17446e7c, 5
...
2024-05-04 13:00:00, G111001, JOB_V1_PLANT23, EFFICIENCY, 56.1, dbcfbdf1-133a-46ef-9704-31eb17446e7c, 21405
Response schemas
Chlorophyll Fluorescence (ChF) result set
Name | Description | Type | Example |
---|---|---|---|
measurementId | The unique identifier for the measurement. | UUID (V4) | 39FE5FA1-D477-43B2-9E2A-6044E0C656F5 |
timestamp | The timestamp (UTC) of the record. | Timestamp | 2023-08-15 10:00:00 |
deviceId | The ID of the sensor that performed the measurement. | String | G111001 |
jobId | The ID of the growth job associated with the measurement. | String | JOB_V1_PLANT23 |
isDaytime | True if measurement was captured during plant daytime, otherwise False. | Boolean (t for True, f for False) | t |
f0 | F0 (Minimum Fluorescence) - The fluorescence yield when all PSII reaction centers are open. | Float | 19.41 |
fm | FM (Maximum Fluorescence) - The maximum fluorescence yield when all PSII reaction centers are closed. | Float | 47.13 |
fv | FV (Variable Fluorescence) - The difference between FM and F0. | Float | 27.72 |
qe | QE (Quantum Efficiency of PSII) - Represents the efficiency of energy conversion in PSII under light. | Float | 0.59 |
fv_fm | FV/FM (Maximum Quantum Yield of PSII) - Ratio of variable to maximum fluorescence in a dark-adapted state. | Float | 0.59 |
f0x | F0' (F0 Prime) - The minimal fluorescence yield in light-adapted states. | Float | 18.33 |
fvx_fmx | FV'/FM' (FV Prime over FM Prime) - Efficiency of energy conversion in PSII under light-adapted conditions. | Float | 0.61 |
qp | QP (Photochemical Quenching) - Reflects the proportion of open PSII reaction centers. | Float | 0.96 |
f0x_f0 | F0'/F0 (F0 Prime over F0) - Ratio of minimal fluorescence in light-adapted vs dark-adapted conditions. | Float | 0.94 |
fqx_fmx | FQ'/FM' (FQ Prime over FM Prime) - Reflects the quantum yield of photochemical energy conversion in PSII. | Float | 0.59 |
npq | NPQ (Non-Photochemical Quenching) - Mechanism that dissipates excess light energy as heat. | Float | 0.79 |
ql | QL (Lake Model Quenching) - Represents the distribution of excitation energy between open and closed PSII. | Float | 0.91 |
qcn | QCN - A specific parameter related to non-photochemical quenching processes. | Float | 0.44 |
fv_f0 | FV/F0 (FV over F0) - Ratio of variable fluorescence to minimum fluorescence in a dark-adapted state. | Float | 2.48 |
query_statement_name | The ID of the source query submitted via the query API. | UUID (V4) | 7b4f787b-2c78-40b3-8f5c-2eebff04f208 |
record_no | A unique ID for each result set record. | Integer | 145 |
Indices result set
Name | Description | Type | Example |
---|---|---|---|
timestamp | The timestamp (UTC) of the record. | Timestamp | 2023-08-15 10:00:00 |
deviceId | The ID of the sensor that performed the measurements from which the index value has been calculated. | String | G111001 |
jobId | The ID of the growth job associated with the index value. | String | JOB_V1_PLANT23 |
indexName | The name of the Gardin index, which can be one of the following:HEALTH : Shows Fv/Fm during plant night time, indicating the plant's energy conversion potential. Higher values indicate stronger growth. EFFICIENCY : Quantum yield (øPSII), showing the fraction of absorbed light used for photosynthesis. Higher values correlate with yield potential. PRODUCTIVITY† : Indicates photosynthetic activity, correlating with plant growth and yield. PEI† : Plant energy balance indicating the plant's light balance, with zero being ideal and +/-25 being the nominal range. DLI : Daily light integral (mol/m²/day) measuring the total amount of photosynthetically active radiation (PAR) that a plant receives over the course of a day. DPI : Daily photosynthesis integral (mol/m²/day) measuring the total amount of daily light assimilation by the plant. | String | HEALTH |
indexValue | The value of the named index for the specified timestamp, growth job, and device. | Float | 72.5 |
query_statement_name | The ID of the source query submitted via the query API. | UUID (V4) | 7b4f787b-2c78-40b3-8f5c-2eebff04f208 |
record_no | A unique ID for each result set record. | Integer | 145 |
† Available on selected license plans.
Request
Path Parameters
Unique identifier of the query.
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Successful retrieval of query results CSV file URI.
- application/json
- Schema
- Example (from schema)
Schema
The presigned URI of the CSV file.
{
"uri": "https://gardin-datalake-query-api-gardinqueryresultsbucket-zzdlj9ypv29m.s3.amazonaws.com/results/bf49f61e-fb82-4131-850c-5fa54ed2d2ac/query_result.000.csv?AWSAccessKeyId=ASIA5HJXQUUGGEXOTAZ4&Signature=DGSvzB1I85s4KTokzNQD9HfOL8c%3D&x-amz-security-token=IQoJb3JpZ2luX2VjEPz%suievne998j&Expires=1716636634"
}
Bad request - Client error.
- application/json
- Schema
- Example (from schema)
Schema
Details of the error.
{
"message": "string"
}
Unauthorized - invalid access token or requesting user is not the original query submitter.
- application/json
- Schema
- Example (from schema)
Schema
Details of the error.
{
"message": "string"
}
Forbidden - invalid access token or user not authorised.
- application/json
- Schema
- Example (from schema)
Schema
Details of the error.
{
"message": "string"
}
Query not found
- application/json
- Schema
- Example (from schema)
Schema
Details of the error.
{
"message": "string"
}
Internal server error - contact tech@gardin.ag for further assistance.
- application/json
- Schema
- Example (from schema)
Schema
Details of the error.
{
"message": "string"
}