All URIs are relative to https://truenas.local/api/v2.0.
Method | HTTP request | Description |
---|---|---|
cloudsyncGet() | GET /cloudsync | |
cloudsyncIdIdAbortPost() | POST /cloudsync/id/{id}/abort | |
cloudsyncIdIdDelete() | DELETE /cloudsync/id/{id} | |
cloudsyncIdIdGet() | GET /cloudsync/id/{id} | |
cloudsyncIdIdPut() | PUT /cloudsync/id/{id} | |
cloudsyncIdIdRestorePost() | POST /cloudsync/id/{id}/restore | |
cloudsyncIdIdSyncPost() | POST /cloudsync/id/{id}/sync | |
cloudsyncListBucketsPost() | POST /cloudsync/list_buckets | |
cloudsyncListDirectoryPost() | POST /cloudsync/list_directory | |
cloudsyncOnedriveListDrivesPost() | POST /cloudsync/onedrive_list_drives | |
cloudsyncPost() | POST /cloudsync | |
cloudsyncProvidersGet() | GET /cloudsync/providers | |
cloudsyncSyncOnetimePost() | POST /cloudsync/sync_onetime |
cloudsyncGet($limit, $offset, $count, $sort)
Query all Cloud Sync Tasks with query-filters
and query-options
. query-options.extra
can be specified as query parameters with prefixing them with extra.
prefix. For example, extra.retrieve_properties=false
will pass retrieve_properties
as an extra argument to pool/dataset endpoint.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\CloudsyncApi(
// 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
);
$limit = 56; // int
$offset = 56; // int
$count = True; // bool
$sort = 'sort_example'; // string
try {
$apiInstance->cloudsyncGet($limit, $offset, $count, $sort);
} catch (Exception $e) {
echo 'Exception when calling CloudsyncApi->cloudsyncGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
limit | int | [optional] | |
offset | int | [optional] | |
count | bool | [optional] | |
sort | string | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cloudsyncIdIdAbortPost($id)
Aborts cloud sync task.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\CloudsyncApi(
// 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
);
$id = 56; // int
try {
$apiInstance->cloudsyncIdIdAbortPost($id);
} catch (Exception $e) {
echo 'Exception when calling CloudsyncApi->cloudsyncIdIdAbortPost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cloudsyncIdIdDelete($id)
Deletes cloud_sync entry id
.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\CloudsyncApi(
// 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
);
$id = 56; // int
try {
$apiInstance->cloudsyncIdIdDelete($id);
} catch (Exception $e) {
echo 'Exception when calling CloudsyncApi->cloudsyncIdIdDelete: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cloudsyncIdIdGet($id)
Query all Cloud Sync Tasks with query-filters
and query-options
. query-options.extra
can be specified as query parameters with prefixing them with extra.
prefix. For example, extra.retrieve_properties=false
will pass retrieve_properties
as an extra argument to pool/dataset endpoint.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\CloudsyncApi(
// 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
);
$id = 56; // int
try {
$apiInstance->cloudsyncIdIdGet($id);
} catch (Exception $e) {
echo 'Exception when calling CloudsyncApi->cloudsyncIdIdGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cloudsyncIdIdPut($id)
Updates the cloud_sync entry id
with data
.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\CloudsyncApi(
// 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
);
$id = 56; // int
try {
$apiInstance->cloudsyncIdIdPut($id);
} catch (Exception $e) {
echo 'Exception when calling CloudsyncApi->cloudsyncIdIdPut: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cloudsyncIdIdRestorePost($id)
Create the opposite of cloud sync task id
(PULL if it was PUSH and vice versa).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\CloudsyncApi(
// 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
);
$id = 56; // int
try {
$apiInstance->cloudsyncIdIdRestorePost($id);
} catch (Exception $e) {
echo 'Exception when calling CloudsyncApi->cloudsyncIdIdRestorePost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cloudsyncIdIdSyncPost($id)
Run the cloud_sync job id
, syncing the local data to remote.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\CloudsyncApi(
// 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
);
$id = 56; // int
try {
$apiInstance->cloudsyncIdIdSyncPost($id);
} catch (Exception $e) {
echo 'Exception when calling CloudsyncApi->cloudsyncIdIdSyncPost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cloudsyncListBucketsPost($body)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\CloudsyncApi(
// 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 = 56; // int
try {
$apiInstance->cloudsyncListBucketsPost($body);
} catch (Exception $e) {
echo 'Exception when calling CloudsyncApi->cloudsyncListBucketsPost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
body | int | [optional] |
void (empty response body)
- Content-Type:
application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cloudsyncListDirectoryPost($cloudsync_list_directory0)
List contents of a remote bucket / directory. If remote supports buckets, path is constructed by two keys "bucket"/"folder" in attributes
. If remote does not support buckets, path is constructed using "folder" key only in attributes
. "folder" is directory name and "bucket" is bucket name for remote. Path examples: S3 Service bucketname/directory/name
Dropbox Service directory/name
credentials
is a valid id of a Cloud Sync Credential which will be used to connect to the provider.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\CloudsyncApi(
// 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
);
$cloudsync_list_directory0 = new \RMoore\Truenas\Model\CloudsyncListDirectory0(); // \RMoore\Truenas\Model\CloudsyncListDirectory0
try {
$apiInstance->cloudsyncListDirectoryPost($cloudsync_list_directory0);
} catch (Exception $e) {
echo 'Exception when calling CloudsyncApi->cloudsyncListDirectoryPost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
cloudsync_list_directory0 | \RMoore\Truenas\Model\CloudsyncListDirectory0 | [optional] |
void (empty response body)
- Content-Type:
application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cloudsyncOnedriveListDrivesPost($cloudsync_onedrive_list_drives0)
Lists all available drives and their types for given Microsoft OneDrive credentials.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\CloudsyncApi(
// 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
);
$cloudsync_onedrive_list_drives0 = new \RMoore\Truenas\Model\CloudsyncOnedriveListDrives0(); // \RMoore\Truenas\Model\CloudsyncOnedriveListDrives0
try {
$apiInstance->cloudsyncOnedriveListDrivesPost($cloudsync_onedrive_list_drives0);
} catch (Exception $e) {
echo 'Exception when calling CloudsyncApi->cloudsyncOnedriveListDrivesPost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
cloudsync_onedrive_list_drives0 | \RMoore\Truenas\Model\CloudsyncOnedriveListDrives0 | [optional] |
void (empty response body)
- Content-Type:
application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cloudsyncPost($cloudsync_create0)
Creates a new cloud_sync entry.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\CloudsyncApi(
// 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
);
$cloudsync_create0 = new \RMoore\Truenas\Model\CloudsyncCreate0(); // \RMoore\Truenas\Model\CloudsyncCreate0
try {
$apiInstance->cloudsyncPost($cloudsync_create0);
} catch (Exception $e) {
echo 'Exception when calling CloudsyncApi->cloudsyncPost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
cloudsync_create0 | \RMoore\Truenas\Model\CloudsyncCreate0 | [optional] |
void (empty response body)
- Content-Type:
application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cloudsyncProvidersGet()
Returns a list of dictionaries of supported providers for Cloud Sync Tasks. credentials_schema
is JSON schema for credentials attributes. task_schema
is JSON schema for task attributes. buckets
is a boolean value which is set to "true" if provider supports buckets. Example of a single provider: [ { "name": "AMAZON_CLOUD_DRIVE", "title": "Amazon Cloud Drive", "credentials_schema": [ { "property": "client_id", "schema": { "title": "Amazon Application Client ID", "required": true, "type": "string" } }, { "property": "client_secret", "schema": { "title": "Application Key", "required": true, "type": "string" } } ], "credentials_oauth": null, "buckets": false, "bucket_title": "Bucket", "task_schema": [] } ]
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\CloudsyncApi(
// 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 {
$apiInstance->cloudsyncProvidersGet();
} catch (Exception $e) {
echo 'Exception when calling CloudsyncApi->cloudsyncProvidersGet: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
cloudsyncSyncOnetimePost($cloudsync_sync_onetime)
Run cloud sync task without creating it.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = RMoore\Truenas\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new RMoore\Truenas\Api\CloudsyncApi(
// 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
);
$cloudsync_sync_onetime = new \RMoore\Truenas\Model\CloudsyncSyncOnetime(); // \RMoore\Truenas\Model\CloudsyncSyncOnetime
try {
$apiInstance->cloudsyncSyncOnetimePost($cloudsync_sync_onetime);
} catch (Exception $e) {
echo 'Exception when calling CloudsyncApi->cloudsyncSyncOnetimePost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
cloudsync_sync_onetime | \RMoore\Truenas\Model\CloudsyncSyncOnetime | [optional] |
void (empty response body)
- Content-Type:
application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]