Skip to content

Latest commit

 

History

History
156 lines (105 loc) · 3.95 KB

File metadata and controls

156 lines (105 loc) · 3.95 KB

databox

Static OpenAPI document of Push API resource

  • API version: 0.4.4-alpha.2
    • Build date: 2024-08-26T12:34:22.089134Z[Etc/UTC]
    • Generator version: 7.6.0

Push API resources Open API documentation asdas

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>org.databox</groupId>
  <artifactId>databox</artifactId>
  <version>2.5.2</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'databox' jar has been published to maven central.
    mavenLocal()       // Needed if the 'databox' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "org.databox:databox:2.5.2"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/databox-2.5.2.jar
  • target/lib/*.jar

Getting Started

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

// Import classes:
import org.databox.ApiClient;
import org.databox.ApiException;
import org.databox.Configuration;
import org.databox.auth.*;
import org.databox.models.*;
import org.databox.api.DefaultApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://push.databox.com");
    
    // Configure HTTP basic authorization: basicAuth
    HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
    basicAuth.setUsername("YOUR USERNAME");
    basicAuth.setPassword("YOUR PASSWORD");

    DefaultApi apiInstance = new DefaultApi(defaultClient);
    try {
      apiInstance.dataDelete();
    } catch (ApiException e) {
      System.err.println("Exception when calling DefaultApi#dataDelete");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

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

Class Method HTTP request Description
DefaultApi dataDelete DELETE /data
DefaultApi dataMetricKeyDelete DELETE /data/{metricKey}
DefaultApi dataPost POST /data
DefaultApi metrickeysGet GET /metrickeys
DefaultApi metrickeysPost POST /metrickeys
DefaultApi pingGet GET /ping

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author