Skip to content

Latest commit

 

History

History
339 lines (238 loc) · 11.7 KB

StorageImportApi.md

File metadata and controls

339 lines (238 loc) · 11.7 KB

Onepanel.StorageImportApi

All URIs are relative to https://localhost/api/v3/onepanel

Method HTTP request Description
forceStartAutoStorageImportScan POST /provider/spaces/{id}/storage-import/auto/force-start Force start auto storage import scan
forceStopAutoStorageImportScan POST /provider/spaces/{id}/storage-import/auto/force-stop Force stop auto storage import scan
getAutoStorageImportInfo GET /provider/spaces/{id}/storage-import/auto/info Get information about auto storage import scan
getAutoStorageImportStats GET /provider/spaces/{id}/storage-import/auto/stats Get statistics of auto storage import mechanism
getManualStorageImportExample GET /provider/spaces/{id}/storage-import/manual/example Get manual storage import example

forceStartAutoStorageImportScan

forceStartAutoStorageImportScan(id)

Force start auto storage import scan

Forcefully starts scan of auto storage import mechanism in given space.

Example

var Onepanel = require('onepanel');
var defaultClient = Onepanel.ApiClient.instance;

// Configure API key authorization: api_key1
var api_key1 = defaultClient.authentications['api_key1'];
api_key1.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key1.apiKeyPrefix = 'Token';

// Configure API key authorization: api_key2
var api_key2 = defaultClient.authentications['api_key2'];
api_key2.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key2.apiKeyPrefix = 'Token';

// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';

var apiInstance = new Onepanel.StorageImportApi();

var id = "id_example"; // String | The Id of a space.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.forceStartAutoStorageImportScan(id, callback);

Parameters

Name Type Description Notes
id String The Id of a space.

Return type

null (empty response body)

Authorization

api_key1, api_key2, basic

HTTP request headers

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

forceStopAutoStorageImportScan

forceStopAutoStorageImportScan(id)

Force stop auto storage import scan

Forcefully stops current scan of auto storage import mechanism in given space.

Example

var Onepanel = require('onepanel');
var defaultClient = Onepanel.ApiClient.instance;

// Configure API key authorization: api_key1
var api_key1 = defaultClient.authentications['api_key1'];
api_key1.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key1.apiKeyPrefix = 'Token';

// Configure API key authorization: api_key2
var api_key2 = defaultClient.authentications['api_key2'];
api_key2.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key2.apiKeyPrefix = 'Token';

// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';

var apiInstance = new Onepanel.StorageImportApi();

var id = "id_example"; // String | The Id of a space.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.forceStopAutoStorageImportScan(id, callback);

Parameters

Name Type Description Notes
id String The Id of a space.

Return type

null (empty response body)

Authorization

api_key1, api_key2, basic

HTTP request headers

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

getAutoStorageImportInfo

AutoStorageImportInfo getAutoStorageImportInfo(id)

Get information about auto storage import scan

Returns information about current or last finished auto storage import scan.

Example

var Onepanel = require('onepanel');
var defaultClient = Onepanel.ApiClient.instance;

// Configure API key authorization: api_key1
var api_key1 = defaultClient.authentications['api_key1'];
api_key1.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key1.apiKeyPrefix = 'Token';

// Configure API key authorization: api_key2
var api_key2 = defaultClient.authentications['api_key2'];
api_key2.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key2.apiKeyPrefix = 'Token';

// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';

var apiInstance = new Onepanel.StorageImportApi();

var id = "id_example"; // String | The Id of a space for which storage import stats should be returned.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getAutoStorageImportInfo(id, callback);

Parameters

Name Type Description Notes
id String The Id of a space for which storage import stats should be returned.

Return type

AutoStorageImportInfo

Authorization

api_key1, api_key2, basic

HTTP request headers

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

getAutoStorageImportStats

AutoStorageImportStats getAutoStorageImportStats(id, period, metrics)

Get statistics of auto storage import mechanism

Returns requested statistics of auto storage import mechanism for given space on this provider.

Example

var Onepanel = require('onepanel');
var defaultClient = Onepanel.ApiClient.instance;

// Configure API key authorization: api_key1
var api_key1 = defaultClient.authentications['api_key1'];
api_key1.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key1.apiKeyPrefix = 'Token';

// Configure API key authorization: api_key2
var api_key2 = defaultClient.authentications['api_key2'];
api_key2.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key2.apiKeyPrefix = 'Token';

// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';

var apiInstance = new Onepanel.StorageImportApi();

var id = "id_example"; // String | The Id of a space for which storage import stats should be returned.

var period = "period_example"; // String | Predefined time period for which the statistics should be fetched.

var metrics = "metrics_example"; // String | Specify which statistic metrics should be returned - strings delimited with comma. Accepted values are: `queueLength`, `createdFiles`, `modifiedFiles`, `deletedFiles` 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getAutoStorageImportStats(id, period, metrics, callback);

Parameters

Name Type Description Notes
id String The Id of a space for which storage import stats should be returned.
period String Predefined time period for which the statistics should be fetched.
metrics String Specify which statistic metrics should be returned - strings delimited with comma. Accepted values are: `queueLength`, `createdFiles`, `modifiedFiles`, `deletedFiles`

Return type

AutoStorageImportStats

Authorization

api_key1, api_key2, basic

HTTP request headers

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

getManualStorageImportExample

ManualStorageImportExample getManualStorageImportExample(id)

Get manual storage import example

Returns example `curl` command that can be executed to manually import (register) file from storage. The command is filled with correct host of the Oneprovider, space and storage ids. In order to execute the command, user must set 3 variables: * `TOKEN` - Onedata access token. * `STORAGE_FILE_ID` - Identifier of the file on storage, relevant for given storage backend: * path on POSIX-compatible or canonical object storages, e.g. /dir/file.txt, * URL on HTTP based storages, e.g. https://www.example.org/data/21/run123.tar. * `DESTINATION_PATH` - An absolute path in space where file should be created. For more info please read: https://onedata.org/#/home/api/stable/oneprovider?anchor=tag/File-registration

Example

var Onepanel = require('onepanel');
var defaultClient = Onepanel.ApiClient.instance;

// Configure API key authorization: api_key1
var api_key1 = defaultClient.authentications['api_key1'];
api_key1.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key1.apiKeyPrefix = 'Token';

// Configure API key authorization: api_key2
var api_key2 = defaultClient.authentications['api_key2'];
api_key2.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key2.apiKeyPrefix = 'Token';

// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';

var apiInstance = new Onepanel.StorageImportApi();

var id = "id_example"; // String | The Id of a space for which the example command should be generated.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getManualStorageImportExample(id, callback);

Parameters

Name Type Description Notes
id String The Id of a space for which the example command should be generated.

Return type

ManualStorageImportExample

Authorization

api_key1, api_key2, basic

HTTP request headers

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