How to delete a Snapshot Using CMJ REST API
This article provides step-by-step instructions for deleting a Configuration Manager for Jira (CMJ) snapshot using the CMJ REST API.
To delete a snapshot using the CMJ REST API, follow these steps:
1. Identify the Snapshot ID
Before deleting a snapshot, you need to obtain the snapshot ID. You can retrieve this ID from:
The result of the Create Snapshot API call.
The CMJ audit log by hovering over the snapshot entry in the UI.
2. Use the DELETE API Request
Once you have the snapshot ID, you can execute the following API call:
CURL Command:
curl -u admin:admin -i -H "Content-Type: application/json" -X DELETE <jira-base-url>/rest/configuration-manager/api/1.6/snapshots/<snapshot-id>
Replace:
<jira-base-url>
with your Jira instance URL.<snapshot-id>
with the actual ID of the snapshot.
3. Example Request
If your Jira instance is running on https://your-jira-instance.com
, and the snapshot ID is 1234
, the command will be:
curl -u admin:admin -i -H "Content-Type: application/json" -X DELETE https://your-jira-instance.com/rest/configuration-manager/api/1.6/snapshots/1234
4. Expected Response
Success (
200 OK
): The snapshot will be deleted successfully.Error (
404 Not Found
): If the snapshot does not exist or the ID is incorrect.Error (
403 Forbidden
): If the user does not have sufficient permissions.
5. Important Considerations
The DELETE request should be executed on the source instance where the snapshot was created, not on the destination instance.
If the snapshot is deployed, it is no longer stored as a snapshot in the target instance. Instead, it becomes part of the configuration.