Skip to end of banner
Go to start of banner

REST API: Integrity Check

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

On this page:

For details and examples, take a look at the REST API reference:

Documentation for Integrity Check REST API 1.4 - available with CMJ 6.6.6 or later.

URI Structure

Integrity Check for Jira’s REST API provides means to run Integrity checks, track their progress and get the results as json/csv. URIs for Integrity Check's REST API resource have the following structure:

http://yourjira.com/jira/rest/integrity-check/api/1.4/integrity

Step-by-step guide for using the API

Running an Integrity check

To run an integrity check, use the following request. For details please refer to the documentation of the latest version 1.4.

curl -u admin:admin -i -H "Content-Type: application/json" -X POST http://localhost:2990/jira/rest/integrity-check/api/1.4/integrity -d '{"scope" : "system"}'
  • Response contains the id of the started Integrity Check operation.

  • Note that on Windows single quotes around json might not work! Try escaping them like "{\"scope\":\"system\"...

Tracking progress

Once an operation has started, progress can be tracked by passing the operation id to the following request (in the example operation id is 1):

curl -u admin:admin -i -H "Content-Type: application/json" -X GET http://localhost:2990/jira/rest/integrity-check/api/1.4/integrity/1

For running operations, the response contains the progress of the operation, which is between 0 and 1, and the operation status.

For completed operations, the response contains an integrityModel property, which includes any integrity violations.

Download the results as csv

The Integrity Check results can be downloaded as a csv file by passing the operation id to the following request (in the example operation id is 1):

curl -u admin:admin -i -H "Content-Type: application/json" -X GET http://localhost:2990/jira/rest/integrity-check/api/1.4/integrity/1/csv
  • note that the csv file is empty if no integrity violations are detected!

Cancel a running Integrity check

A running Integrity check operation can be canceled by passing the operation id to the following request (in the example operation id is 1):

curl -u admin:admin -i -H "Content-Type: application/json" -X PUT http://localhost:2990/jira/rest/integrity-check/api/1.4/integrity/1/cancel

  • No labels