Giter VIP home page Giter VIP logo

dynatrace-appmon-server-rest-java-sdk's Introduction

Dynatrace Server SDK Build Status

This library provides an easy to use Java implementation of Dynatrace Server REST API.

Table of Contents

Installation

Library is available in maven central repository (starting with version 7.0.0; for previous versions see the Releases page).

Maven

  • Add the following code to the <dependencies> section:
<dependency>
    <groupId>com.dynatrace.sdk</groupId>
    <artifactId>server-rest-sdk</artifactId>
    <version>LATEST_VERSION</version>
</dependency>

Gradle

  • Put the following code in your dependencies block:
compile 'com.dynatrace.sdk:server-rest-sdk:LATEST_VERSION'

Services

The SDK is divided into small modules called services. Each service corresponds to the appropriate Rest API endpoint. Documentation of Rest API endpoints can be found on your local Dynatrace Server: https://DTSERVER:8021/api-docs/current/. General documentation for Server Rest interfaces is available here.

The SDK currently supports a small part of the available interfaces, therefore Pull Requests are highly appreciated.

Each service takes a DynatraceClient as the only parameter in the constructor.

Dynatrace Client

The DynatraceClient holds the Apache HTTPClient under the hood and therefore it is recommended to pass thesame DynatraceClient to all services to avoid multiple client creation.

Constructing

The DynatraceClient can be constructed using two constructors:

public DynatraceClient(ServerConfiguration configuration) {
//...
}
public DynatraceClient(ServerConfiguration configuration, CloseableHttpClient httpClient) {
//...
}

You most likely want to use the first one.

ServerConfiguration is an interface which has a basic implementation: BasicServerConfiguration

The most basic use-case would be to create a DynatraceClient the following way:

DynatraceClient client = new DynatraceClient(new BasicServerConfiguration("username","password"));

You may want to take a look at BasicServerConfiguration source-code for a list and documentation of other constructors.

Test Automation

Creation

import com.dynatrace.sdk.server.testautomation.TestAutomation;
//...
TestAutomation automation = new TestAutomation(DynatraceClient);

Sessions

Creation

import com.dynatrace.sdk.server.sessions.Sessions
//...
Sessions sessions = new Sessions(DynatraceClient);

System Profiles

Creation

import com.dynatrace.sdk.server.systemprofiles.SystemProfiles
//...
SystemProfiles systemProfiles = new SystemProfiles(DynatraceClient);

Server Management

Creation

import com.dynatrace.sdk.server.servermanagement.ServerManagement
//...
ServerManagement serverManagement = new ServerManagement(DynatraceClient);

Building

In order to build the library, one must execute mvn clean install or mvn clean package.

Running tests

The SDK comes with some unit tests, to run them, execute the following command:

mvn clean test

dynatrace-appmon-server-rest-java-sdk's People

Contributors

chojna avatar dglugla avatar ham3r avatar ingohackl avatar micchal avatar micmich avatar wbachnik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dynatrace-appmon-server-rest-java-sdk's Issues

Unresolved constraint in bundle

Unresolved constraint in bundle my.company.my-plugin [170]: Unable to resolve 170.0: missing requirement [170.0] osgi.wiring.package; (osgi.wiring.package=com.dynatrace.sdk.org.apache.avalon.framework.logger)

Can you assist with this? Looks like it might have something to do with the way it's shading

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.