Skip to content

Files

Latest commit

 Cannot retrieve latest commit at this time.

History

History
289 lines (202 loc) · 10.6 KB

FtpApi.md

File metadata and controls

289 lines (202 loc) · 10.6 KB

OpenAPI\Client\FtpApi

All URIs are relative to http://localhost, except if the operation defines another base path.

Method HTTP request Description
createFtpUser() POST /orgs/{org_id}/websites/{website_id}/ftp/users Creates a new FTP user for a given website
deleteFtpUser() DELETE /orgs/{org_id}/websites/{website_id}/ftp/users/{username} Deletes given FTP user
getFtpUsers() GET /orgs/{org_id}/websites/{website_id}/ftp/users Returns all ftp users data for a given website
updateFtpUser() PATCH /orgs/{org_id}/websites/{website_id}/ftp/users/{username} Update given FTP user

createFtpUser()

createFtpUser($org_id, $website_id, $new_ftp_user, $create_home): \OpenAPI\Client\Model\NewResourceUuid

Creates a new FTP user for a given website

Endpoint for creating a new FTP user. NOTE: user.account well get appended with website's primary domain. i.e. username will become username@domain.com Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: sessionCookie
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('id0', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('id0', 'Bearer');

// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\FtpApi(
    // 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
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$new_ftp_user = new \OpenAPI\Client\Model\NewFtpUser(); // \OpenAPI\Client\Model\NewFtpUser | FTP User
$create_home = True; // bool | If set to true we will try to crete a new home_dir for the user if does not exist.

try {
    $result = $apiInstance->createFtpUser($org_id, $website_id, $new_ftp_user, $create_home);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FtpApi->createFtpUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
new_ftp_user \OpenAPI\Client\Model\NewFtpUser FTP User
create_home bool If set to true we will try to crete a new home_dir for the user if does not exist. [optional]

Return type

\OpenAPI\Client\Model\NewResourceUuid

Authorization

sessionCookie, bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteFtpUser()

deleteFtpUser($org_id, $website_id, $username, $delete_home)

Deletes given FTP user

Endpoint for deleting FTP user for a given website. User homeDir can only be deleted if it is a subdir for the website home. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: sessionCookie
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('id0', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('id0', 'Bearer');

// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\FtpApi(
    // 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
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$username = 'username_example'; // string
$delete_home = True; // bool | If set to true we will try to delete the homeDir for the user. User homeDir can only be deleted if it is a subdir for the website home.

try {
    $apiInstance->deleteFtpUser($org_id, $website_id, $username, $delete_home);
} catch (Exception $e) {
    echo 'Exception when calling FtpApi->deleteFtpUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
username string
delete_home bool If set to true we will try to delete the homeDir for the user. User homeDir can only be deleted if it is a subdir for the website home. [optional]

Return type

void (empty response body)

Authorization

sessionCookie, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getFtpUsers()

getFtpUsers($org_id, $website_id): \OpenAPI\Client\Model\FtpUsersFullListing

Returns all ftp users data for a given website

Endpoint for retreaving ftp users for a given website Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: sessionCookie
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('id0', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('id0', 'Bearer');

// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\FtpApi(
    // 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
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.

try {
    $result = $apiInstance->getFtpUsers($org_id, $website_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FtpApi->getFtpUsers: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.

Return type

\OpenAPI\Client\Model\FtpUsersFullListing

Authorization

sessionCookie, bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateFtpUser()

updateFtpUser($org_id, $website_id, $username, $ftp_user_update)

Update given FTP user

Endpoint for updating FTP user for a given website We only allow user's homeDir and password to be updated. Session holder must be at least a SuperAdmin in this org or a parent org, or be a member in this org that has access to the website.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: sessionCookie
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('id0', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('id0', 'Bearer');

// Configure Bearer authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\FtpApi(
    // 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
);
$org_id = 'org_id_example'; // string | The id of the organization.
$website_id = 'website_id_example'; // string | The id of the website.
$username = 'username_example'; // string
$ftp_user_update = new \OpenAPI\Client\Model\FtpUserUpdate(); // \OpenAPI\Client\Model\FtpUserUpdate | FTP User

try {
    $apiInstance->updateFtpUser($org_id, $website_id, $username, $ftp_user_update);
} catch (Exception $e) {
    echo 'Exception when calling FtpApi->updateFtpUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
org_id string The id of the organization.
website_id string The id of the website.
username string
ftp_user_update \OpenAPI\Client\Model\FtpUserUpdate FTP User

Return type

void (empty response body)

Authorization

sessionCookie, bearerAuth

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]