Java SDK
The ALM Octane SDK consists of a set of Java libraries, a sample project, documentation, and examples to help you integrate with ALM Octane.
Get ready
The following requirements and prerequisites are necessary for working with the ALM Octane Java SDK.
Java |
8.0 and later |
ALM Octane | 12.53.16 and later |
Prepare the following items in advance. You need them to work with the ALM Octane SDK.
-
The URL of your ALM Octane server.
-
The shared space ID.
-
Workspace IDs.
Download and install
Downloading the Java SDK from one of the following locations:
Location | Description |
---|---|
Maven | You can download the Java SDK libraries and samples from the Maven repositories using project object model (POM) file. Maven includes all dependencies automatically when you download the ALM Octane Java SDK. |
GitHub | You can download the source files from the GitHub repository. You can also use this method to contribute to the repository. |
Maven
The SDK comprises the following Maven modules within the main project:
Module | Description |
---|---|
sdk-root | This is the main root of the SDK. It contains all integration tests, source code, and examples. |
sdk-src | The root of the main SDK. Add only this module if you only want to consume the SDK. |
sdk-integration-tests | The module used for running integration tests from the SDK against your ALM Octane instance. |
sdk-usage-examples | Some simple examples of how to use the SDK. |
To work with Maven, add the ALM Octane dependency to your project in your pom.xml file, as described in ALMOctaneJavaRESTSDK.
GitHub
The SDK repository can be found at:
https://github.com/MicroFocus/ALMOctaneJavaRESTSDK
There you will see information about how to compile the project and create Javadoc.
Authenticate
To use the ALM Octane Java SDK, you must authenticate, as you would when working directly with the REST API. For details, see Authenticating.
Access Javadocs
Javadocs are HTML documentation generated from Java source code. Javadocs describe:
-
Classes and methods
-
Parameters and return values
-
Deprecated classes and methods
-
Class hierarchy
If you download from Maven, you can download a pre-packaged jar with the Javadocs inside them from:
https://repo1.maven.org/maven2/com/microfocus/adm/almoctane/sdk/sdk-src/16.2.100/sdk-src-16.2.100-javadoc.jar
Alternatively if you download the source files from GitHub, you can create the Javadocs yourself. See the README file on GitHub for more information.
The sample project
The ALM Octane Java SDK provides a sample project that can be used for practice. The examples here are based on this sample project.
Access the sample project
To access the sample project, enter this URL: https://github.com/MicroFocus/ALMOctaneJavaRESTSDK/tree/master/sdk-usage-examples
Familiarize yourself with the sample project
Open the project in ALM Octane and become familiar with the data and entities.
Sample | Description |
---|---|
CreateContextExample.java |
This example shows out to create the context in which the REST API functions operate.
|
EntityExample.java |
This example demonstrates how to work with entities using the REST API. For demo purposes, the example works with defects, but the same examples can be used with other entities.
|
MetadataExample.java |
This example demonstrates how to get metadata for all fields. |
See also: