Automate Object Status Updates to Expired in Jira Assets Cloud

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

Summary

Learn how to periodically check and update object statuses to "Expired" using automation in Jira Assets.

Solution

Assume there is a License object type with a Status attribute indicating if the license is active or expired, and an Expiry date attribute.

  1. From the Global admin page of automation, create a rule with a scheduled trigger.

  2. Add a lookupobjects action to find the objects with an overdue expiry date that are already not marked as Expired.

    ⚠️ Please note that the lookupobjects action can fetch at the most 100 objects at a time. So you need to schedule the automation rule in the previous step based on the maximum number of objects that might expire in a day.

    objecttype = License AND "Expiry date" < now() AND "Status" != Expired
  3. Add an If block with an Advanced compare condition that the lookupobject size must be greater than 0.

    {{lookupObjects.size}}

  4. Add Advanced branching within the If block to start branching over each object key in the lookupobject list. Create a variable ObjectList that stores the smart value of lookupobjects.

  5. Within the branch, add the Send web request action. Utilize this action to edit the object attribute via JSM Assets REST API.

    In the WebhookURL section, add the below endpoint with your <WorkspaceID>. Use the {{ObjectList.key}} smart value to replace the objectid, so that we send the REST API for each object id in the ObjectList:

    https://api.atlassian.com/jsm/assets/workspace/<WorkspaceID>/v1/object/{{ObjectList.key}}

    In the Authorization header make sure that you add the keyword Basic followed by the base64 of your emailaddress:APItoken. So if the base64 of the emailaddress:APItoken is AB12XY45, then to the Authorization header add the value Basic AB12XY45.

For more examples, refer to the article: How to update object attribute values using automation in JSM Assets

Updated on April 30, 2025

Still need help?

The Atlassian Community is here for you.