0.1.2 • Published 8 years ago

vega_os_api v0.1.2

Weekly downloads
1
License
Apache-2.0
Repository
-
Last release
8 years ago

vega_os_api

VegaOsApi - JavaScript client for vega_os_api This is a Vega OS Api Reference. Content-Type is application/json All timestamps are returned in ISO 8601 format: * All key/value are optional unless noted otherwise. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.1.2
  • Package version: 0.1.2
  • Build date: 2016-08-29T00:53:12.448Z
  • Build package: class io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install vega_os_api --save

git

If the library is hosted at a git repository, e.g. https://github.com/YOUR_USERNAME/vega_os_api then install it via:

    npm install YOUR_USERNAME/vega_os_api --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Getting Started

Please follow the installation instruction and execute the following JS code:

var VegaOsApi = require('vega_os_api');

var defaultClient = VegaOsApi.ApiClient.instance;

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

var api = new VegaOsApi.AppsApi()

var appName = "appName_example"; // {String} 


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

Documentation for API Endpoints

All URIs are relative to http://218.108.7.113:8080/

ClassMethodHTTP requestDescription
VegaOsApi.AppsApiappsAppNameGetGET /apps/{app_name}Get application configuration and status
VegaOsApi.AppsApiappsAppNamePatchPATCH /apps/{app_name}Modify application configurations
VegaOsApi.AppsApiappsGetGET /appsGet all application configuration and status
VegaOsApi.CommonApirootGetGET /Ping the API server
VegaOsApi.HostnameApihostnameGetGET /hostnameReturn hostname information
VegaOsApi.HostnameApihostnamePutPUT /hostnameModify hostname information
VegaOsApi.InterfaceApiinterfaceIfManagementIpGetGET /interface/{if_management}/ipReturn IP status for management interface
VegaOsApi.InterfaceApiinterfaceIfManagementRoutesGetGET /interface/{if_management}/routesReturn network routes for management interface
VegaOsApi.InterfaceApiinterfaceIfMgtGuestMacGetGET /interface/{if_mgt_guest}/macReturn MAC address for mangement interface and guest interface
VegaOsApi.InterfaceApiinterfaceIfnameGetGET /interface/{ifname}Return configurations for interface ifname
VegaOsApi.InterfaceApiinterfaceIfnameMaclearningGetGET /interface/{ifname}/maclearningReturn MAC learning table for interface `ifname`
VegaOsApi.InterfaceApiinterfaceIfnamePatchPATCH /interface/{ifname}Modify configurations for interface `ifname`
VegaOsApi.InterfaceApiinterfaceIfnameStatusGetGET /interface/{ifname}/statusReturn interface status for interface `ifname`
VegaOsApi.InterfaceApiinterfacesGetGET /interfacesReturn configurations for all interfaces
VegaOsApi.InterfaceApiinterfacesMaclearningGetGET /interfaces/maclearningReturn MAC learning table for all interfaces
VegaOsApi.InterfaceApiinterfacesPatchPATCH /interfacesModify configurations for all interfaces
VegaOsApi.NtpApintpEnableGetGET /ntp/enableReturn NTP enable configuration
VegaOsApi.NtpApintpEnablePutPUT /ntp/enableSet NTP enable configuration
VegaOsApi.NtpApintpGetGET /ntpReturn NTP configurations
VegaOsApi.NtpApintpPatchPATCH /ntpModify NTP configurations
VegaOsApi.NtpApintpServersDeleteDELETE /ntp/serversDelete NTP servers
VegaOsApi.NtpApintpServersGetGET /ntp/serversReturn NTP servers configuration
VegaOsApi.NtpApintpServersPostPOST /ntp/serversAdd NTP servers
VegaOsApi.NtpApintpServersPutPUT /ntp/serversSet NTP servers
VegaOsApi.SyslogApisyslogEnableGetGET /syslog/enableReturn syslog enable configuration
VegaOsApi.SyslogApisyslogEnablePutPUT /syslog/enableSet syslog enable configuration
VegaOsApi.SyslogApisyslogGetGET /syslogReturn syslog configurations
VegaOsApi.SyslogApisyslogPatchPATCH /syslogModify syslog configurations
VegaOsApi.SyslogApisyslogServersDeleteDELETE /syslog/serversDelete syslog servers
VegaOsApi.SyslogApisyslogServersGetGET /syslog/serversReturn syslog servers configuration
VegaOsApi.SyslogApisyslogServersPostPOST /syslog/serversAdd syslog servers
VegaOsApi.SyslogApisyslogServersPutPUT /syslog/serversSet syslog servers
VegaOsApi.SystemApisystemConfigsDefaultGetGET /system/configs/defaultReturn default configurations
VegaOsApi.SystemApisystemConfigsDefaultPatchPATCH /system/configs/defaultModify default configurations
VegaOsApi.SystemApisystemConfigsRunningGetGET /system/configs/runningReturn running configurations
VegaOsApi.SystemApisystemConfigsRunningPatchPATCH /system/configs/runningModify running configurations
VegaOsApi.SystemApisystemConfigsStartupGetGET /system/configs/startupReturn startup configurations
VegaOsApi.SystemApisystemConfigsStartupPatchPATCH /system/configs/startupModify startup configurations
VegaOsApi.SystemApisystemDiagnosticsGetGET /system/diagnosticsReturn system diagnostics
VegaOsApi.SystemApisystemDuplicatesGetGET /system/duplicatesReturn system duplication progress
VegaOsApi.SystemApisystemDuplicatesPostPOST /system/duplicatesDuplicate the current system to the other partition
VegaOsApi.SystemApisystemGetGET /systemReturn system information
VegaOsApi.SystemApisystemHardwareSensorsGetGET /system/hardware/sensorsReturns system hardware sensor readings
VegaOsApi.SystemApisystemJournalGetGET /system/journalRespones
VegaOsApi.SystemApisystemTimeGetGET /system/timeReturn system time
VegaOsApi.SystemApisystemUpdatesGetGET /system/updatesReturn system update progress
VegaOsApi.SystemApisystemUpdatesPostPOST /system/updatesUpdate the other partition with update file in FTP directory
VegaOsApi.SystemApisystemVersionGetGET /system/versionReturn system software version

Documentation for Models

Documentation for Authorization

basicAuth

  • Type: HTTP basic authentication