Skip to content

Latest commit

 

History

History
191 lines (136 loc) · 5.39 KB

InternalApi.md

File metadata and controls

191 lines (136 loc) · 5.39 KB

Onepanel.InternalApi

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

Method HTTP request Description
getRemoteProvider GET /providers/{id} Get details of a remote Oneprovider
health GET /health Check cluster health
testImage GET /test_image Get test image

getRemoteProvider

RemoteProviderDetails getRemoteProvider(id)

Get details of a remote Oneprovider

Returns the details of given provider. Only users belonging to that Oneprovider's cluster can fetch its details.

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

var id = "id_example"; // String | Id of requested Oneprovider.


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

Parameters

Name Type Description Notes
id String Id of requested Oneprovider.

Return type

RemoteProviderDetails

Authorization

api_key1, api_key2, basic

HTTP request headers

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

health

health()

Check cluster health

Returns status code indicating onepanel service health status. This endpoint does not require authentication.

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

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

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

api_key1, api_key2, basic

HTTP request headers

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

testImage

testImage()

Get test image

This endpoint returns a dummy image in `.png` format. It is used internally by web applications across Onedata to check connectivity with certain services. This endpoint does not require authentication.

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

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

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

api_key1, api_key2, basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: image/png