Get the 1&1 Cloudserver Java SDK

Table of Contents

Introduction

The 1&1 Java SDK is a Java library designed for interaction with the 1&1 cloud platform over the REST API.

This guide contains instructions on getting started with the library and automating various management tasks available through the 1&1 Cloud Panel UI.

Overview

This SDK is a wrapper for the 1&1 REST API written in Java. All operations against the API are performed over SSL and authenticated using your 1&1 token key. The Java library facilitates the access to the REST API within an instance running on 1&1 platform.

For more information on the 1&1 Cloud Server SDK for Java, visit the Community Portal.

Getting Started

Before you begin you will need to have signed up for a 1&1 account. The credentials you create during sign-up will be used to authenticate against the API.

You will also need to install the Java language tools. Find the install package and instructions on the official Oracle Java website. Make sure to follow the setup instructions.

Installation

The official Java library is available from the 1&1 GitHub account found here.

Authentication

Set the authentication token as an Environment Variable OAO_TOKEN and create the API client:

oneandoneApi.setToken(System.getenv("OAO_TOKEN"));

locate the OneAndOneAPIBase class and inside it locate the urlBase and set it to the URL as follows

private String urlBase = "https://url";

Note if the urlBase is not set it will default to https://cloudpanel-api.1and1.com/v1

Updated 6/28/17

Comments

Tags: Management