# teralytic.SoilsApi

All URIs are relative to *https://api.teralytic.io/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**query**](SoilsApi.md#query) | **GET** /soils | Query the soildb


<a name="query"></a>
# **query**
> FeatureCollection query(geometry, opts)

Query the soildb

Query the soildb using various parameters

### Example
```javascript
var teralytic = require('teralytic');
var defaultClient = teralytic.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';

// Configure OAuth2 access token for authorization: OAuth2
var OAuth2 = defaultClient.authentications['OAuth2'];
OAuth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new teralytic.SoilsApi();

var geometry = "geometry_example"; // String | The geometry to query

var opts = { 
  'component': "component_example", // String | Filter on component values
  'componentFields': ["componentFields_example"], // [String] | The horizon fields to return
  'horizon': "horizon_example", // String | Filter on horizons
  'horizonFields': ["horizonFields_example"] // [String] | The horizon fields to return
};
apiInstance.query(geometry, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **geometry** | **String**| The geometry to query | 
 **component** | **String**| Filter on component values | [optional] 
 **componentFields** | [**[String]**](String.md)| The horizon fields to return | [optional] 
 **horizon** | **String**| Filter on horizons | [optional] 
 **horizonFields** | [**[String]**](String.md)| The horizon fields to return | [optional] 

### Return type

[**FeatureCollection**](FeatureCollection.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OAuth2](../README.md#OAuth2)

### HTTP request headers

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

