.client.rest-client.1.2.7.source-code.overview.html Maven / Gradle / Ivy
The newest version!
The Java SDK wraps calls to the Cloudseal REST Api.
Before using this library you will need to obtain an Access Key and Secret your Cloudseal admin console (Settings -> API Access)
Sample usage
RESTClient restClient = new RestClientImpl("acme", "myAccessKey", "mySecret");
UserService userService = new UserServiceImpl(restClient);
CloudsealUser newUser = new CloudsealUser();
newUser.setUsername("newUser");
newUser.setFirstName("New");
newUser.setLastName("User");
newUser.setEmail("[email protected]");
// Give user access to the Cloudseal admin console
CloudsealApplication cloudseal = new CloudsealApplication();
cloudseal.setId("CloudSeal");
cloudseal.getRoles().add("ADMIN");
newUser.getApplications().add(cloudseal);
newUser = userService.addUser(newUser);
String generatedPassword = newUser.getPassword();
// Release connection pool
restClient.destroy();
© 2015 - 2025 Weber Informatics LLC | Privacy Policy