Skip to content

Latest commit

 

History

History
132 lines (93 loc) · 3.86 KB

DebugApi.md

File metadata and controls

132 lines (93 loc) · 3.86 KB

Onepanel.DebugApi

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

Method HTTP request Description
getTransfersMock GET /provider/debug/transfers_mock Get transfers mock status
modifyTransfersMock PATCH /provider/debug/transfers_mock Modify transfers mock

getTransfersMock

TransfersMock getTransfersMock()

Get transfers mock status

Returns information whether transfers mocking is enabled.

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.DebugApi();

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

Parameters

This endpoint does not need any parameter.

Return type

TransfersMock

Authorization

api_key1, api_key2, basic

HTTP request headers

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

modifyTransfersMock

modifyTransfersMock(transfersMock)

Modify transfers mock

Toggle transfers mock. When enabled, all transfers finish successfully without actually transferring data. WARNING: this is a debugging feature disrupting normal Oneprovider operation.

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.DebugApi();

var transfersMock = new Onepanel.TransfersMock(); // TransfersMock | New value for the mock setting.


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

Parameters

Name Type Description Notes
transfersMock TransfersMock New value for the mock setting.

Return type

null (empty response body)

Authorization

api_key1, api_key2, basic

HTTP request headers

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