getAnalyses
Get analyses by filter
Use any combination of field_id, crop_id and user_id
/companies/{companyId}/analyses
Usage and SDK Samples
curl -X GET -H "Accept: application/json" -H "Authorization: Bearer [[apiKey]]" "https://api.farmerjoe.com/v1/companies/{companyId}/analyses?field_id=&crop_id=&user_id=&group_id="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AnalysesApi;
import java.io.File;
import java.util.*;
public class AnalysesApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setConnectTimeout(60000);
defaultClient.setReadTimeout(60000);
// Configure HTTP basic authorization: bearerAuth
HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth");
bearerAuth.setApiKey("YOUR API KEY");
AnalysesApi apiInstance = new AnalysesApi();
String companyId = companyId_example; // String | The company ID
String fieldId = fieldId_example; // String | The field ID
String cropId = cropId_example; // String | The crop ID
String userId = userId_example; // String | The user ID
String groupId = groupId_example; // String | The group ID
try {
List<Analysis> result = apiInstance.getAnalyses(companyId, fieldId, cropId, userId, groupId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnalysesApi#getAnalyses");
e.printStackTrace();
}
}
}
var FarmerJoeApi = require('farmer_joe_api');
var defaultClient = FarmerJoeApi.ApiClient.instance;
// Configure HTTP bearer authorization: bearerAuth
var bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.bearerApiKey = 'YOUR API KEY'
var api = new FarmerJoeApi.AnalysesApi()
var companyId = companyId_example; // {String} The company ID
var opts = {
'fieldId': fieldId_example, // {String} The field ID
'cropId': cropId_example, // {String} The crop ID
'userId': userId_example, // {String} The user ID
'groupId': groupId_example // {String} The group ID
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.getAnalyses(companyId, opts, callback);
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP bearer authorization: bearerAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setBearerApiKey('YOUR_API_KEY');
$api_instance = new OpenAPITools\Client\Api\AnalysesApi();
$companyId = companyId_example; // String | The company ID
$fieldId = fieldId_example; // String | The field ID
$cropId = cropId_example; // String | The crop ID
$userId = userId_example; // String | The user ID
$groupId = groupId_example; // String | The group ID
try {
$result = $api_instance->getAnalyses($companyId, $fieldId, $cropId, $userId, $groupId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AnalysesApi->getAnalyses: ', $e->getMessage(), PHP_EOL;
}
?>
Scopes
Parameters
| Name | Description |
|---|---|
| companyId* |
String
The company ID
Required
|
| Name | Description |
|---|---|
| field_id |
String
The field ID
|
| crop_id |
String
The crop ID
|
| user_id |
String
The user ID
|
| group_id |
String
The group ID
|
