Jira service management automation rule to delete assets objects using REST API command

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

Currently, there is no action in Jira cloud to delete assets objects via automation. The only available actions are to create and edit objects. We have an open feature request to address this requirement: JSDCLOUD-11218 - Insights Automation: Add action to delete Insight Objects using Automation

This article explains how you can create an automation rule to add action to send a REST API to delete the object/s as mentioned in the workaround section of the feature request.

Environment

Jira service management cloud

Solution

Here I am sharing the steps for creating the automation rule.

  • Go to Global automation in your instance. Navigation path: Settings > System > Automation or <https://<your-domain>.atlassian.net/jira/settings/automation>

  • Click on Create rule. You can choose the trigger based on your requirements. Here, I have selected the scheduled trigger.

  • Create an AQL branch select the assets schema and update the AQL query to suit your match.

    • Ex: "Account Enabled" = False

  • You can put a log action to print the deleting object ID. (optional)

  • Add a "Send web request" action to invoke the delete assets object REST API command.

  • Ex:

    • Web request URL: https://api.atlassian.com/jsm/assets/workspace/1234455-0e3d-4506-98df-729ab0bed9d0/v1/object/{{object.id}}

    • HTTP method: DELETE

    •  Headers:

      • Key: Authorization

      • Value: Base64 encrypted API token of your Atlassian account ID

  • You need to pass the correct workspace ID of your instance. You can get the workspace ID using this REST API command.

(Auto-migrated image: description temporarily unavailable)

Updated on March 21, 2025

Still need help?

The Atlassian Community is here for you.