Skip to content

Latest commit

 

History

History
167 lines (125 loc) · 10.1 KB

README.md

File metadata and controls

167 lines (125 loc) · 10.1 KB

client-java

Requirements

Building the API client library requires Maven to be installed.

Installation

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

mvn install

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

mvn deploy

Refer to the official documentation for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
    <groupId>com.appscode.stash</groupId>
    <artifactId>client-java</artifactId>
    <version>0.1.0</version>
    <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.appscode.stash:client-java:0.1.0"

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/client-java-0.1.0.jar
  • target/lib/*.jar

Getting Started

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

import com.appscode.stash.client.*;
import com.appscode.stash.client.auth.*;
import com.appscode.stash.client.models.*;
import com.appscode.stash.client.apis.ApisApi;

import java.io.File;
import java.util.*;

public class ApisApiExample {

    public static void main(String[] args) {
        
        ApisApi apiInstance = new ApisApi();
        try {
            V1APIGroupList result = apiInstance.getAPIVersions();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApisApi#getAPIVersions");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://localhost

Class Method HTTP request Description
ApisApi getAPIVersions GET /apis/
RepositoriesStashAppscodeComApi getAPIGroup GET /apis/repositories.stash.appscode.com/
RepositoriesStashAppscodeComV1alpha1Api deleteNamespacedSnapshot DELETE /apis/repositories.stash.appscode.com/v1alpha1/namespaces/{namespace}/snapshots/{name}
RepositoriesStashAppscodeComV1alpha1Api getAPIResources GET /apis/repositories.stash.appscode.com/v1alpha1/
RepositoriesStashAppscodeComV1alpha1Api listNamespacedSnapshot GET /apis/repositories.stash.appscode.com/v1alpha1/namespaces/{namespace}/snapshots
RepositoriesStashAppscodeComV1alpha1Api listSnapshotForAllNamespaces GET /apis/repositories.stash.appscode.com/v1alpha1/snapshots
RepositoriesStashAppscodeComV1alpha1Api readNamespacedSnapshot GET /apis/repositories.stash.appscode.com/v1alpha1/namespaces/{namespace}/snapshots/{name}
StashAppscodeComApi getAPIGroup GET /apis/stash.appscode.com/
StashAppscodeComV1alpha1Api createNamespacedRecovery POST /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/recoveries
StashAppscodeComV1alpha1Api createNamespacedRepository POST /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/repositories
StashAppscodeComV1alpha1Api createNamespacedRestic POST /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/restics
StashAppscodeComV1alpha1Api deleteCollectionNamespacedRecovery DELETE /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/recoveries
StashAppscodeComV1alpha1Api deleteCollectionNamespacedRepository DELETE /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/repositories
StashAppscodeComV1alpha1Api deleteCollectionNamespacedRestic DELETE /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/restics
StashAppscodeComV1alpha1Api deleteNamespacedRecovery DELETE /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/recoveries/{name}
StashAppscodeComV1alpha1Api deleteNamespacedRepository DELETE /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/repositories/{name}
StashAppscodeComV1alpha1Api deleteNamespacedRestic DELETE /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/restics/{name}
StashAppscodeComV1alpha1Api getAPIResources GET /apis/stash.appscode.com/v1alpha1/
StashAppscodeComV1alpha1Api listNamespacedRecovery GET /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/recoveries
StashAppscodeComV1alpha1Api listNamespacedRepository GET /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/repositories
StashAppscodeComV1alpha1Api listNamespacedRestic GET /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/restics
StashAppscodeComV1alpha1Api listRecoveryForAllNamespaces GET /apis/stash.appscode.com/v1alpha1/recoveries
StashAppscodeComV1alpha1Api listRepositoryForAllNamespaces GET /apis/stash.appscode.com/v1alpha1/repositories
StashAppscodeComV1alpha1Api listResticForAllNamespaces GET /apis/stash.appscode.com/v1alpha1/restics
StashAppscodeComV1alpha1Api patchNamespacedRecovery PATCH /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/recoveries/{name}
StashAppscodeComV1alpha1Api patchNamespacedRepository PATCH /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/repositories/{name}
StashAppscodeComV1alpha1Api patchNamespacedRestic PATCH /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/restics/{name}
StashAppscodeComV1alpha1Api readNamespacedRecovery GET /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/recoveries/{name}
StashAppscodeComV1alpha1Api readNamespacedRepository GET /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/repositories/{name}
StashAppscodeComV1alpha1Api readNamespacedRestic GET /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/restics/{name}
StashAppscodeComV1alpha1Api replaceNamespacedRecovery PUT /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/recoveries/{name}
StashAppscodeComV1alpha1Api replaceNamespacedRepository PUT /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/repositories/{name}
StashAppscodeComV1alpha1Api replaceNamespacedRestic PUT /apis/stash.appscode.com/v1alpha1/namespaces/{namespace}/restics/{name}

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization. Authentication schemes defined for the API:

Recommendation

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

Author

hello@appscode.com