All URIs are relative to https://api2.hiveos.farm/api/v2
Method | HTTP request | Description |
---|---|---|
farmsDelete | DELETE /farms | Delete multiple farms |
farmsFarmIdConfigsConfigGet | GET /farms/{farmId}/configs/{config} | Get configuration file for farm |
farmsFarmIdConfigsGet | GET /farms/{farmId}/configs | Get configuration files for farm |
farmsFarmIdDelete | DELETE /farms/{farmId} | Delete farm |
farmsFarmIdDepositAddressGet | GET /farms/{farmId}/deposit/address | Get list of generated payment addresses |
farmsFarmIdDepositAddressPost | POST /farms/{farmId}/deposit/address | Generate payment address for deposits |
farmsFarmIdDepositPost | POST /farms/{farmId}/deposit | Make deposit to the farm from account balance |
farmsFarmIdEventsGet | GET /farms/{farmId}/events | Farm events |
farmsFarmIdGet | GET /farms/{farmId} | Farm info |
farmsFarmIdInvoiceGet | GET /farms/{farmId}/invoice | Generate invoice for specified period |
farmsFarmIdMetricsGet | GET /farms/{farmId}/metrics | Farm metrics |
farmsFarmIdNotificationsGet | GET /farms/{farmId}/notifications | Get notifications settings |
farmsFarmIdNotificationsPatch | PATCH /farms/{farmId}/notifications | Update notifications settings |
farmsFarmIdPatch | PATCH /farms/{farmId} | Edit farm |
farmsFarmIdPayerDelete | DELETE /farms/{farmId}/payer | Unassign farm payer and restore default value |
farmsFarmIdPersonalSettingsPatch | PATCH /farms/{farmId}/personal_settings | Update personal settings for the farm |
farmsFarmIdPowerReportGet | GET /farms/{farmId}/power_report | Generate report about power consumption for specified period |
farmsFarmIdSendMoneyPost | POST /farms/{farmId}/send_money | Send money to user |
farmsFarmIdStatsGet | GET /farms/{farmId}/stats | Farm stats |
farmsFarmIdTransactionsGet | GET /farms/{farmId}/transactions | Transactions history |
farmsFarmIdTransferDelete | DELETE /farms/{farmId}/transfer | Cancel farm transfer request |
farmsFarmIdTransferGet | GET /farms/{farmId}/transfer | Get active farm transfer request |
farmsFarmIdTransferPost | POST /farms/{farmId}/transfer | Create farm transfer request |
farmsGet | GET /farms | List of accessed farms |
farmsIncomingConfirmPost | POST /farms/incoming/confirm | Confirm transfer request |
farmsIncomingGet | GET /farms/incoming | Get incoming farm transfer requests |
farmsIncomingRejectPost | POST /farms/incoming/reject | Reject transfer request |
farmsPost | POST /farms | Create new farm |
farmsTransfersGet | GET /farms/transfers | Get active transfers requests of all available farms |
farmsDelete($body)
Delete multiple farms
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\IDs(); // \Swagger\Client\Model\IDs |
try {
$apiInstance->farmsDelete($body);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\IDs | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\FarmConfigFiles farmsFarmIdConfigsConfigGet($farm_id, $config, $download)
Get configuration file for farm
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$config = "config_example"; // string |
$download = true; // bool | Download response as a file
try {
$result = $apiInstance->farmsFarmIdConfigsConfigGet($farm_id, $config, $download);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdConfigsConfigGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
config | string | ||
download | bool | Download response as a file | [optional] |
\Swagger\Client\Model\FarmConfigFiles
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\FarmConfigFiles farmsFarmIdConfigsGet($farm_id)
Get configuration files for farm
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
try {
$result = $apiInstance->farmsFarmIdConfigsGet($farm_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdConfigsGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int |
\Swagger\Client\Model\FarmConfigFiles
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
farmsFarmIdDelete($farm_id)
Delete farm
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
try {
$apiInstance->farmsFarmIdDelete($farm_id);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object farmsFarmIdDepositAddressGet($farm_id)
Get list of generated payment addresses
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
try {
$result = $apiInstance->farmsFarmIdDepositAddressGet($farm_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdDepositAddressGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int |
object
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\DepositAddress farmsFarmIdDepositAddressPost($farm_id, $body)
Generate payment address for deposits
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$body = new \Swagger\Client\Model\DepositAddressCreateRequest(); // \Swagger\Client\Model\DepositAddressCreateRequest |
try {
$result = $apiInstance->farmsFarmIdDepositAddressPost($farm_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdDepositAddressPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
body | \Swagger\Client\Model\DepositAddressCreateRequest | [optional] |
\Swagger\Client\Model\DepositAddress
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
farmsFarmIdDepositPost($farm_id, $body)
Make deposit to the farm from account balance
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$body = new \Swagger\Client\Model\Deposit(); // \Swagger\Client\Model\Deposit |
try {
$apiInstance->farmsFarmIdDepositPost($farm_id, $body);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdDepositPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
body | \Swagger\Client\Model\Deposit | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object farmsFarmIdEventsGet($farm_id, $page, $per_page, $type_id, $exclude_type_id, $worker_id, $config_type, $search, $user, $start_date, $end_date, $group, $group_id)
Farm events
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$page = 1; // int | Page number
$per_page = 56; // int | Per-page count (default is 15)
$type_id = "type_id_example"; // string | Return only records of these types, comma-separated list of IDs
$exclude_type_id = "exclude_type_id_example"; // string | Exclude records of these types, comma-separated list of IDs
$worker_id = "worker_id_example"; // string | Return only records for these workers, comma-separated list of IDs
$config_type = "config_type_example"; // string | Comma-separated list of config types
$search = "search_example"; // string | String with searched value
$user = "user_example"; // string | Filter by user. Both login and name are used for searching. This filter is searching by \"contains\", not \"equals\".
$start_date = "start_date_example"; // string | Start date
$end_date = "end_date_example"; // string | End date (inclusive)
$group = 0; // int | Output grouped events when possible
$group_id = 56; // int | Output events cotained in this group
try {
$result = $apiInstance->farmsFarmIdEventsGet($farm_id, $page, $per_page, $type_id, $exclude_type_id, $worker_id, $config_type, $search, $user, $start_date, $end_date, $group, $group_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdEventsGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
page | int | Page number | [optional] [default to 1] |
per_page | int | Per-page count (default is 15) | [optional] |
type_id | string | Return only records of these types, comma-separated list of IDs | [optional] |
exclude_type_id | string | Exclude records of these types, comma-separated list of IDs | [optional] |
worker_id | string | Return only records for these workers, comma-separated list of IDs | [optional] |
config_type | string | Comma-separated list of config types | [optional] |
search | string | String with searched value | [optional] |
user | string | Filter by user. Both login and name are used for searching. This filter is searching by "contains", not "equals". | [optional] |
start_date | string | Start date | [optional] |
end_date | string | End date (inclusive) | [optional] |
group | int | Output grouped events when possible | [optional] [default to 0] |
group_id | int | Output events cotained in this group | [optional] |
object
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Farm farmsFarmIdGet($farm_id)
Farm info
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
try {
$result = $apiInstance->farmsFarmIdGet($farm_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\SplFileObject farmsFarmIdInvoiceGet($farm_id, $start_date, $end_date)
Generate invoice for specified period
If period is not set - invoice for last month will be generated.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$start_date = "start_date_example"; // string | Start date
$end_date = "end_date_example"; // string | End date (inclusive)
try {
$result = $apiInstance->farmsFarmIdInvoiceGet($farm_id, $start_date, $end_date);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdInvoiceGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
start_date | string | Start date | [optional] |
end_date | string | End date (inclusive) | [optional] |
- Content-Type: application/json
- Accept: application/pdf
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object farmsFarmIdMetricsGet($farm_id, $date, $period, $fill_gaps)
Farm metrics
Provides metrics for current farm. Data is refreshed every 5 minutes. For 1 week period - metrics are downsampled by 15 minutes. For 1 month period - metrics are downsampled by 1 hour.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$date = "today"; // string | Start date
$period = "1d"; // string | Period (1 day, 1 week, 1 month)
$fill_gaps = 0; // int | Fill gaps with empty points
try {
$result = $apiInstance->farmsFarmIdMetricsGet($farm_id, $date, $period, $fill_gaps);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdMetricsGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
date | string | Start date | [optional] [default to today] |
period | string | Period (1 day, 1 week, 1 month) | [optional] [default to 1d] |
fill_gaps | int | Fill gaps with empty points | [optional] [default to 0] |
object
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object farmsFarmIdNotificationsGet($farm_id)
Get notifications settings
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
try {
$result = $apiInstance->farmsFarmIdNotificationsGet($farm_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdNotificationsGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int |
object
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
farmsFarmIdNotificationsPatch($farm_id, $body)
Update notifications settings
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$body = new \Swagger\Client\Model\NotificationSubscriptionsFarm(); // \Swagger\Client\Model\NotificationSubscriptionsFarm |
try {
$apiInstance->farmsFarmIdNotificationsPatch($farm_id, $body);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdNotificationsPatch: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
body | \Swagger\Client\Model\NotificationSubscriptionsFarm | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
farmsFarmIdPatch($farm_id, $body)
Edit farm
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$body = new \Swagger\Client\Model\FarmUpdateRequest(); // \Swagger\Client\Model\FarmUpdateRequest |
try {
$apiInstance->farmsFarmIdPatch($farm_id, $body);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdPatch: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
body | \Swagger\Client\Model\FarmUpdateRequest | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
farmsFarmIdPayerDelete($farm_id)
Unassign farm payer and restore default value
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
try {
$apiInstance->farmsFarmIdPayerDelete($farm_id);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdPayerDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
farmsFarmIdPersonalSettingsPatch($farm_id, $body)
Update personal settings for the farm
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$body = new \Swagger\Client\Model\FarmPersonalSettings(); // \Swagger\Client\Model\FarmPersonalSettings |
try {
$apiInstance->farmsFarmIdPersonalSettingsPatch($farm_id, $body);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdPersonalSettingsPatch: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
body | \Swagger\Client\Model\FarmPersonalSettings | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\SplFileObject farmsFarmIdPowerReportGet($farm_id, $start_date, $period, $action, $worker_ids)
Generate report about power consumption for specified period
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$start_date = "start_date_example"; // string | Start date
$period = "period_example"; // string | The period for which the report will be generated.
$action = "action_example"; // string | The action with report after generation.
$worker_ids = "worker_ids_example"; // string | Comma-separated list of worker ids for generating workers-specific report
try {
$result = $apiInstance->farmsFarmIdPowerReportGet($farm_id, $start_date, $period, $action, $worker_ids);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdPowerReportGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
start_date | string | Start date | |
period | string | The period for which the report will be generated. | |
action | string | The action with report after generation. | |
worker_ids | string | Comma-separated list of worker ids for generating workers-specific report | [optional] |
- Content-Type: application/json
- Accept: application/pdf
[Back to top] [Back to API list] [Back to Model list] [Back to README]
farmsFarmIdSendMoneyPost($farm_id, $body)
Send money to user
This action requires Security code.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
// Configure API key authorization: SecurityCode
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Security-Code', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Security-Code', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$body = new \Swagger\Client\Model\\Swagger\Client\Model\Body(); // \Swagger\Client\Model\Body |
try {
$apiInstance->farmsFarmIdSendMoneyPost($farm_id, $body);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdSendMoneyPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
body | \Swagger\Client\Model\Body | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object farmsFarmIdStatsGet($farm_id, $search_id, $worker_ids)
Farm stats
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$search_id = "search_id_example"; // string | ID of cached workers selection
$worker_ids = "worker_ids_example"; // string | Calculate stats only for these workers. Comma-separated IDs list.
try {
$result = $apiInstance->farmsFarmIdStatsGet($farm_id, $search_id, $worker_ids);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdStatsGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
search_id | string | ID of cached workers selection | [optional] |
worker_ids | string | Calculate stats only for these workers. Comma-separated IDs list. | [optional] |
object
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object farmsFarmIdTransactionsGet($farm_id, $page, $per_page, $type_id, $exclude_type_id)
Transactions history
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$page = 1; // int | Page number
$per_page = 56; // int | Per-page count (default is 15)
$type_id = "type_id_example"; // string | Return only records of these types, comma-separated list of IDs
$exclude_type_id = "exclude_type_id_example"; // string | Exclude records of these types, comma-separated list of IDs
try {
$result = $apiInstance->farmsFarmIdTransactionsGet($farm_id, $page, $per_page, $type_id, $exclude_type_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdTransactionsGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
page | int | Page number | [optional] [default to 1] |
per_page | int | Per-page count (default is 15) | [optional] |
type_id | string | Return only records of these types, comma-separated list of IDs | [optional] |
exclude_type_id | string | Exclude records of these types, comma-separated list of IDs | [optional] |
object
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
farmsFarmIdTransferDelete($farm_id)
Cancel farm transfer request
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
try {
$apiInstance->farmsFarmIdTransferDelete($farm_id);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdTransferDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\FarmTransfer farmsFarmIdTransferGet($farm_id)
Get active farm transfer request
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
try {
$result = $apiInstance->farmsFarmIdTransferGet($farm_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdTransferGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int |
\Swagger\Client\Model\FarmTransfer
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\FarmTransfer farmsFarmIdTransferPost($farm_id, $body)
Create farm transfer request
This action sends a request to target user and the farm will be transferred when that user confirm the request.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
$body = new \Swagger\Client\Model\\Swagger\Client\Model\Body(); // \Swagger\Client\Model\Body |
try {
$result = $apiInstance->farmsFarmIdTransferPost($farm_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsFarmIdTransferPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int | ||
body | \Swagger\Client\Model\Body | [optional] |
\Swagger\Client\Model\FarmTransfer
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object farmsGet()
List of accessed farms
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->farmsGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsGet: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
object
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
farmsIncomingConfirmPost($body)
Confirm transfer request
This action must be performed by user who received transfer request.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\\Swagger\Client\Model\Body(); // \Swagger\Client\Model\Body |
try {
$apiInstance->farmsIncomingConfirmPost($body);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsIncomingConfirmPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\Body |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object farmsIncomingGet($farm_id)
Get incoming farm transfer requests
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$farm_id = 56; // int |
try {
$result = $apiInstance->farmsIncomingGet($farm_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsIncomingGet: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
farm_id | int |
object
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
farmsIncomingRejectPost($body)
Reject transfer request
This action must be performed by user who received transfer request.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\\Swagger\Client\Model\Body(); // \Swagger\Client\Model\Body |
try {
$apiInstance->farmsIncomingRejectPost($body);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsIncomingRejectPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\Body |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Farm farmsPost($body)
Create new farm
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$body = new \Swagger\Client\Model\FarmCreateRequest(); // \Swagger\Client\Model\FarmCreateRequest |
try {
$result = $apiInstance->farmsPost($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsPost: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\FarmCreateRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object farmsTransfersGet()
Get active transfers requests of all available farms
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\FarmsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->farmsTransfersGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FarmsApi->farmsTransfersGet: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
object
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]