JIRA Configuration REST API - v2

NEW IN RELEASE 139

The REST API endpoints described here allow anyone with the System Administrator role or the Edit System Configuration and Users permission to manage a JIRA configuration for notifications.

JIRA Configuration Properties

PropertyRequiredDescription
urlYes but only for creation.The JIRA server address.
usernameNo unless the JIRA server requires an authenticated user to create issues.The username used to connect to the JIRA server.
passwordNo unless the JIRA server requires an authenticated user to create issues.The password used to connect to the JIRA server.
customFieldsNo unless the JIRA project issue type requires them.Any JIRA project issue type required fields without default values defined in JIRA.

GET the JIRA Configuration

To get the JIRA configuration you can make a GET request to the following path:

GET /api/v2/config/jira

Below is an example request to a local IQ Server using the built-in administrator account and the cURL tool:

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

If no JIRA configuration is saved, then the request yields HTTP status code 404. Otherwise, a JSON response with all the properties described above except for password is returned.

PUT the JIRA Configuration

To set the JIRA configuration you can make a PUT request to the following path:

PUT /api/v2/config/jira

The request requires a JSON body as payload.

If the JIRA configuration is being created for the first time, then the url is required and all other properties are optional. Although if supplying credentials, then a username and password must be supplied together.

If the JIRA configuration already exists, then any supplied properties will have their values updated to the given values.

If updating the url for an existing JIRA configuration which has credentials defined, then credentials must also be supplied. These credentials do not have to match the existing credentials but will replace the existing credentials. Supplying a null username and null password will remove the credentials.

Below is an example request to a local IQ Server using the built-in administrator account and the cURL tool:

curl -u admin:admin123 -X PUT -H "Content-Type: application/json" -d '{"url": "http://localhost:8080", "username": "admin", "password": "admin123", "customFields": {"reporter": {"name": "admin"}}}' http://localhost:8070/api/v2/config/jira

A successful request yields HTTP status code 204.

DELETE the JIRA Configuration

To delete the JIRA configuration you can make a DELETE request to the following path:

DELETE /api/v2/config/jira

Below is an example request to a local IQ Server using the built-in administrator account and the cURL tool:

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

A successful request yields HTTP status code 204.