/databox-ruby

Ruby wrapper for Databox Push API

Primary LanguageRubyMIT LicenseMIT

databox

Databox - the Ruby gem for the Static OpenAPI document of Push API resource

Push API resources Open API documentation

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 0.4.1
  • Package version: 2.1.1
  • Generator version: 7.6.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build databox.gemspec

Then either install the gem locally:

gem install ./databox-2.1.1.gem

(for development, run gem install --dev ./databox-2.1.1.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'databox', '~> 2.1.1'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'databox', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'databox'

# Setup authorization
Databox.configure do |config|
  # Configure HTTP basic authorization: basicAuth
  config.username = 'YOUR_USERNAME'
  config.password = 'YOUR_PASSWORD'
end

api_instance = Databox::DefaultApi.new

begin
  api_instance.data_delete
rescue Databox::ApiError => e
  puts "Exception when calling DefaultApi->data_delete: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://push.databox.com

Class Method HTTP request Description
Databox::DefaultApi data_delete DELETE /data
Databox::DefaultApi data_metric_key_delete DELETE /data/{metricKey}
Databox::DefaultApi data_post POST /data
Databox::DefaultApi metrickeys_get GET /metrickeys
Databox::DefaultApi metrickeys_post POST /metrickeys
Databox::DefaultApi ping_get GET /ping

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication