2.0.0 • Published 3 years ago

hivelocity_api v2.0.0

Weekly downloads
-
License
Unlicense
Repository
-
Last release
3 years ago

hivelocity_api

HivelocityApi - JavaScript client for hivelocity_api Interact with Hivelocity This SDK is automatically generated by the Swagger Codegen project:

  • API version: 2.0
  • Package version: 2.0
  • Build package: 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 hivelocity_api --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your hivelocity_api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('hivelocity_api') in javascript files from the directory you ran the last command above from.

git

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

    npm install YOUR_USERNAME/hivelocity_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, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

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

var HivelocityApi = require('hivelocity_api');

var defaultClient = HivelocityApi.ApiClient.instance;

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

var api = new HivelocityApi.BandwidthApi()

var deviceId = 56; // {Number} ID of Device to View

var period = "day"; // {String} Preconfigured Time Periods for Graph Data

var _interface = "eth0"; // {String} Network Interface to use for Graph Data

var opts = { 
  'start': 0, // {Number} Start Time of Custom Time Period. (Unix Epoch Time)
  'end': 1635778021, // {Number} End Time of Custom Time Period (Unix Epoch Time)
  'xFields': "xFields_example" // {String} An optional fields mask
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.postDeviceIdBandwidthImageResource(deviceId, period, _interface, opts, callback);

Documentation for API Endpoints

All URIs are relative to https://localhost/api/v2

ClassMethodHTTP requestDescription
HivelocityApi.BandwidthApipostDeviceIdBandwidthImageResourcePOST /bandwidth/device/{deviceId}/imageReturns RRDTool Graph based bandwidth in PNG format
HivelocityApi.BandwidthApipostDeviceIdBandwidthResourcePOST /bandwidth/device/{deviceId}Returns RRDTool Xport based bandwidth data in JSON format
HivelocityApi.BandwidthApipostServiceIdBandwidthImageResourcePOST /bandwidth/service/{serviceId}/imageReturns RRDTool Graph based bandwidth in PNG format
HivelocityApi.BandwidthApipostServiceIdBandwidthResourcePOST /bandwidth/service/{serviceId}Returns RRDTool Xport based bandwidth data in JSON format
HivelocityApi.BareMetalDevicesApideleteBareMetalDeviceIdResourceDELETE /bare-metal-devices/{deviceId}Cancel the specified bare metal device
HivelocityApi.BareMetalDevicesApigetBareMetalDeviceIdResourceGET /bare-metal-devices/{deviceId}Return bare metal device
HivelocityApi.BareMetalDevicesApigetBareMetalDeviceResourceGET /bare-metal-devices/Return a list with all servers as bare metal
HivelocityApi.BareMetalDevicesApipostBareMetalDeviceResourcePOST /bare-metal-devices/Deploy a new bare metal server
HivelocityApi.BareMetalDevicesApiputBareMetalDeviceIdResourcePUT /bare-metal-devices/{deviceId}Update a bare metal device
HivelocityApi.BillingInfoApigetBillingInfoResourceGET /billing-info/Return a list with all Billing Info
HivelocityApi.BillingInfoApipostBillingInfoResourcePOST /billing-info/Create verification for credit card with all Billing Info
HivelocityApi.BillingInfoApiputBillingInfoResourcePUT /billing-info/Verify credit card with all Billing Info
HivelocityApi.CancellationApigetCancellationDeviceResourceGET /cancellation/device/{deviceId}Return the Cancellation found for a Device
HivelocityApi.CancellationApigetCancellationIdResourceGET /cancellation/cancellation/{cancellationId}Return any cancellation by ID
HivelocityApi.CancellationApigetCancellationResourceGET /cancellation/cancellationReturn the services cancellations of a client
HivelocityApi.CancellationApigetCancellationServiceResourceGET /cancellation/service/{serviceId}Return the Cancellation found for a Service
HivelocityApi.CancellationApipostCancellationResourcePOST /cancellation/cancellationCreates Cancellation for a device/service
HivelocityApi.ContactApideleteContactIdResourceDELETE /contact/{contactId}Delete a Contact
HivelocityApi.ContactApigetContactIdResourceGET /contact/{contactId}Return details of a specific Contact
HivelocityApi.ContactApigetContactResourceGET /contact/Return a list with all Contacts
HivelocityApi.ContactApipostContactResourcePOST /contact/Create a new Contact
HivelocityApi.ContactApipostPasswordResetPOST /contact/passwordRecieve a request to reset password, and send a link by email with token
HivelocityApi.ContactApiputContactIdResourcePUT /contact/{contactId}Edit a Contact
HivelocityApi.ContactApiputPasswordResetPUT /contact/passwordRecieve a token and password, verify the user and reset your password
HivelocityApi.ContactApiputPasswordResourcePUT /contact/{contactId}/passwordChange password for a Contact
HivelocityApi.CreditApigetCreditResourceGET /credit/Return a list with all Credits
HivelocityApi.CreditApigetTotalActiveCreditResourceGET /credit/totalReturn the client's total active credit amount
HivelocityApi.CreditApipostCreditResourcePOST /credit/Receive billing method id and amount and return the created Credit
HivelocityApi.DeploymentApideleteDeploymentIdResourceDELETE /deploy/{deploymentId}Delete the specified deployment
HivelocityApi.DeploymentApigetDeploymentIdResourceGET /deploy/{deploymentId}Return a dictionary with deployment information
HivelocityApi.DeploymentApigetDeploymentResourceGET /deploy/Return a list with all client deployments
HivelocityApi.DeploymentApipostDeploymentIdResourcePOST /deploy/{deploymentId}Input a billing info id and script to process and finish a deployment
HivelocityApi.DeploymentApipostDeploymentResourcePOST /deploy/Start a new deployment
HivelocityApi.DeploymentApiputDeploymentIdResourcePUT /deploy/{deploymentId}Receive product, quantity and options to be added on the deployment
HivelocityApi.DeviceApigetAllDeviceTagOrderResourceGET /device/tags-order/allGet all device tags order
HivelocityApi.DeviceApigetClientDeviceTagOrderResourceGET /device/tags-orderGet device tags order for current user
HivelocityApi.DeviceApigetClientDeviceTagResourceGET /device/tagsGet all device tags for current client
HivelocityApi.DeviceApigetDeviceIdEventResourceGET /device/{deviceId}/eventsReturns all Events found for a single device
HivelocityApi.DeviceApigetDeviceIdResourceGET /device/{deviceId}Returns detailed information for a Single Device
HivelocityApi.DeviceApigetDeviceIpminatRuleResourceGET /device/{deviceId}/ipmi/natClear NAT rules based on the device client id
HivelocityApi.DeviceApigetDeviceResourceGET /device/Return Active Devices and basic MetaData
HivelocityApi.DeviceApigetDeviceTagIdResourceGET /device/{deviceId}/tagsGet device tags
HivelocityApi.DeviceApigetInitialCredsIdResourceGET /device/{deviceId}/initial-credsReturns initial password for the device
HivelocityApi.DeviceApigetInitialPasswordIdResourceGET /device/{deviceId}/initial-passwordReturns initial password for the device
HivelocityApi.DeviceApigetIpmiInfoIdResourceGET /device/{deviceId}/ipmiReturns IPMI info data
HivelocityApi.DeviceApigetIpmiInfoLoginDataResourceGET /device/{deviceId}/ipmi/login-dataReturns IPMI login credentials
HivelocityApi.DeviceApigetIpmiThresholdsIdResourceGET /device/{deviceId}/ipmi/thresholdsReturns IPMI thresholds data
HivelocityApi.DeviceApigetIpmiValidLoginIdResourceGET /device/{deviceId}/ipmi/valid-loginReturns if device have valid credentials for IPMI login
HivelocityApi.DeviceApigetNetworkInterfaceResourceGET /device/{deviceId}/interfacesReturns a list of all Network Interfaces bound to a Device
HivelocityApi.DeviceApigetPowerResourceGET /device/{deviceId}/powerGet device's current power status
HivelocityApi.DeviceApipostDeviceIpmiWhitelistResourcePOST /device/{deviceId}/ipmi/whitelist/Add a public IP on IPMI whitelist
HivelocityApi.DeviceApipostDeviceReloadResourcePOST /device/{deviceId}/reloadReload any SPS Device with any available OS
HivelocityApi.DeviceApipostPowerResourcePOST /device/{deviceId}/powerApply action to device power
HivelocityApi.DeviceApiputClientDeviceTagOrderResourcePUT /device/tags-orderUpdate device tags order for current user
HivelocityApi.DeviceApiputDeviceIdResourcePUT /device/{deviceId}Updates Device MetaData for a Single Device
HivelocityApi.DeviceApiputDeviceTagIdResourcePUT /device/{deviceId}/tagsUpdate device tags
HivelocityApi.DeviceApiputIpmiDevicesThresholdsIdResourcePUT /device/ipmi/thresholdsUpdates IPMI thresholds for device list
HivelocityApi.DeviceApiputIpmiThresholdsIdResourcePUT /device/{deviceId}/ipmi/thresholdsUpdates IPMI thresholds data
HivelocityApi.DomainsApideleteARecordIdResourceDELETE /domains/{domainID}/a-record/{recordId}Delete a single A Record value for given zone
HivelocityApi.DomainsApideleteAaaaRecordIdResourceDELETE /domains/{domainID}/aaaa-record/{recordId}Delete an AAAA Record for given zone
HivelocityApi.DomainsApideleteDomainIdResourceDELETE /domains/{domainId}Delete domain for given id
HivelocityApi.DomainsApideleteMxRecordIdResourceDELETE /domains/{domainID}/mx-record/{recordId}Delete an MX Record for given zone
HivelocityApi.DomainsApigetARecordIdResourceGET /domains/{domainID}/a-record/{recordId}Return Single A Records found for given id
HivelocityApi.DomainsApigetARecordResourceGET /domains/{domainID}/a-recordReturn all A Records found for given zone
HivelocityApi.DomainsApigetAaaaRecordIdResourceGET /domains/{domainID}/aaaa-record/{recordId}Return Single AAAA Records found for given id
HivelocityApi.DomainsApigetAaaaRecordResourceGET /domains/{domainID}/aaaa-recordReturn all AAAA Records found for given zone
HivelocityApi.DomainsApigetDomainIdResourceGET /domains/{domainId}Return a domain for given id
HivelocityApi.DomainsApigetDomainResourceGET /domains/Return the domains of a client
HivelocityApi.DomainsApigetMxRecordIdResourceGET /domains/{domainID}/mx-record/{recordId}Return Single MX Records found for given id
HivelocityApi.DomainsApigetMxRecordResourceGET /domains/{domainID}/mx-recordReturn all MX Records found for given zone
HivelocityApi.DomainsApigetPtrRecordIdResourceGET /domains/ptr/{recordId}
HivelocityApi.DomainsApigetPtrRecordResourceGET /domains/ptrReturn the PTR records of a client
HivelocityApi.DomainsApipostARecordResourcePOST /domains/{domainID}/a-recordCreate a new A Record for given zone
HivelocityApi.DomainsApipostAaaaRecordResourcePOST /domains/{domainID}/aaaa-recordCreate a new AAAA Record for given zone
HivelocityApi.DomainsApipostDomainResourcePOST /domains/Create a new domain
HivelocityApi.DomainsApipostMxRecordResourcePOST /domains/{domainID}/mx-recordCreate a new MX Record for given zone
HivelocityApi.DomainsApiputARecordIdResourcePUT /domains/{domainID}/a-record/{recordId}Update an A Record for given zone
HivelocityApi.DomainsApiputAaaaRecordIdResourcePUT /domains/{domainID}/aaaa-record/{recordId}Update an AAAA Record for given id
HivelocityApi.DomainsApiputMxRecordIdResourcePUT /domains/{domainID}/mx-record/{recordId}Update an MX Record for given zone
HivelocityApi.DomainsApiputPtrRecordIdResourcePUT /domains/ptr/{recordId}
HivelocityApi.InventoryApigetLocationResourceGET /inventory/locationsReturn sps facilities and locations
HivelocityApi.InventoryApigetStockByProductResourceGET /inventory/product/{productId}Return a structured sps stock data, grouped by city or facility code for a single product
HivelocityApi.InventoryApigetStockResourceGET /inventory/productReturn structured sps stock data, grouped by city or facility code for all products
HivelocityApi.InvoiceApigetInvoiceIdDetailsGET /invoice/{invoiceId}/detailsReturn detailed information for an invoice
HivelocityApi.InvoiceApigetInvoiceIdResourceGET /invoice/{invoiceId}Return serialized data on a single invoice
HivelocityApi.InvoiceApigetInvoicePdfResourceGET /invoice/{invoiceId}/pdf-downloadReturn an Invoice PDF file in Base64 Encoded Format
HivelocityApi.InvoiceApigetInvoiceResourceGET /invoice/Return serialized data on all invoices
HivelocityApi.InvoiceApigetInvoiceSearchResourceGET /invoice/searchReturn results of invoice search
HivelocityApi.InvoiceApigetInvoiceUnpaidResourceGET /invoice/unpaidReturn total balance of all unpaid invoices
HivelocityApi.NetworkApigetNetworkTaskClientResourceGET /network/status/Returns the Last Status for a long running Network Task, such as modifying a VLAN
HivelocityApi.NetworkApigetNetworkTaskDeviceResourceGET /network/status/{deviceId}Returns the Last Status for a long running Network Task, such as modifying a VLAN
HivelocityApi.NetworkApigetNullRouteResourceGET /network/null/{ip}Null route an IP
HivelocityApi.NetworkApigetRemoveNullRouteResourceGET /network/unnull/{ip}Remove null route from an IP
HivelocityApi.NetworkApipostDetailedNullRouteResourcePOST /network/nullNull route an IP (with custom comments)
HivelocityApi.OrderApigetOrderIdResourceGET /order/{orderId}Return details of a specific Order
HivelocityApi.OrderApigetOrderResourceGET /order/Return a list with all Orders
HivelocityApi.PermissionApigetPermissionAllResourceGET /permission/Endpoint to get All Permissions
HivelocityApi.PermissionApigetPermissionContactResourceGET /permission/contact/{contactId}Endpoint to get Contact Permissions
HivelocityApi.PermissionApigetPermissionUserResourceGET /permission/userEndpoint to get User Permissions
HivelocityApi.PermissionApipostPermissionAssignContactResourcePOST /permission/contactEndpoint to assign a new Permission to a Contact
HivelocityApi.ProductApigetProductListResourceGET /product/listReturn structured sps stock data in a list
HivelocityApi.ProductApigetProductOperatingSystemsResourceGET /product/{productId}/operating-systemsReturn List of operating systems found for a Product
HivelocityApi.ProductApigetProductOptionResourceGET /product/{productId}/optionsReturn List of Options found for a Product
HivelocityApi.ProductApigetProductsAndOptionsResourceGET /product/optionsReturn a mapping of Products and Options with pricing per-period
HivelocityApi.ProductApipostProductMatchResourcePOST /product/matchReturn a list of Products matching the provided lshw output of a server
HivelocityApi.ProfileApigetBasicProfileResourceGET /profile/basicGet Basic Profile of current user or a contact with id
HivelocityApi.ProfileApigetProfileResourceGET /profile/Get Profile of current user or a contact with id
HivelocityApi.ProfileApiputProfileResourcePUT /profile/Update Profile of current user or a contact with id
HivelocityApi.ServiceApigetServiceIdResourceGET /service/{serviceId}Return a dictionary with data from a specific account service
HivelocityApi.ServiceApigetServiceResourceGET /service/Return a list of all account services
HivelocityApi.SshKeyApideleteSshKeyIdResourceDELETE /ssh_key/{sshKeyId}Removes public ssh key
HivelocityApi.SshKeyApigetSshKeyIdResourceGET /ssh_key/{sshKeyId}Get public ssh key
HivelocityApi.SshKeyApigetSshKeyResourceGET /ssh_key/Gets all public ssh key
HivelocityApi.SshKeyApipostSshKeyResourcePOST /ssh_key/Adds public ssh key
HivelocityApi.SshKeyApiputSshKeyIdResourcePUT /ssh_key/{sshKeyId}Updates public ssh key
HivelocityApi.TicketApigetTicketIdResourceGET /tickets/{ticketId}Returns details of a specific ticket
HivelocityApi.TicketApigetTicketReplyResourceGET /tickets/{ticketId}/replyReturns a reply for a specific ticket
HivelocityApi.TicketApigetTicketResourceGET /tickets/Returns a list with all Tickets
HivelocityApi.TicketApigetTicketSearchResourceGET /tickets/searchReturn results of ticket search
HivelocityApi.TicketApipostTicketReplyResourcePOST /tickets/{ticketId}/replyCreates reply for a specific Ticket
HivelocityApi.TicketApipostTicketResourcePOST /tickets/Creates a new ticket
HivelocityApi.TicketApiputTicketIdResourcePUT /tickets/{ticketId}Updates a specific ticket
HivelocityApi.TokenApideleteTokenIdResourceDELETE /token/{token}Deletes the Public API Token
HivelocityApi.TokenApigetTokenIdResourceGET /token/{token}Returns Public API Token
HivelocityApi.TokenApigetTokenResourceGET /token/Returns a list of Public API Tokens for the current user
HivelocityApi.TokenApipostTokenResourcePOST /token/Create a new Public API Token for the current user
HivelocityApi.TokenApiputTokenIdResourcePUT /token/{token}Updates the Public API Token
HivelocityApi.VLANApideleteVlanIdResourceDELETE /vlan/{vlanId}Remove an existing Private VLAN
HivelocityApi.VLANApigetVlanIdResourceGET /vlan/{vlanId}Fetch information from an existing Private VLAN
HivelocityApi.VLANApigetVlanResourceGET /vlan/Return a list with all Private VLANs
HivelocityApi.VLANApipostVlanResourcePOST /vlan/Create a new Private VLAN
HivelocityApi.VLANApiputVlanIdResourcePUT /vlan/{vlanId}Update an existing Private VLAN, including adding and/or removing devices from it
HivelocityApi.WebhookApideleteWebhookIdResourceDELETE /webhooks/{webhookId}Deletes a single webhook
HivelocityApi.WebhookApigetWebhookEventResourceGET /webhooks/eventsReturns all available Webhook Events
HivelocityApi.WebhookApigetWebhookIdResourceGET /webhooks/{webhookId}Returns detailed information for a Single Webhook
HivelocityApi.WebhookApigetWebhookResourceGET /webhooks/Returns your active Webhooks
HivelocityApi.WebhookApipostEventScriptActionTriggerResourcePOST /webhooks/triggerQueues a webhook for the event script action that was triggered
HivelocityApi.WebhookApipostWebhookResourcePOST /webhooks/Create a new Webhook for a Webhook Event
HivelocityApi.WebhookApiputWebhookIdResourcePUT /webhooks/{webhookId}Updates a Single Webhook

Documentation for Models

Documentation for Authorization

apiKey

  • Type: API key
  • API key parameter name: X-API-KEY
  • Location: HTTP header
2.0.0

3 years ago