All URIs are relative to https://localhost/api/v3/onepanel
Method | HTTP request | Description |
---|---|---|
getProviderSpaces | GET /provider/spaces | Get provider spaces |
getSpaceDetails | GET /provider/spaces/{id} | Get space details |
modifySpace | PATCH /provider/spaces/{id} | Modify space details |
revokeSpaceSupport | DELETE /provider/spaces/{id} | Revoke space support for a space |
supportSpace | POST /provider/spaces | Support space |
ProviderSpaces getProviderSpaces()
Get provider spaces
Returns the list of spaces supported by the provider. Example cURL requests Get provider space ids ```bash curl -H "X-Auth-Token: $TOKEN" -X GET https://$OP_PANEL_HOST/api/v3/onepanel/provider/spaces { "ids": [ "0614a7a1512271ceeae95539872eeeabched69", "06911eba60e6ba947f86f799ce975042chad21", "109b7d84c00cd45a88b6cdb852dba5b3ch84db" ] } ```
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.SpaceSupportApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getProviderSpaces(callback);
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
SpaceDetails getSpaceDetails(id)
Get space details
Returns details of space specified by space Id in the path. Example cURL requests Get space details ```bash curl -H "X-Auth-Token: $TOKEN" -X GET https://$OP_PANEL_HOST/api/v3/onepanel/provider/spaces/$SPACE_ID { "supportingProviders": { "03c7e42a793912307b01b1bbb72a3a6bch4c1c": 10000000 }, "storageId": "18a42a43b1b2d92455ffa09e9a15df7fch4f82", "spaceOccupancy": 0, "name": "someSpace", "localStorages": ["18a42a43b1b2d92455ffa09e9a15df7fch4f82"], "importedStorage": false, "id": "16403a6c45105010dc7103e31874cb3echac41", "accountingEnabled": false, "dirStatsServiceEnabled": true, "dirStatsServiceStatus": "initializing" } ```
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.SpaceSupportApi();
var id = "id_example"; // String | The Id of a space which details should be returned.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getSpaceDetails(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | String | The Id of a space which details should be returned. |
- Content-Type: Not defined
- Accept: application/json
modifySpace(id, spaceModifyRequest)
Modify space details
Modifies the space import/update strategies. Example cURL requests Modify space support size ```bash curl -H "X-Auth-Token: $TOKEN" -X PATCH https://$OP_PANEL_HOST/api/v3/onepanel/provider/spaces/$SPACE_ID \ -H "Content-Type: application/json" -d '{"size": 30000000}' ```
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.SpaceSupportApi();
var id = "id_example"; // String | The Id of a space which details should be modified.
var spaceModifyRequest = new Onepanel.SpaceModifyRequest(); // SpaceModifyRequest |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.modifySpace(id, spaceModifyRequest, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | String | The Id of a space which details should be modified. | |
spaceModifyRequest | SpaceModifyRequest |
null (empty response body)
- Content-Type: application/json
- Accept: Not defined
revokeSpaceSupport(id)
Revoke space support for a space
Allows provider to revoke storage support for a specific space. Users with access to this space will no longer be able to store data on the resources of this provider. Example cURL requests Revoke space support ```bash curl -H "X-Auth-Token: $TOKEN" -X DELETE https://$OP_PANEL_HOST/api/v3/onepanel/provider/spaces/$SPACE_ID ```
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.SpaceSupportApi();
var id = "id_example"; // String | The Id of a space to be removed.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.revokeSpaceSupport(id, callback);
Name | Type | Description | Notes |
---|---|---|---|
id | String | The Id of a space to be removed. |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Id supportSpace(spaceSupportRequest)
Support space
Supports an existing space. Example cURL requests Support space ```bash curl -H "X-Auth-Token: $TOKEN" -X POST https://$OP_PANEL_HOST/api/v3/onepanel/provider/spaces \ -H "Content-Type: application/json" -d '{ "token": "MDAU02QHLaaJ00go", "size": 10000000, "storageId": "18a42a43b1b2d9e9a1f82" }' { "id": "16403a6c45105010dc7103e31874cb3echac41" } ```
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.SpaceSupportApi();
var spaceSupportRequest = new Onepanel.SpaceSupportRequest(); // SpaceSupportRequest | Specification of the space support request including support size and token.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.supportSpace(spaceSupportRequest, callback);
Name | Type | Description | Notes |
---|---|---|---|
spaceSupportRequest | SpaceSupportRequest | Specification of the space support request including support size and token. |
- Content-Type: application/json
- Accept: Not defined