Crowd REST Client
An Apache-licensed library for Crowd's REST API
Binary, source and documentation releases of this library are available from the Atlassian Public Maven Repository. You can query the repository to find out which is the latest release. Add the dependency to your Maven pom.xml file as follows:
<dependency> <groupId>com.atlassian.crowd.client</groupId> <artifactId>atlassian-crowd-rest-client</artifactId> <version>1.2</version> </dependency>
Or to your SBT build.sbt file projects as follows:
resolvers += "atlassian-public" at "https://maven.atlassian.com/repository/public" libraryDependencies ++= Seq( "com.atlassian.crowd.client" % "atlassian-crowd-rest-client" % "1.2" )
(1.2 is just an example: check the repository for the latest release.)
You'll need Crowd's base URL and an application-specific name and password (see Adding an Application).
import com.atlassian.crowd.service.client.CrowdClient; import com.atlassian.crowd.integration.rest.service.factory.RestCrowdClientFactory; CrowdClient client = new RestCrowdClientFactory().newInstance(url, applicationName, applicationPass);
For more information, please see the section on CrowdClient at Java Integration Libraries.
REST resources are supported since Crowd 2.1, although some resources may only be available in later versions.