Java Client for the OpenShift REST API
Latest commit eed6e20 Oct 22, 2016 @coreydaley coreydaley committed on GitHub Merge pull request #230 from coreydaley/fixing_some_issues
[OSJC-201] fixing multiple issues
Failed to load latest commit information.
.gitignore [OSJC-125] exclude DHE (SSL) ciphers when supported keys are <= 1024 Oct 3, 2014
.travis.yml [OSJC-201] fixing multiple issues found via coverity scan and IDE cod… Aug 17, 2015
epl-v10.html Add required copy of EPL license text Feb 25, 2013
license license Feb 27, 2012
pom.xml bumping to 2.8.0-SNAPSHOT Jan 26, 2015

OpenShift Java Client Build Status Maven Central

Java client for the OpenShift REST API. It pretty much offers all features that are currently available in the rhc-* command line tools (create/rename a domain, create/destroy applications, list applications, list available cartridges, add cartridges, etc.).

Only for Version 2

This client is used by JBoss Tools for OpenShift 2.x.

For later OpenShift versions see


An exemplary usage of the client may look like the following:

    IOpenShiftConnection connection = 
            new OpenShiftConnectionFactory().getConnection("myApplicationId", "user", "password");
    IUser user = connection.getUser();
    IDomain domain = user.createDomain("myDomain");
    IApplication as7Application = domain.createApplication("myApplication", LatestVersionOf.jbossAs().get(user));
    IEmbeddedCartridge mySqlCartridge = as7Application.addEmbeddableCartridge(LatestVersionOf.mySQL().get(user));
    String unstructuredCredentials = mySqlCartridge.getCreationLog();
    String mySqlConnectionUrl = mySqlCartridge.getUrl();

There are also 2 blog posts on which discuss the API in more details:

Most insightful are the integration tests within the library which pretty much use the API in all details:

  • ApplicationResourceIntegrationTest
  • DomainResourceIntegrationTest
  • EmbeddedCartridgeResourceIntegrationTest
  • etc.


You may either build from source using maven (mvn clean package) or get the prebuilt artifact from the maven central.