Skip to content

Latest commit

 

History

History
222 lines (158 loc) · 6.86 KB

StorageApi.md

File metadata and controls

222 lines (158 loc) · 6.86 KB

Aspose\BarCode\StorageApi

All URIs are relative to https://api.aspose.cloud/v3.0

Method HTTP request Description
getDiscUsage GET /barcode/storage/disc Get disc usage
getFileVersions GET /barcode/storage/version/{path} Get file versions
objectExists GET /barcode/storage/exist/{path} Check if file or folder exists
storageExists GET /barcode/storage/{storageName}/exist Check if storage exists

getDiscUsage

\Aspose\BarCode\Model\DiscUsage getDiscUsage($storage_name)

Get disc usage

Example

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

// Configure OAuth2 access token for authorization: JWT
$config = Aspose\BarCode\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Aspose\BarCode\Api\StorageApi(
    // 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
);
$storage_name = "storage_name_example"; // string | Storage name

try {
    $result = $apiInstance->getDiscUsage($storage_name);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StorageApi->getDiscUsage: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
storage_name string Storage name [optional]

Return type

\Aspose\BarCode\Model\DiscUsage

Authorization

JWT

HTTP request headers

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

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

getFileVersions

\Aspose\BarCode\Model\FileVersions getFileVersions($path, $storage_name)

Get file versions

Example

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

// Configure OAuth2 access token for authorization: JWT
$config = Aspose\BarCode\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Aspose\BarCode\Api\StorageApi(
    // 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
);
$path = "path_example"; // string | File path e.g. '/file.ext'
$storage_name = "storage_name_example"; // string | Storage name

try {
    $result = $apiInstance->getFileVersions($path, $storage_name);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StorageApi->getFileVersions: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
path string File path e.g. '/file.ext'
storage_name string Storage name [optional]

Return type

\Aspose\BarCode\Model\FileVersions

Authorization

JWT

HTTP request headers

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

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

objectExists

\Aspose\BarCode\Model\ObjectExist objectExists($path, $storage_name, $version_id)

Check if file or folder exists

Example

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

// Configure OAuth2 access token for authorization: JWT
$config = Aspose\BarCode\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Aspose\BarCode\Api\StorageApi(
    // 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
);
$path = "path_example"; // string | File or folder path e.g. '/file.ext' or '/folder'
$storage_name = "storage_name_example"; // string | Storage name
$version_id = "version_id_example"; // string | File version ID

try {
    $result = $apiInstance->objectExists($path, $storage_name, $version_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StorageApi->objectExists: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
path string File or folder path e.g. '/file.ext' or '/folder'
storage_name string Storage name [optional]
version_id string File version ID [optional]

Return type

\Aspose\BarCode\Model\ObjectExist

Authorization

JWT

HTTP request headers

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

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

storageExists

\Aspose\BarCode\Model\StorageExist storageExists($storage_name)

Check if storage exists

Example

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

// Configure OAuth2 access token for authorization: JWT
$config = Aspose\BarCode\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Aspose\BarCode\Api\StorageApi(
    // 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
);
$storage_name = "storage_name_example"; // string | Storage name

try {
    $result = $apiInstance->storageExists($storage_name);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StorageApi->storageExists: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
storage_name string Storage name

Return type

\Aspose\BarCode\Model\StorageExist

Authorization

JWT

HTTP request headers

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

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