Cloudera Manager(CM) 6.0 introduces new Java API client based on Swagger. This new API client supports all CM API versions.
Older Java client will still be supported for API version less than 30. So older Java API client can still be used against Cloudera Manager version 6.0 and later as long as API version 19 or earlier is used.
For e.g. customer can use old CM API client version 5.14 against CM version 6.0 which by default will invoke API version 19. If customer wants to use new features that were introduced in Cloudera Manager 6.0 i.e. API version 30 like “Fine Grained Access Control” then customer must use this new API client.
Older Java client and new Swagger based Java client can co-exist in an application to allow for incremental transition to new Swagger based java client.
Merge the following to your Maven project’s
<project> <repositories> <repository> <id>cm.repo</id> <url>https://repository.cloudera.com/artifactory/cloudera-repos</url> <name>Cloudera Repository</name> </repository> … </repositories> <dependencies> <dependency> <groupId>com.cloudera.api.swagger</groupId> <artifactId>cloudera-manager-api-swagger</artifactId> <version>6.2.0</version> <!-- or CM version 6.0 and above --> </dependency> … </dependencies> ... </project>
You can also directly download the jar(and sources) from Cloudera repository.
Here is the latest SDK doc, for API version 32 (CM 6.2.0).
The above example invokes API over secure HTTPS channel. If TLS is not enabled on Cloudera Manager Admin Console then update the base path (setBasePath()) to point to right URL and TLS configuration (setVerifyingSSL(), setSslCaCert()) for API client can be dropped.