Skip to main content

Atlassian Crowd REST API

You may configure an Atlassian Crowd server for authenticating users and managing users and groups. This section assumes you are familiar with Atlassian Crowd, and have a Crowd server currently in use.

Creating/updating a Crowd Connection

To create/update a Crowd connection, a System Administrator can issue a PUT request at the following endpoint:

PUT /api/v2/config/crowd

The PUT request must use the application/json content type and must provide the connection data in the request body. The request body must contain the following fields:

serverUrl, which holds the Crowd Server URL.

applicationName, which holds the Crowd Application Name.

applicationPassword, which holds the Crowd Application Password.

When updating you don't need to provide all fields, instead you can provide only the fields you want to update except when updating the server URL since that also requires the application password.

curl -X PUT -u admin:admin123 -H 'Content-Type: application/json' -d '{"serverUrl": "http://localhost:8095/crowd", "applicationName": "sonatype", "applicationPassword": "admin123"}' http://localhost:8070/api/v2/config/crowd

The successful HTTP response would be 204 No Content.

Getting Crowd Connection details

To get an existing Crowd connection, a System Administrator can issue a GET request at the following endpoint:

GET /api/v2/config/crowd
curl -u admin:admin123 http://localhost:8070/api/v2/config/crowd

The successful HTTP response would be 200 OK. The response looks like this:

{
    "serverUrl": "http://localhost:8095/crowd",
    "applicationName": "sonatype"
}

For security reasons, the password is not included as part of the response.

Removing a Crowd Connection

To remove an existing Crowd connection, a System Administrator can issue a DELETE request at the following endpoint:

DELETE /api/v2/config/crowd

Only a single Crowd configuration may be set or deleted.

curl -u admin:admin123 -X DELETE http://localhost:8070/api/v2/config/crowd

The successful HTTP response would be 204 No Content.

Testing a new or existing Crowd Connection

To test a Crowd Connection, a System Administrator can issue a POST request at the following endpoint:

POST /api/v2/config/crowd/test

For testing an existing connection, a request body is not required, otherwise, the request body must contain the following fields:

  • serverUrl: holds the Crowd Server URL

  • applicationName: holds the Crowd Application Name

  • applicationPassword: holds the Crowd Application Password

For example, using a local installation of IQ Server with its default configuration and assuming the Crowd server is also installed locally, a request using the curl tool would be:

curl -u admin:admin123 -X POST -H 'Content-Type: application/json' -d '{"serverUrl": "http://localhost:8095/crowd", "applicationName": "sonatype", "applicationPassword": "admin123"}' http://localhost:8070/api/v2/config/crowd/test

For testing an existing connection, a request using the cURL would be:

curl -u admin:admin123 -X POST http://localhost:8070/api/v2/config/crowd/test

The successful HTTP response would be 200 OK.

{"code":200,"message":null}