Balloon\Sdk\SharelinkV2Api

All URIs are relative to http://localhost

Method HTTP request Description
createLink POST /api/v2/nodes/{node}/share-link Create a unique sharing link of a node (global accessible): a possible existing link will be deleted if this method will be called.
deleteLink DELETE /api/v2/nodes/{node}/share-link Delete an existing sharing link

\Balloon\Sdk\Model\CoreV2Node createLink($node, $expiration, $password)

Create a unique sharing link of a node (global accessible): a possible existing link will be deleted if this method will be called.

Example

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


// Configure API key authorization: ApiKeyAuth
$config = Balloon\Sdk\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Balloon\Sdk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

// Configure HTTP basic authorization: BasicAuth
$config = Balloon\Sdk\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');

// Configure Bearer authorization: BearerAuth
$config = Balloon\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');



$apiInstance = new Balloon\Sdk\Api\SharelinkV2Api(
    // 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
);
$node = 'node_example'; // string | Node identifier
$expiration = 0; // float | Expire timestamp as unix timestap. Tells the server when the public link should expire automatically. The default is to never expire.
$password = 'password_example'; // string | Optionally set a password to protect the public link.

try {
    $result = $apiInstance->createLink($node, $expiration, $password);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SharelinkV2Api->createLink: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
node string Node identifier
expiration float Expire timestamp as unix timestap. Tells the server when the public link should expire automatically. The default is to never expire. [optional] [default to 0]
password string Optionally set a password to protect the public link. [optional]

Return type

\Balloon\Sdk\Model\CoreV2Node

Authorization

ApiKeyAuth, BasicAuth, BearerAuth, OpenID

HTTP request headers

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

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

deleteLink($node)

Delete an existing sharing link

Example

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


// Configure API key authorization: ApiKeyAuth
$config = Balloon\Sdk\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Balloon\Sdk\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer');

// Configure HTTP basic authorization: BasicAuth
$config = Balloon\Sdk\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');

// Configure Bearer authorization: BearerAuth
$config = Balloon\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');



$apiInstance = new Balloon\Sdk\Api\SharelinkV2Api(
    // 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
);
$node = 'node_example'; // string | Node identifier

try {
    $apiInstance->deleteLink($node);
} catch (Exception $e) {
    echo 'Exception when calling SharelinkV2Api->deleteLink: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
node string Node identifier

Return type

void (empty response body)

Authorization

ApiKeyAuth, BasicAuth, BearerAuth, OpenID

HTTP request headers

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

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