# \MeasurementsApi

All URIs are relative to *http://localhost:5000*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_measurement**](MeasurementsApi.md#create_measurement) | **POST** /v3/streams/measurements | Create a measurement.
[**download_measurements**](MeasurementsApi.md#download_measurements) | **GET** /v3/streams/measurements/{inst_id} | List measurements when only inst_id is provided
[**list_measurements**](MeasurementsApi.md#list_measurements) | **GET** /v3/streams/projects/{project_id}/sites/{site_id}/instruments/{inst_id}/measurements | List measurements.



## create_measurement

> models::CreateMeasurement201Response create_measurement(new_measurement)
Create a measurement.

Create a measurement.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**new_measurement** | [**NewMeasurement**](NewMeasurement.md) |  | [required] |

### Return type

[**models::CreateMeasurement201Response**](create_measurement_201_response.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## download_measurements

> models::CreateMeasurement201Response download_measurements(inst_id, query, var_ids, limit, skip, start_date, end_date, with_metadata, format)
List measurements when only inst_id is provided

Download measurements

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**inst_id** | **String** | Unique id of instruments | [required] |
**query** | Option<**String**> | a formated query string for measurements. |  |
**var_ids** | Option<**String**> | a comma seperated list of variable ids |  |
**limit** | Option<**i32**> | limit the number of records returned. |  |
**skip** | Option<**i32**> | index (skip) to start list. |  |
**start_date** | Option<**String**> | start date of measurements |  |
**end_date** | Option<**String**> | end date of measurements |  |
**with_metadata** | Option<**bool**> | if to include metadata with json format - defaults to false |  |
**format** | Option<**String**> | json or csv download format |  |

### Return type

[**models::CreateMeasurement201Response**](create_measurement_201_response.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## list_measurements

> models::CreateMeasurement201Response list_measurements(project_id, site_id, inst_id, query, var_ids, limit, skip, start_date, end_date, geojson, format, with_metadata)
List measurements.

List measurements.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**project_id** | **String** | Unique ID of project generated by Tapis | [required] |
**site_id** | **String** | Site ID generated by CHORDS | [required] |
**inst_id** | **String** | Instrument ID generated by CHORDS | [required] |
**query** | Option<**String**> | a formated query string for measurements. |  |
**var_ids** | Option<**String**> | a comma seperated list of variable ids |  |
**limit** | Option<**i32**> | limit the number of records returned. |  |
**skip** | Option<**i32**> | index (skip) to start list. |  |
**start_date** | Option<**String**> | start date of measurements |  |
**end_date** | Option<**String**> | end date of measurements |  |
**geojson** | Option<[**serde_json::Value**](.md)> | geojson polygon to spatial search |  |
**format** | Option<**String**> | json or csv download format |  |
**with_metadata** | Option<**bool**> | if to include metadata with json format- defaults to false |  |

### Return type

[**models::CreateMeasurement201Response**](create_measurement_201_response.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

